diff --git a/.github/workflows/build-gh-pages.yml b/.github/workflows/build-gh-pages.yml index fe7f883ce..4517746a0 100644 --- a/.github/workflows/build-gh-pages.yml +++ b/.github/workflows/build-gh-pages.yml @@ -1,59 +1,58 @@ name: build-gh-pages - + on: workflow_dispatch jobs: - build-gh-pages: + build-gh-pages: runs-on: ubuntu-latest env: - USE_CIM_VERSION4: CGMES_2.4.15_27JAN2020 + USE_CIM_VERSION_2_4_15: CGMES_2.4.15_27JAN2020 + USE_CIM_VERSION_3_0_0: CGMES_3.0.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - name: Checkout submodules run: git submodule update --init --recursive - name: Install Doxygen - run: sudo apt-get install doxygen - shell: bash + run: sudo apt-get install doxygen + shell: bash - name: Install Graphviz run: sudo apt-get install graphviz - shell: bash - - name: CIM1 Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION1}} - - name: CIM1 Configure CMake and compile shell: bash - working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION1}}/ + + - name: USE_CIM_VERSION_2_4_15 Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}} + - name: USE_CIM_VERSION_2_4_15 Configure CMake and compile + shell: bash + working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}}/ run: | - cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION1}} - cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION1}} + cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}} + cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION_2_4_15}} make doc - - - name: CIM1 Copy + - name: USE_CIM_VERSION_2_4_15 Copy run: | mkdir -p ./copy_files/docs - cp -r ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION1}}/doc/html ./copy_files/docs/${{env.USE_CIM_VERSION1}} - - - name: CIM4 Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION4}} - - name: CIM4 Configure CMake and compile + cp -r ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}}/doc/html ./copy_files/docs/${{env.USE_CIM_VERSION_2_4_15}} + + - name: USE_CIM_VERSION_3_0_0 Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}} + - name: USE_CIM_VERSION_3_0_0 Configure CMake and compile shell: bash - working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION4}}/ + working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}}/ run: | - cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION4}} - cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION4}} + cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}} + cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION_3_0_0}} make doc - - name: CIM4 Copy + - name: USE_CIM_VERSION_3_0_0 Copy run: | mkdir -p ./copy_files/docs - cp -r ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION4}}/doc/html ./copy_files/docs/${{env.USE_CIM_VERSION4}} + cp -r ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}}/doc/html ./copy_files/docs/${{env.USE_CIM_VERSION_3_0_0}} cp ./README.md ./copy_files/docs/README.md - + - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./copy_files force_orphan: true keep_files: false publish_branch: gh-pages - - diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp b/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp new file mode 100644 index 000000000..e3e1d1e62 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp @@ -0,0 +1,375 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACDCConverter.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_ACDCConverter_baseS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->baseS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_idc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->idc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_idleLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->idleLoss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_maxUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_minUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_nomUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nomUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_numberOfValves(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->numberOfValves; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_poleLossP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->poleLossP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_resistiveLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistiveLoss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_switchingLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->switchingLoss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_targetPpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetPpcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_targetUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_udc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_valveU0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valveU0; + if (buffer.fail()) + return false; + else + 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) +{ + 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; +} + + + + + + + + + + + + + + + + + + + +const char ACDCConverter::debugName[] = "ACDCConverter"; +const char* ACDCConverter::debugString() const +{ + return ACDCConverter::debugName; +} + +void ACDCConverter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ACDCConverter::declare() +{ + return BaseClassDefiner(ACDCConverter::addConstructToMap, ACDCConverter::addPrimitiveAssignFnsToMap, ACDCConverter::addClassAssignFnsToMap, ACDCConverter::debugName); +} + +namespace CIMPP +{ + BaseClass* ACDCConverter_factory() + { + return new ACDCConverter; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp b/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp new file mode 100644 index 000000000..dfbbfe83e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp @@ -0,0 +1,69 @@ +#ifndef ACDCConverter_H +#define ACDCConverter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ApparentPower.hpp" +#include "CurrentFlow.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "ReactivePower.hpp" +#include "Simple_Float.hpp" +#include "Voltage.hpp" + +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. + */ + class ACDCConverter : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACDCConverter_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp new file mode 100644 index 000000000..59998ff38 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACDCConverterDCTerminal.hpp" + +#include +#include + +#include "ACDCConverter.hpp" +#include "DCPolarityKind.hpp" + +using namespace CIMPP; + +ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {}; +ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {}; + + + +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) +{ + ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + ACDCConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCConductingEquipment != element2) + { + element->DCConductingEquipment = element2; + return assign_ACDCConverter_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char ACDCConverterDCTerminal::debugName[] = "ACDCConverterDCTerminal"; +const char* ACDCConverterDCTerminal::debugString() const +{ + return ACDCConverterDCTerminal::debugName; +} + +void ACDCConverterDCTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ACDCConverterDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.DCConductingEquipment"), &assign_ACDCConverterDCTerminal_DCConductingEquipment)); +} + +const BaseClassDefiner ACDCConverterDCTerminal::declare() +{ + return BaseClassDefiner(ACDCConverterDCTerminal::addConstructToMap, ACDCConverterDCTerminal::addPrimitiveAssignFnsToMap, ACDCConverterDCTerminal::addClassAssignFnsToMap, ACDCConverterDCTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* ACDCConverterDCTerminal_factory() + { + return new ACDCConverterDCTerminal; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp new file mode 100644 index 000000000..aa9efdf04 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp @@ -0,0 +1,40 @@ +#ifndef ACDCConverterDCTerminal_H +#define ACDCConverterDCTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCBaseTerminal.hpp" +#include "BaseClassDefiner.hpp" +#include "DCPolarityKind.hpp" + +namespace CIMPP +{ + class ACDCConverter; + + class ACDCConverterDCTerminal : public DCBaseTerminal + { + public: + /* constructor initialising all attributes to null */ + ACDCConverterDCTerminal(); + ~ACDCConverterDCTerminal() override; + + CIMPP::ACDCConverter* DCConductingEquipment; /* Default: 0 */ + CIMPP::DCPolarityKind polarity; /* Represents the normal network polarity condition. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACDCConverterDCTerminal_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp b/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp new file mode 100644 index 000000000..b1c7a092b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp @@ -0,0 +1,139 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACDCTerminal.hpp" + +#include +#include + +#include "BusNameMarker.hpp" +#include "Measurement.hpp" +#include "OperationalLimitSet.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {}; +ACDCTerminal::~ACDCTerminal() {}; + + + + + +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) +{ + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + BusNameMarker* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BusNameMarker != element2) + { + element->BusNameMarker = element2; + return assign_BusNameMarker_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Measurement_Terminal(BaseClass*, BaseClass*); +bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + Measurement* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Measurement_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimitSet_Terminal(BaseClass*, BaseClass*); +bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->OperationalLimitSet.begin(), element->OperationalLimitSet.end(), element2) == element->OperationalLimitSet.end()) + { + element->OperationalLimitSet.push_back(element2); + return assign_OperationalLimitSet_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char ACDCTerminal::debugName[] = "ACDCTerminal"; +const char* ACDCTerminal::debugString() const +{ + return ACDCTerminal::debugName; +} + +void ACDCTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ACDCTerminal::declare() +{ + return BaseClassDefiner(ACDCTerminal::addConstructToMap, ACDCTerminal::addPrimitiveAssignFnsToMap, ACDCTerminal::addClassAssignFnsToMap, ACDCTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* ACDCTerminal_factory() + { + return new ACDCTerminal; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp b/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp new file mode 100644 index 000000000..1c5d0bc7d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp @@ -0,0 +1,49 @@ +#ifndef ACDCTerminal_H +#define ACDCTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class BusNameMarker; + 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. + */ + class ACDCTerminal : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACDCTerminal_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp b/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp new file mode 100644 index 000000000..2843fb464 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACLineSegment.hpp" + +#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() {}; + + +bool assign_ACLineSegment_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_bch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_gch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->shortCircuitEndTemperature; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + +const char ACLineSegment::debugName[] = "ACLineSegment"; +const char* ACLineSegment::debugString() const +{ + return ACLineSegment::debugName; +} + +void ACLineSegment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ACLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ACLineSegment::declare() +{ + return BaseClassDefiner(ACLineSegment::addConstructToMap, ACLineSegment::addPrimitiveAssignFnsToMap, ACLineSegment::addClassAssignFnsToMap, ACLineSegment::debugName); +} + +namespace CIMPP +{ + BaseClass* ACLineSegment_factory() + { + return new ACLineSegment; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp b/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp new file mode 100644 index 000000000..2f3f0ecc8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp @@ -0,0 +1,53 @@ +#ifndef ACLineSegment_H +#define ACLineSegment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Conductor.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Susceptance.hpp" +#include "Temperature.hpp" + +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. + */ + class ACLineSegment : public Conductor + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACLineSegment_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Accumulator.cpp b/CGMES_2.4.13_18DEC2013/Accumulator.cpp new file mode 100644 index 000000000..bc61e4d79 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Accumulator.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Accumulator.hpp" + +#include +#include + +#include "AccumulatorValue.hpp" +#include "AccumulatorLimitSet.hpp" + +using namespace CIMPP; + +Accumulator::Accumulator() {}; +Accumulator::~Accumulator() {}; + + + + + +bool assign_AccumulatorValue_Accumulator(BaseClass*, BaseClass*); +bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Accumulator* element = dynamic_cast(BaseClass_ptr1); + AccumulatorValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->AccumulatorValues.begin(), element->AccumulatorValues.end(), element2) == element->AccumulatorValues.end()) + { + element->AccumulatorValues.push_back(element2); + return assign_AccumulatorValue_Accumulator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AccumulatorLimitSet_Measurements(BaseClass*, BaseClass*); +bool assign_Accumulator_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Accumulator* element = dynamic_cast(BaseClass_ptr1); + AccumulatorLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->LimitSets.begin(), element->LimitSets.end(), element2) == element->LimitSets.end()) + { + element->LimitSets.push_back(element2); + return assign_AccumulatorLimitSet_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Accumulator::debugName[] = "Accumulator"; +const char* Accumulator::debugString() const +{ + return Accumulator::debugName; +} + +void Accumulator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Accumulator"), &Accumulator_factory)); +} + +void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Accumulator::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Accumulator::declare() +{ + return BaseClassDefiner(Accumulator::addConstructToMap, Accumulator::addPrimitiveAssignFnsToMap, Accumulator::addClassAssignFnsToMap, Accumulator::debugName); +} + +namespace CIMPP +{ + BaseClass* Accumulator_factory() + { + return new Accumulator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Accumulator.hpp b/CGMES_2.4.13_18DEC2013/Accumulator.hpp new file mode 100644 index 000000000..04682bcea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Accumulator.hpp @@ -0,0 +1,43 @@ +#ifndef Accumulator_H +#define Accumulator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AccumulatorLimitSet; + class AccumulatorValue; + + /* + Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. + */ + class Accumulator : public Measurement + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Accumulator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp new file mode 100644 index 000000000..93e5dbd54 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorLimit.hpp" + +#include +#include + +#include "AccumulatorLimitSet.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {}; +AccumulatorLimit::~AccumulatorLimit() {}; + + + +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) +{ + AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + AccumulatorLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LimitSet != element2) + { + element->LimitSet = element2; + return assign_AccumulatorLimitSet_Limits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AccumulatorLimit::debugName[] = "AccumulatorLimit"; +const char* AccumulatorLimit::debugString() const +{ + return AccumulatorLimit::debugName; +} + +void AccumulatorLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AccumulatorLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.LimitSet"), &assign_AccumulatorLimit_LimitSet)); +} + +const BaseClassDefiner AccumulatorLimit::declare() +{ + return BaseClassDefiner(AccumulatorLimit::addConstructToMap, AccumulatorLimit::addPrimitiveAssignFnsToMap, AccumulatorLimit::addClassAssignFnsToMap, AccumulatorLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorLimit_factory() + { + return new AccumulatorLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp new file mode 100644 index 000000000..a5959d35c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp @@ -0,0 +1,43 @@ +#ifndef AccumulatorLimit_H +#define AccumulatorLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Limit.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class AccumulatorLimitSet; + + /* + Limit values for Accumulator measurements. + */ + class AccumulatorLimit : public Limit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp new file mode 100644 index 000000000..a7c8f06bc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorLimitSet.hpp" + +#include +#include + +#include "AccumulatorLimit.hpp" +#include "Accumulator.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +AccumulatorLimitSet::AccumulatorLimitSet() {}; +AccumulatorLimitSet::~AccumulatorLimitSet() {}; + + + + +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) +{ + AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + AccumulatorLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Limits.begin(), element->Limits.end(), element2) == element->Limits.end()) + { + element->Limits.push_back(element2); + return assign_AccumulatorLimit_LimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Accumulator_LimitSets(BaseClass*, BaseClass*); +bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + Accumulator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Accumulator_LimitSets(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AccumulatorLimitSet::debugName[] = "AccumulatorLimitSet"; +const char* AccumulatorLimitSet::debugString() const +{ + return AccumulatorLimitSet::debugName; +} + +void AccumulatorLimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner AccumulatorLimitSet::declare() +{ + return BaseClassDefiner(AccumulatorLimitSet::addConstructToMap, AccumulatorLimitSet::addPrimitiveAssignFnsToMap, AccumulatorLimitSet::addClassAssignFnsToMap, AccumulatorLimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorLimitSet_factory() + { + return new AccumulatorLimitSet; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp new file mode 100644 index 000000000..2d76f1b08 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp @@ -0,0 +1,45 @@ +#ifndef AccumulatorLimitSet_H +#define AccumulatorLimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LimitSet.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class Accumulator; + class AccumulatorLimit; + + /* + An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. + */ + class AccumulatorLimitSet : public LimitSet + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorLimitSet_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp new file mode 100644 index 000000000..2a11e50b8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorReset.hpp" + +#include +#include + +#include "AccumulatorValue.hpp" + +using namespace CIMPP; + +AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {}; +AccumulatorReset::~AccumulatorReset() {}; + + + + +bool assign_AccumulatorValue_AccumulatorReset(BaseClass*, BaseClass*); +bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorReset* element = dynamic_cast(BaseClass_ptr1); + AccumulatorValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AccumulatorValue != element2) + { + element->AccumulatorValue = element2; + return assign_AccumulatorValue_AccumulatorReset(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AccumulatorReset::debugName[] = "AccumulatorReset"; +const char* AccumulatorReset::debugString() const +{ + return AccumulatorReset::debugName; +} + +void AccumulatorReset::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AccumulatorReset"), &AccumulatorReset_factory)); +} + +void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void AccumulatorReset::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AccumulatorReset.AccumulatorValue"), &assign_AccumulatorReset_AccumulatorValue)); +} + +const BaseClassDefiner AccumulatorReset::declare() +{ + return BaseClassDefiner(AccumulatorReset::addConstructToMap, AccumulatorReset::addPrimitiveAssignFnsToMap, AccumulatorReset::addClassAssignFnsToMap, AccumulatorReset::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorReset_factory() + { + return new AccumulatorReset; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp new file mode 100644 index 000000000..95415e7b0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp @@ -0,0 +1,41 @@ +#ifndef AccumulatorReset_H +#define AccumulatorReset_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Control.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AccumulatorValue; + + /* + This command reset the counter value to zero. + */ + class AccumulatorReset : public Control + { + public: + /* constructor initialising all attributes to null */ + AccumulatorReset(); + ~AccumulatorReset() override; + + CIMPP::AccumulatorValue* AccumulatorValue; /* The accumulator value that is reset by the command. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorReset_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp new file mode 100644 index 000000000..23e87f8d2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorValue.hpp" + +#include +#include + +#include "Accumulator.hpp" +#include "AccumulatorReset.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {}; +AccumulatorValue::~AccumulatorValue() {}; + + + + +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) +{ + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + Accumulator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Accumulator != element2) + { + element->Accumulator = element2; + return assign_Accumulator_AccumulatorValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AccumulatorReset_AccumulatorValue(BaseClass*, BaseClass*); +bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + AccumulatorReset* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AccumulatorReset != element2) + { + element->AccumulatorReset = element2; + return assign_AccumulatorReset_AccumulatorValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AccumulatorValue::debugName[] = "AccumulatorValue"; +const char* AccumulatorValue::debugString() const +{ + return AccumulatorValue::debugName; +} + +void AccumulatorValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner AccumulatorValue::declare() +{ + return BaseClassDefiner(AccumulatorValue::addConstructToMap, AccumulatorValue::addPrimitiveAssignFnsToMap, AccumulatorValue::addClassAssignFnsToMap, AccumulatorValue::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorValue_factory() + { + return new AccumulatorValue; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp new file mode 100644 index 000000000..4a119c559 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp @@ -0,0 +1,45 @@ +#ifndef AccumulatorValue_H +#define AccumulatorValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class Accumulator; + class AccumulatorReset; + + /* + AccumulatorValue represents an accumulated (counted) MeasurementValue. + */ + class AccumulatorValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorValue_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ActivePower.cpp b/CGMES_2.4.13_18DEC2013/ActivePower.cpp new file mode 100644 index 000000000..d6f48a52a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ActivePower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ActivePower& ActivePower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ActivePower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ActivePower::debugName[] = "ActivePower"; +const char* ActivePower::debugString() const +{ + return ActivePower::debugName; +} + +ActivePower& ActivePower::operator+=(const ActivePower& rhs) +{ + value += rhs.value; + return *this; +} + +ActivePower& ActivePower::operator-=(const ActivePower& rhs) +{ + value -= rhs.value; + return *this; +} + +ActivePower& ActivePower::operator*=(const ActivePower& rhs) +{ + value *= rhs.value; + return *this; +} + +ActivePower& ActivePower::operator/=(const ActivePower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ActivePower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ActivePower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ActivePower.hpp b/CGMES_2.4.13_18DEC2013/ActivePower.hpp new file mode 100644 index 000000000..d1a142af8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ActivePower.hpp @@ -0,0 +1,39 @@ +#ifndef ActivePower_H +#define ActivePower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Product of RMS value of the voltage and the RMS value of the in-phase component of the current. + */ + class ActivePower + { + public: + ActivePower() : value(0.0), initialized(false) {} + ActivePower(long double value) : value(value), initialized(true) {} + + ActivePower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ActivePower& operator+=(const ActivePower& rhs); + ActivePower& operator-=(const ActivePower& rhs); + ActivePower& operator*=(const ActivePower& rhs); + ActivePower& operator/=(const ActivePower& rhs); + + friend std::istream& operator>>(std::istream& lop, ActivePower& rop); + friend std::ostream& operator<<(std::ostream& os, const ActivePower& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp new file mode 100644 index 000000000..d95377339 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePowerLimit.hpp" + +#include +#include + +#include "ActivePower.hpp" + +using namespace CIMPP; + +ActivePowerLimit::ActivePowerLimit() {}; +ActivePowerLimit::~ActivePowerLimit() {}; + + +bool assign_ActivePowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char ActivePowerLimit::debugName[] = "ActivePowerLimit"; +const char* ActivePowerLimit::debugString() const +{ + return ActivePowerLimit::debugName; +} + +void ActivePowerLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ActivePowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ActivePowerLimit::declare() +{ + return BaseClassDefiner(ActivePowerLimit::addConstructToMap, ActivePowerLimit::addPrimitiveAssignFnsToMap, ActivePowerLimit::addClassAssignFnsToMap, ActivePowerLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* ActivePowerLimit_factory() + { + return new ActivePowerLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp new file mode 100644 index 000000000..bc0c71cdb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp @@ -0,0 +1,41 @@ +#ifndef ActivePowerLimit_H +#define ActivePowerLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" + +namespace CIMPP +{ + + /* + Limit on active power flow. + */ + class ActivePowerLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + ActivePowerLimit(); + ~ActivePowerLimit() override; + + CIMPP::ActivePower value; /* Value of active power limit. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ActivePowerLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.cpp b/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.cpp new file mode 100644 index 000000000..9f3064d3a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePowerPerFrequency.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ActivePowerPerFrequency::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ActivePowerPerFrequency::debugName[] = "ActivePowerPerFrequency"; +const char* ActivePowerPerFrequency::debugString() const +{ + return ActivePowerPerFrequency::debugName; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator+=(const ActivePowerPerFrequency& rhs) +{ + value += rhs.value; + return *this; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator-=(const ActivePowerPerFrequency& rhs) +{ + value -= rhs.value; + return *this; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator*=(const ActivePowerPerFrequency& rhs) +{ + value *= rhs.value; + return *this; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator/=(const ActivePowerPerFrequency& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ActivePowerPerFrequency& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ActivePowerPerFrequency& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp b/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp new file mode 100644 index 000000000..f8b5bd3ab --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp @@ -0,0 +1,39 @@ +#ifndef ActivePowerPerFrequency_H +#define ActivePowerPerFrequency_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Active power variation with frequency. + */ + class ActivePowerPerFrequency + { + public: + ActivePowerPerFrequency() : value(0.0), initialized(false) {} + ActivePowerPerFrequency(long double value) : value(value), initialized(true) {} + + ActivePowerPerFrequency& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ActivePowerPerFrequency& operator+=(const ActivePowerPerFrequency& rhs); + ActivePowerPerFrequency& operator-=(const ActivePowerPerFrequency& rhs); + ActivePowerPerFrequency& operator*=(const ActivePowerPerFrequency& rhs); + ActivePowerPerFrequency& operator/=(const ActivePowerPerFrequency& rhs); + + friend std::istream& operator>>(std::istream& lop, ActivePowerPerFrequency& rop); + friend std::ostream& operator<<(std::ostream& os, const ActivePowerPerFrequency& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Analog.cpp b/CGMES_2.4.13_18DEC2013/Analog.cpp new file mode 100644 index 000000000..ed286e5f9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Analog.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Analog.hpp" + +#include +#include + +#include "AnalogValue.hpp" +#include "AnalogLimitSet.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +Analog::Analog() {}; +Analog::~Analog() {}; + + + + +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) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->AnalogValues.begin(), element->AnalogValues.end(), element2) == element->AnalogValues.end()) + { + element->AnalogValues.push_back(element2); + return assign_AnalogValue_Analog(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AnalogLimitSet_Measurements(BaseClass*, BaseClass*); +bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + AnalogLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->LimitSets.begin(), element->LimitSets.end(), element2) == element->LimitSets.end()) + { + element->LimitSets.push_back(element2); + return assign_AnalogLimitSet_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char Analog::debugName[] = "Analog"; +const char* Analog::debugString() const +{ + return Analog::debugName; +} + +void Analog::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Analog::declare() +{ + return BaseClassDefiner(Analog::addConstructToMap, Analog::addPrimitiveAssignFnsToMap, Analog::addClassAssignFnsToMap, Analog::debugName); +} + +namespace CIMPP +{ + BaseClass* Analog_factory() + { + return new Analog; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Analog.hpp b/CGMES_2.4.13_18DEC2013/Analog.hpp new file mode 100644 index 000000000..bbe3e8612 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Analog.hpp @@ -0,0 +1,45 @@ +#ifndef Analog_H +#define Analog_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class AnalogLimitSet; + class AnalogValue; + + /* + Analog represents an analog Measurement. + */ + class Analog : public Measurement + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Analog_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AnalogControl.cpp b/CGMES_2.4.13_18DEC2013/AnalogControl.cpp new file mode 100644 index 000000000..535c82dea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogControl.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogControl.hpp" + +#include +#include + +#include "AnalogValue.hpp" +#include "Simple_Float.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +AnalogControl::AnalogControl() : AnalogValue(nullptr) {}; +AnalogControl::~AnalogControl() {}; + + + +bool assign_AnalogControl_maxValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AnalogControl_minValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); +bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AnalogValue != element2) + { + element->AnalogValue = element2; + return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char AnalogControl::debugName[] = "AnalogControl"; +const char* AnalogControl::debugString() const +{ + return AnalogControl::debugName; +} + +void AnalogControl::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AnalogControl::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AnalogControl.AnalogValue"), &assign_AnalogControl_AnalogValue)); +} + +const BaseClassDefiner AnalogControl::declare() +{ + return BaseClassDefiner(AnalogControl::addConstructToMap, AnalogControl::addPrimitiveAssignFnsToMap, AnalogControl::addClassAssignFnsToMap, AnalogControl::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogControl_factory() + { + return new AnalogControl; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AnalogControl.hpp b/CGMES_2.4.13_18DEC2013/AnalogControl.hpp new file mode 100644 index 000000000..758a9446b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogControl.hpp @@ -0,0 +1,44 @@ +#ifndef AnalogControl_H +#define AnalogControl_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Control.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class AnalogValue; + + /* + An analog control used for supervisory control. + */ + class AnalogControl : public Control + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogControl_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp b/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp new file mode 100644 index 000000000..272232d9d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogLimit.hpp" + +#include +#include + +#include "AnalogLimitSet.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +AnalogLimit::AnalogLimit() : LimitSet(nullptr) {}; +AnalogLimit::~AnalogLimit() {}; + + + +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) +{ + AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + AnalogLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LimitSet != element2) + { + element->LimitSet = element2; + return assign_AnalogLimitSet_Limits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AnalogLimit::debugName[] = "AnalogLimit"; +const char* AnalogLimit::debugString() const +{ + return AnalogLimit::debugName; +} + +void AnalogLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AnalogLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.LimitSet"), &assign_AnalogLimit_LimitSet)); +} + +const BaseClassDefiner AnalogLimit::declare() +{ + return BaseClassDefiner(AnalogLimit::addConstructToMap, AnalogLimit::addPrimitiveAssignFnsToMap, AnalogLimit::addClassAssignFnsToMap, AnalogLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogLimit_factory() + { + return new AnalogLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp b/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp new file mode 100644 index 000000000..52cc400d3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp @@ -0,0 +1,43 @@ +#ifndef AnalogLimit_H +#define AnalogLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Limit.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class AnalogLimitSet; + + /* + Limit values for Analog measurements. + */ + class AnalogLimit : public Limit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp new file mode 100644 index 000000000..f60cc5332 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogLimitSet.hpp" + +#include +#include + +#include "AnalogLimit.hpp" +#include "Analog.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +AnalogLimitSet::AnalogLimitSet() {}; +AnalogLimitSet::~AnalogLimitSet() {}; + + + + +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) +{ + AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + AnalogLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Limits.begin(), element->Limits.end(), element2) == element->Limits.end()) + { + element->Limits.push_back(element2); + return assign_AnalogLimit_LimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Analog_LimitSets(BaseClass*, BaseClass*); +bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + Analog* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Analog_LimitSets(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AnalogLimitSet::debugName[] = "AnalogLimitSet"; +const char* AnalogLimitSet::debugString() const +{ + return AnalogLimitSet::debugName; +} + +void AnalogLimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner AnalogLimitSet::declare() +{ + return BaseClassDefiner(AnalogLimitSet::addConstructToMap, AnalogLimitSet::addPrimitiveAssignFnsToMap, AnalogLimitSet::addClassAssignFnsToMap, AnalogLimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogLimitSet_factory() + { + return new AnalogLimitSet; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp new file mode 100644 index 000000000..49422f1a1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp @@ -0,0 +1,45 @@ +#ifndef AnalogLimitSet_H +#define AnalogLimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LimitSet.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class Analog; + class AnalogLimit; + + /* + An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. + */ + class AnalogLimitSet : public LimitSet + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogLimitSet_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AnalogValue.cpp b/CGMES_2.4.13_18DEC2013/AnalogValue.cpp new file mode 100644 index 000000000..852593e60 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogValue.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogValue.hpp" + +#include +#include + +#include "Analog.hpp" +#include "AnalogControl.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {}; +AnalogValue::~AnalogValue() {}; + + + + +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) +{ + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + Analog* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Analog != element2) + { + element->Analog = element2; + return assign_Analog_AnalogValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AnalogControl_AnalogValue(BaseClass*, BaseClass*); +bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + AnalogControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AnalogControl != element2) + { + element->AnalogControl = element2; + return assign_AnalogControl_AnalogValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AnalogValue::debugName[] = "AnalogValue"; +const char* AnalogValue::debugString() const +{ + return AnalogValue::debugName; +} + +void AnalogValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner AnalogValue::declare() +{ + return BaseClassDefiner(AnalogValue::addConstructToMap, AnalogValue::addPrimitiveAssignFnsToMap, AnalogValue::addClassAssignFnsToMap, AnalogValue::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogValue_factory() + { + return new AnalogValue; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AnalogValue.hpp b/CGMES_2.4.13_18DEC2013/AnalogValue.hpp new file mode 100644 index 000000000..41f13d9b0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AnalogValue.hpp @@ -0,0 +1,45 @@ +#ifndef AnalogValue_H +#define AnalogValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class Analog; + class AnalogControl; + + /* + AnalogValue represents an analog MeasurementValue. + */ + class AnalogValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogValue_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AngleDegrees.cpp b/CGMES_2.4.13_18DEC2013/AngleDegrees.cpp new file mode 100644 index 000000000..01475444f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AngleDegrees.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AngleDegrees.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +AngleDegrees& AngleDegrees::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +AngleDegrees::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char AngleDegrees::debugName[] = "AngleDegrees"; +const char* AngleDegrees::debugString() const +{ + return AngleDegrees::debugName; +} + +AngleDegrees& AngleDegrees::operator+=(const AngleDegrees& rhs) +{ + value += rhs.value; + return *this; +} + +AngleDegrees& AngleDegrees::operator-=(const AngleDegrees& rhs) +{ + value -= rhs.value; + return *this; +} + +AngleDegrees& AngleDegrees::operator*=(const AngleDegrees& rhs) +{ + value *= rhs.value; + return *this; +} + +AngleDegrees& AngleDegrees::operator/=(const AngleDegrees& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, AngleDegrees& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const AngleDegrees& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp b/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp new file mode 100644 index 000000000..39204363b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp @@ -0,0 +1,39 @@ +#ifndef AngleDegrees_H +#define AngleDegrees_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Measurement of angle in degrees. + */ + class AngleDegrees + { + public: + AngleDegrees() : value(0.0), initialized(false) {} + AngleDegrees(long double value) : value(value), initialized(true) {} + + AngleDegrees& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + AngleDegrees& operator+=(const AngleDegrees& rhs); + AngleDegrees& operator-=(const AngleDegrees& rhs); + AngleDegrees& operator*=(const AngleDegrees& rhs); + AngleDegrees& operator/=(const AngleDegrees& rhs); + + friend std::istream& operator>>(std::istream& lop, AngleDegrees& rop); + friend std::ostream& operator<<(std::ostream& os, const AngleDegrees& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AngleRadians.cpp b/CGMES_2.4.13_18DEC2013/AngleRadians.cpp new file mode 100644 index 000000000..bd1b77dbb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AngleRadians.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AngleRadians.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +AngleRadians& AngleRadians::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +AngleRadians::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char AngleRadians::debugName[] = "AngleRadians"; +const char* AngleRadians::debugString() const +{ + return AngleRadians::debugName; +} + +AngleRadians& AngleRadians::operator+=(const AngleRadians& rhs) +{ + value += rhs.value; + return *this; +} + +AngleRadians& AngleRadians::operator-=(const AngleRadians& rhs) +{ + value -= rhs.value; + return *this; +} + +AngleRadians& AngleRadians::operator*=(const AngleRadians& rhs) +{ + value *= rhs.value; + return *this; +} + +AngleRadians& AngleRadians::operator/=(const AngleRadians& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, AngleRadians& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const AngleRadians& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AngleRadians.hpp b/CGMES_2.4.13_18DEC2013/AngleRadians.hpp new file mode 100644 index 000000000..2ac29ff28 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AngleRadians.hpp @@ -0,0 +1,39 @@ +#ifndef AngleRadians_H +#define AngleRadians_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Phase angle in radians. + */ + class AngleRadians + { + public: + AngleRadians() : value(0.0), initialized(false) {} + AngleRadians(long double value) : value(value), initialized(true) {} + + AngleRadians& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + AngleRadians& operator+=(const AngleRadians& rhs); + AngleRadians& operator-=(const AngleRadians& rhs); + AngleRadians& operator*=(const AngleRadians& rhs); + AngleRadians& operator/=(const AngleRadians& rhs); + + friend std::istream& operator>>(std::istream& lop, AngleRadians& rop); + friend std::ostream& operator<<(std::ostream& os, const AngleRadians& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ApparentPower.cpp b/CGMES_2.4.13_18DEC2013/ApparentPower.cpp new file mode 100644 index 000000000..0b8976a61 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ApparentPower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ApparentPower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ApparentPower& ApparentPower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ApparentPower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ApparentPower::debugName[] = "ApparentPower"; +const char* ApparentPower::debugString() const +{ + return ApparentPower::debugName; +} + +ApparentPower& ApparentPower::operator+=(const ApparentPower& rhs) +{ + value += rhs.value; + return *this; +} + +ApparentPower& ApparentPower::operator-=(const ApparentPower& rhs) +{ + value -= rhs.value; + return *this; +} + +ApparentPower& ApparentPower::operator*=(const ApparentPower& rhs) +{ + value *= rhs.value; + return *this; +} + +ApparentPower& ApparentPower::operator/=(const ApparentPower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ApparentPower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ApparentPower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ApparentPower.hpp b/CGMES_2.4.13_18DEC2013/ApparentPower.hpp new file mode 100644 index 000000000..bcb8201e6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ApparentPower.hpp @@ -0,0 +1,39 @@ +#ifndef ApparentPower_H +#define ApparentPower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Product of the RMS value of the voltage and the RMS value of the current. + */ + class ApparentPower + { + public: + ApparentPower() : value(0.0), initialized(false) {} + ApparentPower(long double value) : value(value), initialized(true) {} + + ApparentPower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ApparentPower& operator+=(const ApparentPower& rhs); + ApparentPower& operator-=(const ApparentPower& rhs); + ApparentPower& operator*=(const ApparentPower& rhs); + ApparentPower& operator/=(const ApparentPower& rhs); + + friend std::istream& operator>>(std::istream& lop, ApparentPower& rop); + friend std::ostream& operator<<(std::ostream& os, const ApparentPower& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp new file mode 100644 index 000000000..a4c8c9843 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ApparentPowerLimit.hpp" + +#include +#include + +#include "ApparentPower.hpp" + +using namespace CIMPP; + +ApparentPowerLimit::ApparentPowerLimit() {}; +ApparentPowerLimit::~ApparentPowerLimit() {}; + + +bool assign_ApparentPowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char ApparentPowerLimit::debugName[] = "ApparentPowerLimit"; +const char* ApparentPowerLimit::debugString() const +{ + return ApparentPowerLimit::debugName; +} + +void ApparentPowerLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ApparentPowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ApparentPowerLimit::declare() +{ + return BaseClassDefiner(ApparentPowerLimit::addConstructToMap, ApparentPowerLimit::addPrimitiveAssignFnsToMap, ApparentPowerLimit::addClassAssignFnsToMap, ApparentPowerLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* ApparentPowerLimit_factory() + { + return new ApparentPowerLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp new file mode 100644 index 000000000..3d95bd8fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp @@ -0,0 +1,41 @@ +#ifndef ApparentPowerLimit_H +#define ApparentPowerLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "ApparentPower.hpp" + +namespace CIMPP +{ + + /* + Apparent power limit. + */ + class ApparentPowerLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + ApparentPowerLimit(); + ~ApparentPowerLimit() override; + + CIMPP::ApparentPower value; /* The apparent power limit. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ApparentPowerLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Area.cpp b/CGMES_2.4.13_18DEC2013/Area.cpp new file mode 100644 index 000000000..4a7457802 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Area.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Area.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Area& Area::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Area::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Area::debugName[] = "Area"; +const char* Area::debugString() const +{ + return Area::debugName; +} + +Area& Area::operator+=(const Area& rhs) +{ + value += rhs.value; + return *this; +} + +Area& Area::operator-=(const Area& rhs) +{ + value -= rhs.value; + return *this; +} + +Area& Area::operator*=(const Area& rhs) +{ + value *= rhs.value; + return *this; +} + +Area& Area::operator/=(const Area& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Area& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Area& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Area.hpp b/CGMES_2.4.13_18DEC2013/Area.hpp new file mode 100644 index 000000000..681c909b6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Area.hpp @@ -0,0 +1,39 @@ +#ifndef Area_H +#define Area_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Area. + */ + class Area + { + public: + Area() : value(0.0), initialized(false) {} + Area(long double value) : value(value), initialized(true) {} + + Area& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Area& operator+=(const Area& rhs); + Area& operator-=(const Area& rhs); + Area& operator*=(const Area& rhs); + Area& operator/=(const Area& rhs); + + friend std::istream& operator>>(std::istream& lop, Area& rop); + friend std::ostream& operator<<(std::ostream& os, const Area& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp new file mode 100644 index 000000000..bfaa21afb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachine.hpp" + +#include +#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() {}; + + + +bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->asynchronousMachineType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_converterFedDrive(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->converterFedDrive; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_efficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efficiency; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_iaIrRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iaIrRatio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_nominalFrequency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalFrequency; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_nominalSpeed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalSpeed; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_polePairNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->polePairNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedMechanicalPower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_reversible(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->reversible; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rxLockedRotorRatio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + +const char AsynchronousMachine::debugName[] = "AsynchronousMachine"; +const char* AsynchronousMachine::debugString() const +{ + return AsynchronousMachine::debugName; +} + +void AsynchronousMachine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.AsynchronousMachineDynamics"), &assign_AsynchronousMachine_AsynchronousMachineDynamics)); +} + +const BaseClassDefiner AsynchronousMachine::declare() +{ + return BaseClassDefiner(AsynchronousMachine::addConstructToMap, AsynchronousMachine::addPrimitiveAssignFnsToMap, AsynchronousMachine::addClassAssignFnsToMap, AsynchronousMachine::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachine_factory() + { + return new AsynchronousMachine; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp new file mode 100644 index 000000000..70f2dc771 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp @@ -0,0 +1,59 @@ +#ifndef AsynchronousMachine_H +#define AsynchronousMachine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachine.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "AsynchronousMachineKind.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "Integer.hpp" +#include "PerCent.hpp" +#include "RotationSpeed.hpp" +#include "Simple_Float.hpp" + +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. + */ + class AsynchronousMachine : public RotatingMachine + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachine_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp new file mode 100644 index 000000000..f811c69f4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineDynamics.hpp" + +#include +#include + +#include "AsynchronousMachine.hpp" +#include "MechanicalLoadDynamics.hpp" +#include "TurbineGovernorDynamics.hpp" +#include "WindTurbineType1or2Dynamics.hpp" + +using namespace CIMPP; + +AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {}; +AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {}; + + + + + + + +bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachine != element2) + { + element->AsynchronousMachine = element2; + return assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + MechanicalLoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MechanicalLoadDynamics != element2) + { + element->MechanicalLoadDynamics = element2; + return assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineGovernorDynamics != element2) + { + element->TurbineGovernorDynamics = element2; + return assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2Dynamics != element2) + { + element->WindTurbineType1or2Dynamics = element2; + return assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AsynchronousMachineDynamics::debugName[] = "AsynchronousMachineDynamics"; +const char* AsynchronousMachineDynamics::debugString() const +{ + return AsynchronousMachineDynamics::debugName; +} + +void AsynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics"), &AsynchronousMachineDynamics_factory)); +} + +void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner AsynchronousMachineDynamics::declare() +{ + return BaseClassDefiner(AsynchronousMachineDynamics::addConstructToMap, AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap, AsynchronousMachineDynamics::addClassAssignFnsToMap, AsynchronousMachineDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineDynamics_factory() + { + return new AsynchronousMachineDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp new file mode 100644 index 000000000..f38f33eab --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp @@ -0,0 +1,47 @@ +#ifndef AsynchronousMachineDynamics_H +#define AsynchronousMachineDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AsynchronousMachine; + class MechanicalLoadDynamics; + 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 + */ + class AsynchronousMachineDynamics : public RotatingMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp new file mode 100644 index 000000000..b9fb954b4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineEquivalentCircuit.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {}; +AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {}; + + +bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xlr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xlr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char AsynchronousMachineEquivalentCircuit::debugName[] = "AsynchronousMachineEquivalentCircuit"; +const char* AsynchronousMachineEquivalentCircuit::debugString() const +{ + return AsynchronousMachineEquivalentCircuit::debugName; +} + +void AsynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner AsynchronousMachineEquivalentCircuit::declare() +{ + return BaseClassDefiner(AsynchronousMachineEquivalentCircuit::addConstructToMap, AsynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap, AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap, AsynchronousMachineEquivalentCircuit::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineEquivalentCircuit_factory() + { + return new AsynchronousMachineEquivalentCircuit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp new file mode 100644 index 000000000..5519c7eba --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp @@ -0,0 +1,45 @@ +#ifndef AsynchronousMachineEquivalentCircuit_H +#define AsynchronousMachineEquivalentCircuit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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). + */ + class AsynchronousMachineEquivalentCircuit : public AsynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineEquivalentCircuit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp new file mode 100644 index 000000000..d9b39ecb0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +AsynchronousMachineKind& AsynchronousMachineKind::operator=(AsynchronousMachineKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +AsynchronousMachineKind::operator AsynchronousMachineKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char AsynchronousMachineKind::debugName[] = "AsynchronousMachineKind"; +const char* AsynchronousMachineKind::debugString() const +{ + return AsynchronousMachineKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, AsynchronousMachineKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = AsynchronousMachineKind::generator; + return lop; + } + if(EnumSymbol == "motor") + { + rop = AsynchronousMachineKind::motor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const AsynchronousMachineKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == AsynchronousMachineKind::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == AsynchronousMachineKind::motor) + { + EnumSymbol = "motor"; + } + + if (!EnumSymbol.empty()) + { + os << "AsynchronousMachineKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp new file mode 100644 index 000000000..8b8e54e57 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp @@ -0,0 +1,46 @@ +#ifndef AsynchronousMachineKind_H +#define AsynchronousMachineKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Kind of Asynchronous Machine. + */ + class AsynchronousMachineKind + { + public: + enum AsynchronousMachineKind_ENUM + { + /** + * The Asynchronous Machine is a generator. + */ + generator, + /** + * The Asynchronous Machine is a motor. + */ + motor, + }; + + AsynchronousMachineKind() : value(), initialized(false) {} + AsynchronousMachineKind(AsynchronousMachineKind_ENUM value) : value(value), initialized(true) {} + + AsynchronousMachineKind& operator=(AsynchronousMachineKind_ENUM rop); + operator AsynchronousMachineKind_ENUM() const; + + AsynchronousMachineKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, AsynchronousMachineKind& rop); + friend std::ostream& operator<<(std::ostream& os, const AsynchronousMachineKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp new file mode 100644 index 000000000..94ba0f056 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineTimeConstantReactance.hpp" + +#include +#include + +#include "Seconds.hpp" +#include "Seconds.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {}; +AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {}; + + +bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char AsynchronousMachineTimeConstantReactance::debugName[] = "AsynchronousMachineTimeConstantReactance"; +const char* AsynchronousMachineTimeConstantReactance::debugString() const +{ + return AsynchronousMachineTimeConstantReactance::debugName; +} + +void AsynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner AsynchronousMachineTimeConstantReactance::declare() +{ + return BaseClassDefiner(AsynchronousMachineTimeConstantReactance::addConstructToMap, AsynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap, AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap, AsynchronousMachineTimeConstantReactance::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineTimeConstantReactance_factory() + { + return new AsynchronousMachineTimeConstantReactance; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp new file mode 100644 index 000000000..41439b66e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp @@ -0,0 +1,46 @@ +#ifndef AsynchronousMachineTimeConstantReactance_H +#define AsynchronousMachineTimeConstantReactance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + The parameters used for models expressed in time constant reactance form include: + */ + class AsynchronousMachineTimeConstantReactance : public AsynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineTimeConstantReactance_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp new file mode 100644 index 000000000..d156c07b9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {}; +AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {}; + + + +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) +{ + AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AsynchronousMachineUserDefined::debugName[] = "AsynchronousMachineUserDefined"; +const char* AsynchronousMachineUserDefined::debugString() const +{ + return AsynchronousMachineUserDefined::debugName; +} + +void AsynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner AsynchronousMachineUserDefined::declare() +{ + return BaseClassDefiner(AsynchronousMachineUserDefined::addConstructToMap, AsynchronousMachineUserDefined::addPrimitiveAssignFnsToMap, AsynchronousMachineUserDefined::addClassAssignFnsToMap, AsynchronousMachineUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineUserDefined_factory() + { + return new AsynchronousMachineUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp new file mode 100644 index 000000000..cd49c741b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef AsynchronousMachineUserDefined_H +#define AsynchronousMachineUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Asynchronous machine whose dynamic behaviour is described by a user-defined model. + */ + class AsynchronousMachineUserDefined : public AsynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp b/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp new file mode 100644 index 000000000..606b000c3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BaseVoltage.hpp" + +#include +#include + +#include "ConductingEquipment.hpp" +#include "TopologicalNode.hpp" +#include "TransformerEnd.hpp" +#include "VoltageLevel.hpp" +#include "Voltage.hpp" + +using namespace CIMPP; + +BaseVoltage::BaseVoltage() {}; +BaseVoltage::~BaseVoltage() {}; + + + + + + +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) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + ConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConductingEquipment.begin(), element->ConductingEquipment.end(), element2) == element->ConductingEquipment.end()) + { + element->ConductingEquipment.push_back(element2); + return assign_ConductingEquipment_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_BaseVoltage(BaseClass*, BaseClass*); +bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNode.begin(), element->TopologicalNode.end(), element2) == element->TopologicalNode.end()) + { + element->TopologicalNode.push_back(element2); + return assign_TopologicalNode_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TransformerEnd_BaseVoltage(BaseClass*, BaseClass*); +bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TransformerEnds.begin(), element->TransformerEnds.end(), element2) == element->TransformerEnds.end()) + { + element->TransformerEnds.push_back(element2); + return assign_TransformerEnd_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageLevel_BaseVoltage(BaseClass*, BaseClass*); +bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + VoltageLevel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VoltageLevel.begin(), element->VoltageLevel.end(), element2) == element->VoltageLevel.end()) + { + element->VoltageLevel.push_back(element2); + return assign_VoltageLevel_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char BaseVoltage::debugName[] = "BaseVoltage"; +const char* BaseVoltage::debugString() const +{ + return BaseVoltage::debugName; +} + +void BaseVoltage::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner BaseVoltage::declare() +{ + return BaseClassDefiner(BaseVoltage::addConstructToMap, BaseVoltage::addPrimitiveAssignFnsToMap, BaseVoltage::addClassAssignFnsToMap, BaseVoltage::debugName); +} + +namespace CIMPP +{ + BaseClass* BaseVoltage_factory() + { + return new BaseVoltage; + } +} diff --git a/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp b/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp new file mode 100644 index 000000000..063a85c09 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp @@ -0,0 +1,49 @@ +#ifndef BaseVoltage_H +#define BaseVoltage_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class ConductingEquipment; + class TopologicalNode; + class TransformerEnd; + class VoltageLevel; + + /* + Defines a system base voltage which is referenced. + */ + class BaseVoltage : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BaseVoltage_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp new file mode 100644 index 000000000..a860a0268 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BasicIntervalSchedule.hpp" + +#include +#include + +#include "DateTime.hpp" +#include "UnitSymbol.hpp" +#include "UnitSymbol.hpp" + +using namespace CIMPP; + +BasicIntervalSchedule::BasicIntervalSchedule() {}; +BasicIntervalSchedule::~BasicIntervalSchedule() {}; + + +bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + element->startTime = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BasicIntervalSchedule_value1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value1Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BasicIntervalSchedule_value2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value2Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char BasicIntervalSchedule::debugName[] = "BasicIntervalSchedule"; +const char* BasicIntervalSchedule::debugString() const +{ + return BasicIntervalSchedule::debugName; +} + +void BasicIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void BasicIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner BasicIntervalSchedule::declare() +{ + return BaseClassDefiner(BasicIntervalSchedule::addConstructToMap, BasicIntervalSchedule::addPrimitiveAssignFnsToMap, BasicIntervalSchedule::addClassAssignFnsToMap, BasicIntervalSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* BasicIntervalSchedule_factory() + { + return new BasicIntervalSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp new file mode 100644 index 000000000..f6234c2db --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp @@ -0,0 +1,44 @@ +#ifndef BasicIntervalSchedule_H +#define BasicIntervalSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "UnitSymbol.hpp" + +namespace CIMPP +{ + + /* + Schedule of values at points in time. + */ + class BasicIntervalSchedule : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BasicIntervalSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Bay.cpp b/CGMES_2.4.13_18DEC2013/Bay.cpp new file mode 100644 index 000000000..0213393ce --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Bay.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Bay.hpp" + +#include +#include + +#include "VoltageLevel.hpp" + +using namespace CIMPP; + +Bay::Bay() : VoltageLevel(nullptr) {}; +Bay::~Bay() {}; + + + + +bool assign_VoltageLevel_Bays(BaseClass*, BaseClass*); +bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Bay* element = dynamic_cast(BaseClass_ptr1); + VoltageLevel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageLevel != element2) + { + element->VoltageLevel = element2; + return assign_VoltageLevel_Bays(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Bay::debugName[] = "Bay"; +const char* Bay::debugString() const +{ + return Bay::debugName; +} + +void Bay::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Bay"), &Bay_factory)); +} + +void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Bay::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Bay.VoltageLevel"), &assign_Bay_VoltageLevel)); +} + +const BaseClassDefiner Bay::declare() +{ + return BaseClassDefiner(Bay::addConstructToMap, Bay::addPrimitiveAssignFnsToMap, Bay::addClassAssignFnsToMap, Bay::debugName); +} + +namespace CIMPP +{ + BaseClass* Bay_factory() + { + return new Bay; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Bay.hpp b/CGMES_2.4.13_18DEC2013/Bay.hpp new file mode 100644 index 000000000..4f08b2d5e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Bay.hpp @@ -0,0 +1,41 @@ +#ifndef Bay_H +#define Bay_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Bay : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + Bay(); + ~Bay() override; + + CIMPP::VoltageLevel* VoltageLevel; /* The voltage level containing this bay. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Bay_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Breaker.cpp b/CGMES_2.4.13_18DEC2013/Breaker.cpp new file mode 100644 index 000000000..ecee41d5b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Breaker.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Breaker.hpp" + +#include +#include + + +using namespace CIMPP; + +Breaker::Breaker() {}; +Breaker::~Breaker() {}; + + + +const char Breaker::debugName[] = "Breaker"; +const char* Breaker::debugString() const +{ + return Breaker::debugName; +} + +void Breaker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Breaker"), &Breaker_factory)); +} + +void Breaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Breaker::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Breaker::declare() +{ + return BaseClassDefiner(Breaker::addConstructToMap, Breaker::addPrimitiveAssignFnsToMap, Breaker::addClassAssignFnsToMap, Breaker::debugName); +} + +namespace CIMPP +{ + BaseClass* Breaker_factory() + { + return new Breaker; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Breaker.hpp b/CGMES_2.4.13_18DEC2013/Breaker.hpp new file mode 100644 index 000000000..b1047a3fd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Breaker.hpp @@ -0,0 +1,39 @@ +#ifndef Breaker_H +#define Breaker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ProtectedSwitch.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Breaker : public ProtectedSwitch + { + public: + /* constructor initialising all attributes to null */ + Breaker(); + ~Breaker() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Breaker_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp b/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp new file mode 100644 index 000000000..a3e65dbd1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BusNameMarker.hpp" + +#include +#include + +#include "ReportingGroup.hpp" +#include "ACDCTerminal.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {}; +BusNameMarker::~BusNameMarker() {}; + + + + +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) +{ + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + ReportingGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReportingGroup != element2) + { + element->ReportingGroup = element2; + return assign_ReportingGroup_BusNameMarker(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCTerminal_BusNameMarker(BaseClass*, BaseClass*); +bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Terminal.begin(), element->Terminal.end(), element2) == element->Terminal.end()) + { + element->Terminal.push_back(element2); + return assign_ACDCTerminal_BusNameMarker(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char BusNameMarker::debugName[] = "BusNameMarker"; +const char* BusNameMarker::debugString() const +{ + return BusNameMarker::debugName; +} + +void BusNameMarker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner BusNameMarker::declare() +{ + return BaseClassDefiner(BusNameMarker::addConstructToMap, BusNameMarker::addPrimitiveAssignFnsToMap, BusNameMarker::addClassAssignFnsToMap, BusNameMarker::debugName); +} + +namespace CIMPP +{ + BaseClass* BusNameMarker_factory() + { + return new BusNameMarker; + } +} diff --git a/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp b/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp new file mode 100644 index 000000000..353cf9798 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp @@ -0,0 +1,45 @@ +#ifndef BusNameMarker_H +#define BusNameMarker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +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. + */ + class BusNameMarker : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BusNameMarker_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/BusbarSection.cpp b/CGMES_2.4.13_18DEC2013/BusbarSection.cpp new file mode 100644 index 000000000..eff584525 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BusbarSection.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BusbarSection.hpp" + +#include +#include + +#include "CurrentFlow.hpp" + +using namespace CIMPP; + +BusbarSection::BusbarSection() {}; +BusbarSection::~BusbarSection() {}; + + +bool assign_BusbarSection_ipMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ipMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char BusbarSection::debugName[] = "BusbarSection"; +const char* BusbarSection::debugString() const +{ + return BusbarSection::debugName; +} + +void BusbarSection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void BusbarSection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner BusbarSection::declare() +{ + return BaseClassDefiner(BusbarSection::addConstructToMap, BusbarSection::addPrimitiveAssignFnsToMap, BusbarSection::addClassAssignFnsToMap, BusbarSection::debugName); +} + +namespace CIMPP +{ + BaseClass* BusbarSection_factory() + { + return new BusbarSection; + } +} diff --git a/CGMES_2.4.13_18DEC2013/BusbarSection.hpp b/CGMES_2.4.13_18DEC2013/BusbarSection.hpp new file mode 100644 index 000000000..46d62de78 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/BusbarSection.hpp @@ -0,0 +1,41 @@ +#ifndef BusbarSection_H +#define BusbarSection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Connector.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" + +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. + */ + class BusbarSection : public Connector + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BusbarSection_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CIMClassList.hpp b/CGMES_2.4.13_18DEC2013/CIMClassList.hpp new file mode 100644 index 000000000..8a65daee6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CIMClassList.hpp @@ -0,0 +1,409 @@ +#ifndef CIMCLASSLIST_H +#define CIMCLASSLIST_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include +#include "IEC61970.hpp" +using namespace CIMPP; +static std::list CIMClassList = +{ + ACDCConverter::declare(), + ACDCConverterDCTerminal::declare(), + ACDCTerminal::declare(), + ACLineSegment::declare(), + Accumulator::declare(), + AccumulatorLimit::declare(), + AccumulatorLimitSet::declare(), + AccumulatorReset::declare(), + AccumulatorValue::declare(), + ActivePowerLimit::declare(), + Analog::declare(), + AnalogControl::declare(), + AnalogLimit::declare(), + AnalogLimitSet::declare(), + AnalogValue::declare(), + ApparentPowerLimit::declare(), + AsynchronousMachine::declare(), + AsynchronousMachineDynamics::declare(), + AsynchronousMachineEquivalentCircuit::declare(), + AsynchronousMachineTimeConstantReactance::declare(), + AsynchronousMachineUserDefined::declare(), + BaseVoltage::declare(), + BasicIntervalSchedule::declare(), + Bay::declare(), + Breaker::declare(), + BusNameMarker::declare(), + BusbarSection::declare(), + Command::declare(), + ConductingEquipment::declare(), + Conductor::declare(), + ConformLoad::declare(), + ConformLoadGroup::declare(), + ConformLoadSchedule::declare(), + ConnectivityNode::declare(), + ConnectivityNodeContainer::declare(), + Connector::declare(), + Control::declare(), + ControlArea::declare(), + ControlAreaGeneratingUnit::declare(), + CoordinateSystem::declare(), + CsConverter::declare(), + CurrentLimit::declare(), + Curve::declare(), + CurveData::declare(), + DCBaseTerminal::declare(), + DCBreaker::declare(), + DCBusbar::declare(), + DCChopper::declare(), + DCConductingEquipment::declare(), + DCConverterUnit::declare(), + DCDisconnector::declare(), + DCEquipmentContainer::declare(), + DCGround::declare(), + DCLine::declare(), + DCLineSegment::declare(), + DCNode::declare(), + DCSeriesDevice::declare(), + DCShunt::declare(), + DCSwitch::declare(), + DCTerminal::declare(), + DCTopologicalIsland::declare(), + DCTopologicalNode::declare(), + DayType::declare(), + Diagram::declare(), + DiagramLayoutVersion::declare(), + DiagramObject::declare(), + DiagramObjectGluePoint::declare(), + DiagramObjectPoint::declare(), + DiagramObjectStyle::declare(), + DiagramStyle::declare(), + DiscExcContIEEEDEC1A::declare(), + DiscExcContIEEEDEC2A::declare(), + DiscExcContIEEEDEC3A::declare(), + Disconnector::declare(), + DiscontinuousExcitationControlDynamics::declare(), + DiscontinuousExcitationControlUserDefined::declare(), + Discrete::declare(), + DiscreteValue::declare(), + DynamicsFunctionBlock::declare(), + DynamicsVersion::declare(), + EarthFaultCompensator::declare(), + EnergyArea::declare(), + EnergyConsumer::declare(), + EnergySchedulingType::declare(), + EnergySource::declare(), + Equipment::declare(), + EquipmentBoundaryVersion::declare(), + EquipmentContainer::declare(), + EquipmentVersion::declare(), + EquivalentBranch::declare(), + EquivalentEquipment::declare(), + EquivalentInjection::declare(), + EquivalentNetwork::declare(), + EquivalentShunt::declare(), + ExcAC1A::declare(), + ExcAC2A::declare(), + ExcAC3A::declare(), + ExcAC4A::declare(), + ExcAC5A::declare(), + ExcAC6A::declare(), + ExcAC8B::declare(), + ExcANS::declare(), + ExcAVR1::declare(), + ExcAVR2::declare(), + ExcAVR3::declare(), + ExcAVR4::declare(), + ExcAVR5::declare(), + ExcAVR7::declare(), + ExcBBC::declare(), + ExcCZ::declare(), + ExcDC1A::declare(), + ExcDC2A::declare(), + ExcDC3A::declare(), + ExcDC3A1::declare(), + ExcELIN1::declare(), + ExcELIN2::declare(), + ExcHU::declare(), + ExcIEEEAC1A::declare(), + ExcIEEEAC2A::declare(), + ExcIEEEAC3A::declare(), + ExcIEEEAC4A::declare(), + ExcIEEEAC5A::declare(), + ExcIEEEAC6A::declare(), + ExcIEEEAC7B::declare(), + ExcIEEEAC8B::declare(), + ExcIEEEDC1A::declare(), + ExcIEEEDC2A::declare(), + ExcIEEEDC3A::declare(), + ExcIEEEDC4B::declare(), + ExcIEEEST1A::declare(), + ExcIEEEST2A::declare(), + ExcIEEEST3A::declare(), + ExcIEEEST4B::declare(), + ExcIEEEST5B::declare(), + ExcIEEEST6B::declare(), + ExcIEEEST7B::declare(), + ExcOEX3T::declare(), + ExcPIC::declare(), + ExcREXS::declare(), + ExcSCRX::declare(), + ExcSEXS::declare(), + ExcSK::declare(), + ExcST1A::declare(), + ExcST2A::declare(), + ExcST3A::declare(), + ExcST4B::declare(), + ExcST6B::declare(), + ExcST7B::declare(), + ExcitationSystemDynamics::declare(), + ExcitationSystemUserDefined::declare(), + ExternalNetworkInjection::declare(), + FossilFuel::declare(), + GenICompensationForGenJ::declare(), + GeneratingUnit::declare(), + GeographicalLocationVersion::declare(), + GeographicalRegion::declare(), + GovCT1::declare(), + GovCT2::declare(), + GovGAST::declare(), + GovGAST1::declare(), + GovGAST2::declare(), + GovGAST3::declare(), + GovGAST4::declare(), + GovGASTWD::declare(), + GovHydro1::declare(), + GovHydro2::declare(), + GovHydro3::declare(), + GovHydro4::declare(), + GovHydroDD::declare(), + GovHydroFrancis::declare(), + GovHydroIEEE0::declare(), + GovHydroIEEE2::declare(), + GovHydroPID::declare(), + GovHydroPID2::declare(), + GovHydroPelton::declare(), + GovHydroR::declare(), + GovHydroWEH::declare(), + GovHydroWPID::declare(), + GovSteam0::declare(), + GovSteam1::declare(), + GovSteam2::declare(), + GovSteamCC::declare(), + GovSteamEU::declare(), + GovSteamFV2::declare(), + GovSteamFV3::declare(), + GovSteamFV4::declare(), + GovSteamIEEE1::declare(), + GovSteamSGO::declare(), + GrossToNetActivePowerCurve::declare(), + Ground::declare(), + GroundDisconnector::declare(), + GroundingImpedance::declare(), + HydroGeneratingUnit::declare(), + HydroPowerPlant::declare(), + HydroPump::declare(), + IdentifiedObject::declare(), + Junction::declare(), + Limit::declare(), + LimitSet::declare(), + Line::declare(), + LinearShuntCompensator::declare(), + LoadAggregate::declare(), + LoadArea::declare(), + LoadBreakSwitch::declare(), + LoadComposite::declare(), + LoadDynamics::declare(), + LoadGenericNonLinear::declare(), + LoadGroup::declare(), + LoadMotor::declare(), + LoadResponseCharacteristic::declare(), + LoadStatic::declare(), + LoadUserDefined::declare(), + Location::declare(), + Measurement::declare(), + MeasurementValue::declare(), + MeasurementValueQuality::declare(), + MeasurementValueSource::declare(), + MechLoad1::declare(), + MechanicalLoadDynamics::declare(), + MechanicalLoadUserDefined::declare(), + MutualCoupling::declare(), + NonConformLoad::declare(), + NonConformLoadGroup::declare(), + NonConformLoadSchedule::declare(), + NonlinearShuntCompensator::declare(), + NonlinearShuntCompensatorPoint::declare(), + NuclearGeneratingUnit::declare(), + OperationalLimit::declare(), + OperationalLimitSet::declare(), + OperationalLimitType::declare(), + OverexcLim2::declare(), + OverexcLimIEEE::declare(), + OverexcLimX1::declare(), + OverexcLimX2::declare(), + OverexcitationLimiterDynamics::declare(), + OverexcitationLimiterUserDefined::declare(), + PFVArControllerType1Dynamics::declare(), + PFVArControllerType1UserDefined::declare(), + PFVArControllerType2Dynamics::declare(), + PFVArControllerType2UserDefined::declare(), + PFVArType1IEEEPFController::declare(), + PFVArType1IEEEVArController::declare(), + PFVArType2Common1::declare(), + PFVArType2IEEEPFController::declare(), + PFVArType2IEEEVArController::declare(), + PerLengthDCLineParameter::declare(), + PetersenCoil::declare(), + PhaseTapChanger::declare(), + PhaseTapChangerAsymmetrical::declare(), + PhaseTapChangerLinear::declare(), + PhaseTapChangerNonLinear::declare(), + PhaseTapChangerSymmetrical::declare(), + PhaseTapChangerTable::declare(), + PhaseTapChangerTablePoint::declare(), + PhaseTapChangerTabular::declare(), + PositionPoint::declare(), + PowerSystemResource::declare(), + PowerSystemStabilizerDynamics::declare(), + PowerSystemStabilizerUserDefined::declare(), + PowerTransformer::declare(), + PowerTransformerEnd::declare(), + ProprietaryParameterDynamics::declare(), + ProtectedSwitch::declare(), + Pss1::declare(), + Pss1A::declare(), + Pss2B::declare(), + Pss2ST::declare(), + Pss5::declare(), + PssELIN2::declare(), + PssIEEE1A::declare(), + PssIEEE2B::declare(), + PssIEEE3B::declare(), + PssIEEE4B::declare(), + PssPTIST1::declare(), + PssPTIST3::declare(), + PssSB4::declare(), + PssSH::declare(), + PssSK::declare(), + PssWECC::declare(), + Quality61850::declare(), + RaiseLowerCommand::declare(), + RatioTapChanger::declare(), + RatioTapChangerTable::declare(), + RatioTapChangerTablePoint::declare(), + ReactiveCapabilityCurve::declare(), + RegularIntervalSchedule::declare(), + RegularTimePoint::declare(), + RegulatingCondEq::declare(), + RegulatingControl::declare(), + RegulationSchedule::declare(), + RemoteInputSignal::declare(), + ReportingGroup::declare(), + RotatingMachine::declare(), + RotatingMachineDynamics::declare(), + Season::declare(), + SeasonDayTypeSchedule::declare(), + SeriesCompensator::declare(), + SetPoint::declare(), + ShuntCompensator::declare(), + SolarGeneratingUnit::declare(), + StateVariablesVersion::declare(), + StaticVarCompensator::declare(), + StationSupply::declare(), + SteadyStateHypothesisVersion::declare(), + StringMeasurement::declare(), + StringMeasurementValue::declare(), + SubGeographicalRegion::declare(), + SubLoadArea::declare(), + Substation::declare(), + SvInjection::declare(), + SvPowerFlow::declare(), + SvShuntCompensatorSections::declare(), + SvStatus::declare(), + SvTapStep::declare(), + SvVoltage::declare(), + Switch::declare(), + SwitchSchedule::declare(), + SynchronousMachine::declare(), + SynchronousMachineDetailed::declare(), + SynchronousMachineDynamics::declare(), + SynchronousMachineEquivalentCircuit::declare(), + SynchronousMachineSimplified::declare(), + SynchronousMachineTimeConstantReactance::declare(), + SynchronousMachineUserDefined::declare(), + TapChanger::declare(), + TapChangerControl::declare(), + TapChangerTablePoint::declare(), + TapSchedule::declare(), + Terminal::declare(), + TextDiagramObject::declare(), + ThermalGeneratingUnit::declare(), + TieFlow::declare(), + TopologicalIsland::declare(), + TopologicalNode::declare(), + TopologyBoundaryVersion::declare(), + TopologyVersion::declare(), + TransformerEnd::declare(), + TurbLCFB1::declare(), + TurbineGovernorDynamics::declare(), + TurbineGovernorUserDefined::declare(), + TurbineLoadControllerDynamics::declare(), + TurbineLoadControllerUserDefined::declare(), + UnderexcLim2Simplified::declare(), + UnderexcLimIEEE1::declare(), + UnderexcLimIEEE2::declare(), + UnderexcLimX1::declare(), + UnderexcLimX2::declare(), + UnderexcitationLimiterDynamics::declare(), + UnderexcitationLimiterUserDefined::declare(), + VAdjIEEE::declare(), + VCompIEEEType1::declare(), + VCompIEEEType2::declare(), + ValueAliasSet::declare(), + ValueToAlias::declare(), + VisibilityLayer::declare(), + VoltageAdjusterDynamics::declare(), + VoltageAdjusterUserDefined::declare(), + VoltageCompensatorDynamics::declare(), + VoltageCompensatorUserDefined::declare(), + VoltageLevel::declare(), + VoltageLimit::declare(), + VsCapabilityCurve::declare(), + VsConverter::declare(), + WindAeroConstIEC::declare(), + WindAeroLinearIEC::declare(), + WindContCurrLimIEC::declare(), + WindContPType3IEC::declare(), + WindContPType4aIEC::declare(), + WindContPType4bIEC::declare(), + WindContPitchAngleIEC::declare(), + WindContQIEC::declare(), + WindContRotorRIEC::declare(), + WindDynamicsLookupTable::declare(), + WindGenTurbineType1IEC::declare(), + WindGenTurbineType2IEC::declare(), + WindGenTurbineType3IEC::declare(), + WindGenTurbineType3aIEC::declare(), + WindGenTurbineType3bIEC::declare(), + WindGenType4IEC::declare(), + WindGeneratingUnit::declare(), + WindMechIEC::declare(), + WindPitchContEmulIEC::declare(), + WindPlantDynamics::declare(), + WindPlantFreqPcontrolIEC::declare(), + WindPlantIEC::declare(), + WindPlantReactiveControlIEC::declare(), + WindPlantUserDefined::declare(), + WindProtectionIEC::declare(), + WindTurbineType1or2Dynamics::declare(), + WindTurbineType1or2IEC::declare(), + WindTurbineType3or4Dynamics::declare(), + WindTurbineType3or4IEC::declare(), + WindTurbineType4aIEC::declare(), + WindTurbineType4bIEC::declare(), + WindType1or2UserDefined::declare(), + WindType3or4UserDefined::declare(), + UnknownType::declare(), +}; +#endif // CIMCLASSLIST_H diff --git a/CGMES_2.4.13_18DEC2013/Capacitance.cpp b/CGMES_2.4.13_18DEC2013/Capacitance.cpp new file mode 100644 index 000000000..79261bc63 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Capacitance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Capacitance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Capacitance& Capacitance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Capacitance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Capacitance::debugName[] = "Capacitance"; +const char* Capacitance::debugString() const +{ + return Capacitance::debugName; +} + +Capacitance& Capacitance::operator+=(const Capacitance& rhs) +{ + value += rhs.value; + return *this; +} + +Capacitance& Capacitance::operator-=(const Capacitance& rhs) +{ + value -= rhs.value; + return *this; +} + +Capacitance& Capacitance::operator*=(const Capacitance& rhs) +{ + value *= rhs.value; + return *this; +} + +Capacitance& Capacitance::operator/=(const Capacitance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Capacitance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Capacitance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Capacitance.hpp b/CGMES_2.4.13_18DEC2013/Capacitance.hpp new file mode 100644 index 000000000..0f2f8bad2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Capacitance.hpp @@ -0,0 +1,39 @@ +#ifndef Capacitance_H +#define Capacitance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Capacitive part of reactance (imaginary part of impedance), at rated frequency. + */ + class Capacitance + { + public: + Capacitance() : value(0.0), initialized(false) {} + Capacitance(long double value) : value(value), initialized(true) {} + + Capacitance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Capacitance& operator+=(const Capacitance& rhs); + Capacitance& operator-=(const Capacitance& rhs); + Capacitance& operator*=(const Capacitance& rhs); + Capacitance& operator/=(const Capacitance& rhs); + + friend std::istream& operator>>(std::istream& lop, Capacitance& rop); + friend std::ostream& operator<<(std::ostream& os, const Capacitance& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CapacitancePerLength.cpp b/CGMES_2.4.13_18DEC2013/CapacitancePerLength.cpp new file mode 100644 index 000000000..213af0ce1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CapacitancePerLength.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CapacitancePerLength.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CapacitancePerLength& CapacitancePerLength::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +CapacitancePerLength::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CapacitancePerLength::debugName[] = "CapacitancePerLength"; +const char* CapacitancePerLength::debugString() const +{ + return CapacitancePerLength::debugName; +} + +CapacitancePerLength& CapacitancePerLength::operator+=(const CapacitancePerLength& rhs) +{ + value += rhs.value; + return *this; +} + +CapacitancePerLength& CapacitancePerLength::operator-=(const CapacitancePerLength& rhs) +{ + value -= rhs.value; + return *this; +} + +CapacitancePerLength& CapacitancePerLength::operator*=(const CapacitancePerLength& rhs) +{ + value *= rhs.value; + return *this; +} + +CapacitancePerLength& CapacitancePerLength::operator/=(const CapacitancePerLength& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CapacitancePerLength& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CapacitancePerLength& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp b/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp new file mode 100644 index 000000000..b38d961b2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp @@ -0,0 +1,39 @@ +#ifndef CapacitancePerLength_H +#define CapacitancePerLength_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Capacitance per unit of length. + */ + class CapacitancePerLength + { + public: + CapacitancePerLength() : value(0.0), initialized(false) {} + CapacitancePerLength(long double value) : value(value), initialized(true) {} + + CapacitancePerLength& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + CapacitancePerLength& operator+=(const CapacitancePerLength& rhs); + CapacitancePerLength& operator-=(const CapacitancePerLength& rhs); + CapacitancePerLength& operator*=(const CapacitancePerLength& rhs); + CapacitancePerLength& operator/=(const CapacitancePerLength& rhs); + + friend std::istream& operator>>(std::istream& lop, CapacitancePerLength& rop); + friend std::ostream& operator<<(std::ostream& os, const CapacitancePerLength& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Command.cpp b/CGMES_2.4.13_18DEC2013/Command.cpp new file mode 100644 index 000000000..3c4de5e5f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Command.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Command.hpp" + +#include +#include + +#include "DiscreteValue.hpp" +#include "ValueAliasSet.hpp" +#include "Integer.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {}; +Command::~Command() {}; + + + + +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) +{ + Command* element = dynamic_cast(BaseClass_ptr1); + DiscreteValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscreteValue != element2) + { + element->DiscreteValue = element2; + return assign_DiscreteValue_Command(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ValueAliasSet_Commands(BaseClass*, BaseClass*); +bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Command* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_Commands(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char Command::debugName[] = "Command"; +const char* Command::debugString() const +{ + return Command::debugName; +} + +void Command::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Command::declare() +{ + return BaseClassDefiner(Command::addConstructToMap, Command::addPrimitiveAssignFnsToMap, Command::addClassAssignFnsToMap, Command::debugName); +} + +namespace CIMPP +{ + BaseClass* Command_factory() + { + return new Command; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Command.hpp b/CGMES_2.4.13_18DEC2013/Command.hpp new file mode 100644 index 000000000..5131e4978 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Command.hpp @@ -0,0 +1,46 @@ +#ifndef Command_H +#define Command_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Control.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class DiscreteValue; + class ValueAliasSet; + + /* + A Command is a discrete control used for supervisory control. + */ + class Command : public Control + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Command_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Conductance.cpp b/CGMES_2.4.13_18DEC2013/Conductance.cpp new file mode 100644 index 000000000..a9bb89d1f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Conductance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Conductance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Conductance& Conductance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Conductance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Conductance::debugName[] = "Conductance"; +const char* Conductance::debugString() const +{ + return Conductance::debugName; +} + +Conductance& Conductance::operator+=(const Conductance& rhs) +{ + value += rhs.value; + return *this; +} + +Conductance& Conductance::operator-=(const Conductance& rhs) +{ + value -= rhs.value; + return *this; +} + +Conductance& Conductance::operator*=(const Conductance& rhs) +{ + value *= rhs.value; + return *this; +} + +Conductance& Conductance::operator/=(const Conductance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Conductance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Conductance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Conductance.hpp b/CGMES_2.4.13_18DEC2013/Conductance.hpp new file mode 100644 index 000000000..6a99df04e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Conductance.hpp @@ -0,0 +1,39 @@ +#ifndef Conductance_H +#define Conductance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. + */ + class Conductance + { + public: + Conductance() : value(0.0), initialized(false) {} + Conductance(long double value) : value(value), initialized(true) {} + + Conductance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Conductance& operator+=(const Conductance& rhs); + Conductance& operator-=(const Conductance& rhs); + Conductance& operator*=(const Conductance& rhs); + Conductance& operator/=(const Conductance& rhs); + + friend std::istream& operator>>(std::istream& lop, Conductance& rop); + friend std::ostream& operator<<(std::ostream& os, const Conductance& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp b/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp new file mode 100644 index 000000000..75fda89e3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConductingEquipment.hpp" + +#include +#include + +#include "BaseVoltage.hpp" +#include "SvStatus.hpp" +#include "Terminal.hpp" + +using namespace CIMPP; + +ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {}; +ConductingEquipment::~ConductingEquipment() {}; + + + + + + +bool assign_BaseVoltage_ConductingEquipment(BaseClass*, BaseClass*); +bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_ConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvStatus_ConductingEquipment(BaseClass*, BaseClass*); +bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + SvStatus* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvStatus != element2) + { + element->SvStatus = element2; + return assign_SvStatus_ConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_ConductingEquipment(BaseClass*, BaseClass*); +bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + { + element->Terminals.push_back(element2); + return assign_Terminal_ConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConductingEquipment::debugName[] = "ConductingEquipment"; +const char* ConductingEquipment::debugString() const +{ + return ConductingEquipment::debugName; +} + +void ConductingEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConductingEquipment"), &ConductingEquipment_factory)); +} + +void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConductingEquipment::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConductingEquipment::declare() +{ + return BaseClassDefiner(ConductingEquipment::addConstructToMap, ConductingEquipment::addPrimitiveAssignFnsToMap, ConductingEquipment::addClassAssignFnsToMap, ConductingEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* ConductingEquipment_factory() + { + return new ConductingEquipment; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp b/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp new file mode 100644 index 000000000..5454b4a05 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp @@ -0,0 +1,45 @@ +#ifndef ConductingEquipment_H +#define ConductingEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class BaseVoltage; + class SvStatus; + class Terminal; + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConductingEquipment_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Conductor.cpp b/CGMES_2.4.13_18DEC2013/Conductor.cpp new file mode 100644 index 000000000..f91f1c615 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Conductor.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Conductor.hpp" + +#include +#include + +#include "Length.hpp" + +using namespace CIMPP; + +Conductor::Conductor() {}; +Conductor::~Conductor() {}; + + +bool assign_Conductor_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Conductor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->length; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char Conductor::debugName[] = "Conductor"; +const char* Conductor::debugString() const +{ + return Conductor::debugName; +} + +void Conductor::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Conductor::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Conductor::declare() +{ + return BaseClassDefiner(Conductor::addConstructToMap, Conductor::addPrimitiveAssignFnsToMap, Conductor::addClassAssignFnsToMap, Conductor::debugName); +} + +namespace CIMPP +{ + BaseClass* Conductor_factory() + { + return new Conductor; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Conductor.hpp b/CGMES_2.4.13_18DEC2013/Conductor.hpp new file mode 100644 index 000000000..f94265788 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Conductor.hpp @@ -0,0 +1,41 @@ +#ifndef Conductor_H +#define Conductor_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Length.hpp" + +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. + */ + class Conductor : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + Conductor(); + ~Conductor() override; + + CIMPP::Length length; /* Segment length for calculating line section capabilities Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Conductor_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ConformLoad.cpp b/CGMES_2.4.13_18DEC2013/ConformLoad.cpp new file mode 100644 index 000000000..068ca38a5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConformLoad.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConformLoad.hpp" + +#include +#include + +#include "ConformLoadGroup.hpp" + +using namespace CIMPP; + +ConformLoad::ConformLoad() : LoadGroup(nullptr) {}; +ConformLoad::~ConformLoad() {}; + + + + +bool assign_ConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); +bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoad* element = dynamic_cast(BaseClass_ptr1); + ConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadGroup != element2) + { + element->LoadGroup = element2; + return assign_ConformLoadGroup_EnergyConsumers(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConformLoad::debugName[] = "ConformLoad"; +const char* ConformLoad::debugString() const +{ + return ConformLoad::debugName; +} + +void ConformLoad::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConformLoad"), &ConformLoad_factory)); +} + +void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConformLoad::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ConformLoad.LoadGroup"), &assign_ConformLoad_LoadGroup)); +} + +const BaseClassDefiner ConformLoad::declare() +{ + return BaseClassDefiner(ConformLoad::addConstructToMap, ConformLoad::addPrimitiveAssignFnsToMap, ConformLoad::addClassAssignFnsToMap, ConformLoad::debugName); +} + +namespace CIMPP +{ + BaseClass* ConformLoad_factory() + { + return new ConformLoad; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ConformLoad.hpp b/CGMES_2.4.13_18DEC2013/ConformLoad.hpp new file mode 100644 index 000000000..d124b28eb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConformLoad.hpp @@ -0,0 +1,41 @@ +#ifndef ConformLoad_H +#define ConformLoad_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConsumer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ConformLoad : public EnergyConsumer + { + public: + /* constructor initialising all attributes to null */ + ConformLoad(); + ~ConformLoad() override; + + CIMPP::ConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConformLoad_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp new file mode 100644 index 000000000..de8dedb23 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConformLoadGroup.hpp" + +#include +#include + +#include "ConformLoadSchedule.hpp" +#include "ConformLoad.hpp" + +using namespace CIMPP; + +ConformLoadGroup::ConformLoadGroup() {}; +ConformLoadGroup::~ConformLoadGroup() {}; + + + + + +bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass*, BaseClass*); +bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + ConformLoadSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConformLoadSchedules.begin(), element->ConformLoadSchedules.end(), element2) == element->ConformLoadSchedules.end()) + { + element->ConformLoadSchedules.push_back(element2); + return assign_ConformLoadSchedule_ConformLoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConformLoad_LoadGroup(BaseClass*, BaseClass*); +bool assign_ConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + ConformLoad* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumers.begin(), element->EnergyConsumers.end(), element2) == element->EnergyConsumers.end()) + { + element->EnergyConsumers.push_back(element2); + return assign_ConformLoad_LoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConformLoadGroup::debugName[] = "ConformLoadGroup"; +const char* ConformLoadGroup::debugString() const +{ + return ConformLoadGroup::debugName; +} + +void ConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConformLoadGroup"), &ConformLoadGroup_factory)); +} + +void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConformLoadGroup::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConformLoadGroup::declare() +{ + return BaseClassDefiner(ConformLoadGroup::addConstructToMap, ConformLoadGroup::addPrimitiveAssignFnsToMap, ConformLoadGroup::addClassAssignFnsToMap, ConformLoadGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* ConformLoadGroup_factory() + { + return new ConformLoadGroup; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp new file mode 100644 index 000000000..0ea15d628 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp @@ -0,0 +1,43 @@ +#ifndef ConformLoadGroup_H +#define ConformLoadGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadGroup.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ConformLoad; + class ConformLoadSchedule; + + /* + A group of loads conforming to an allocation pattern. + */ + class ConformLoadGroup : public LoadGroup + { + public: + /* constructor initialising all attributes to null */ + ConformLoadGroup(); + ~ConformLoadGroup() override; + + std::list ConformLoadSchedules; /* The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConformLoadGroup_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp new file mode 100644 index 000000000..e3f173e5e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConformLoadSchedule.hpp" + +#include +#include + +#include "ConformLoadGroup.hpp" + +using namespace CIMPP; + +ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {}; +ConformLoadSchedule::~ConformLoadSchedule() {}; + + + + +bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass*, BaseClass*); +bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + ConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConformLoadGroup != element2) + { + element->ConformLoadGroup = element2; + return assign_ConformLoadGroup_ConformLoadSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConformLoadSchedule::debugName[] = "ConformLoadSchedule"; +const char* ConformLoadSchedule::debugString() const +{ + return ConformLoadSchedule::debugName; +} + +void ConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule"), &ConformLoadSchedule_factory)); +} + +void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConformLoadSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule.ConformLoadGroup"), &assign_ConformLoadSchedule_ConformLoadGroup)); +} + +const BaseClassDefiner ConformLoadSchedule::declare() +{ + return BaseClassDefiner(ConformLoadSchedule::addConstructToMap, ConformLoadSchedule::addPrimitiveAssignFnsToMap, ConformLoadSchedule::addClassAssignFnsToMap, ConformLoadSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* ConformLoadSchedule_factory() + { + return new ConformLoadSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp new file mode 100644 index 000000000..6d7a42782 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef ConformLoadSchedule_H +#define ConformLoadSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ConformLoadSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + ConformLoadSchedule(); + ~ConformLoadSchedule() override; + + CIMPP::ConformLoadGroup* ConformLoadGroup; /* The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConformLoadSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp b/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp new file mode 100644 index 000000000..b0282bde9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp @@ -0,0 +1,219 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConnectivityNode.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_ConnectivityNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->boundaryPoint; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + element->fromEndIsoCode = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ConnectivityNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + element->fromEndName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ConnectivityNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + element->fromEndNameTso = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ConnectivityNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + element->toEndIsoCode = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ConnectivityNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + element->toEndName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ConnectivityNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + { + element->toEndNameTso = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_Terminal_ConnectivityNode(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + +const char ConnectivityNode::debugName[] = "ConnectivityNode"; +const char* ConnectivityNode::debugString() const +{ + return ConnectivityNode::debugName; +} + +void ConnectivityNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ConnectivityNode::declare() +{ + return BaseClassDefiner(ConnectivityNode::addConstructToMap, ConnectivityNode::addPrimitiveAssignFnsToMap, ConnectivityNode::addClassAssignFnsToMap, ConnectivityNode::debugName); +} + +namespace CIMPP +{ + BaseClass* ConnectivityNode_factory() + { + return new ConnectivityNode; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp b/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp new file mode 100644 index 000000000..cf94752de --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp @@ -0,0 +1,54 @@ +#ifndef ConnectivityNode_H +#define ConnectivityNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class ConnectivityNodeContainer; + class Terminal; + class TopologicalNode; + + /* + Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. + */ + class ConnectivityNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConnectivityNode_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp new file mode 100644 index 000000000..a5ed6251f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConnectivityNodeContainer.hpp" + +#include +#include + +#include "ConnectivityNode.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +ConnectivityNodeContainer::ConnectivityNodeContainer() {}; +ConnectivityNodeContainer::~ConnectivityNodeContainer() {}; + + + + + +bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); +bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNodeContainer* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConnectivityNodes.begin(), element->ConnectivityNodes.end(), element2) == element->ConnectivityNodes.end()) + { + element->ConnectivityNodes.push_back(element2); + return assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); +bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNodeContainer* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNode.begin(), element->TopologicalNode.end(), element2) == element->TopologicalNode.end()) + { + element->TopologicalNode.push_back(element2); + return assign_TopologicalNode_ConnectivityNodeContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConnectivityNodeContainer::debugName[] = "ConnectivityNodeContainer"; +const char* ConnectivityNodeContainer::debugString() const +{ + return ConnectivityNodeContainer::debugName; +} + +void ConnectivityNodeContainer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer"), &ConnectivityNodeContainer_factory)); +} + +void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConnectivityNodeContainer::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConnectivityNodeContainer::declare() +{ + return BaseClassDefiner(ConnectivityNodeContainer::addConstructToMap, ConnectivityNodeContainer::addPrimitiveAssignFnsToMap, ConnectivityNodeContainer::addClassAssignFnsToMap, ConnectivityNodeContainer::debugName); +} + +namespace CIMPP +{ + BaseClass* ConnectivityNodeContainer_factory() + { + return new ConnectivityNodeContainer; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp new file mode 100644 index 000000000..0b188b41b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp @@ -0,0 +1,43 @@ +#ifndef ConnectivityNodeContainer_H +#define ConnectivityNodeContainer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ConnectivityNode; + class TopologicalNode; + + /* + A base class for all objects that may contain connectivity nodes or topological nodes. + */ + class ConnectivityNodeContainer : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConnectivityNodeContainer_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Connector.cpp b/CGMES_2.4.13_18DEC2013/Connector.cpp new file mode 100644 index 000000000..55025d4c6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Connector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Connector.hpp" + +#include +#include + + +using namespace CIMPP; + +Connector::Connector() {}; +Connector::~Connector() {}; + + + +const char Connector::debugName[] = "Connector"; +const char* Connector::debugString() const +{ + return Connector::debugName; +} + +void Connector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Connector"), &Connector_factory)); +} + +void Connector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Connector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Connector::declare() +{ + return BaseClassDefiner(Connector::addConstructToMap, Connector::addPrimitiveAssignFnsToMap, Connector::addClassAssignFnsToMap, Connector::debugName); +} + +namespace CIMPP +{ + BaseClass* Connector_factory() + { + return new Connector; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Connector.hpp b/CGMES_2.4.13_18DEC2013/Connector.hpp new file mode 100644 index 000000000..9c7e0b2a4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Connector.hpp @@ -0,0 +1,39 @@ +#ifndef Connector_H +#define Connector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Connector : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + Connector(); + ~Connector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Connector_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Control.cpp b/CGMES_2.4.13_18DEC2013/Control.cpp new file mode 100644 index 000000000..9aba93e37 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Control.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Control.hpp" + +#include +#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() {}; + + + +bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + element->controlType = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_operationInProgress(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operationInProgress; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + element->timeStamp = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->unitMultiplier; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->unitSymbol; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + +const char Control::debugName[] = "Control"; +const char* Control::debugString() const +{ + return Control::debugName; +} + +void Control::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Control::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Control.PowerSystemResource"), &assign_Control_PowerSystemResource)); +} + +const BaseClassDefiner Control::declare() +{ + return BaseClassDefiner(Control::addConstructToMap, Control::addPrimitiveAssignFnsToMap, Control::addClassAssignFnsToMap, Control::debugName); +} + +namespace CIMPP +{ + BaseClass* Control_factory() + { + return new Control; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Control.hpp b/CGMES_2.4.13_18DEC2013/Control.hpp new file mode 100644 index 000000000..8d2c55032 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Control.hpp @@ -0,0 +1,51 @@ +#ifndef Control_H +#define Control_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "DateTime.hpp" +#include "String.hpp" +#include "UnitMultiplier.hpp" +#include "UnitSymbol.hpp" + +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. + */ + class Control : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Control_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ControlArea.cpp b/CGMES_2.4.13_18DEC2013/ControlArea.cpp new file mode 100644 index 000000000..81143d238 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ControlArea.cpp @@ -0,0 +1,155 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ControlArea.hpp" + +#include +#include + +#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() {}; + + + + + +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) +{ + ControlArea* 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_ControlArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_EnergyArea_ControlArea(BaseClass*, BaseClass*); +bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + EnergyArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergyArea != element2) + { + element->EnergyArea = element2; + return assign_EnergyArea_ControlArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TieFlow_ControlArea(BaseClass*, BaseClass*); +bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + TieFlow* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TieFlow.begin(), element->TieFlow.end(), element2) == element->TieFlow.end()) + { + element->TieFlow.push_back(element2); + return assign_TieFlow_ControlArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char ControlArea::debugName[] = "ControlArea"; +const char* ControlArea::debugString() const +{ + return ControlArea::debugName; +} + +void ControlArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ControlArea::declare() +{ + return BaseClassDefiner(ControlArea::addConstructToMap, ControlArea::addPrimitiveAssignFnsToMap, ControlArea::addClassAssignFnsToMap, ControlArea::debugName); +} + +namespace CIMPP +{ + BaseClass* ControlArea_factory() + { + return new ControlArea; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ControlArea.hpp b/CGMES_2.4.13_18DEC2013/ControlArea.hpp new file mode 100644 index 000000000..c0bc9e629 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ControlArea.hpp @@ -0,0 +1,50 @@ +#ifndef ControlArea_H +#define ControlArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ControlAreaTypeKind.hpp" + +namespace CIMPP +{ + class ControlAreaGeneratingUnit; + 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. + */ + class ControlArea : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ControlArea_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp new file mode 100644 index 000000000..40ad5b42f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ControlAreaGeneratingUnit.hpp" + +#include +#include + +#include "ControlArea.hpp" +#include "GeneratingUnit.hpp" + +using namespace CIMPP; + +ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {}; +ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {}; + + + + + +bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + ControlArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ControlArea != element2) + { + element->ControlArea = element2; + return assign_ControlArea_ControlAreaGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlAreaGeneratingUnit* 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_ControlAreaGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ControlAreaGeneratingUnit::debugName[] = "ControlAreaGeneratingUnit"; +const char* ControlAreaGeneratingUnit::debugString() const +{ + return ControlAreaGeneratingUnit::debugName; +} + +void ControlAreaGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit"), &ControlAreaGeneratingUnit_factory)); +} + +void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ControlAreaGeneratingUnit::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ControlAreaGeneratingUnit::declare() +{ + return BaseClassDefiner(ControlAreaGeneratingUnit::addConstructToMap, ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap, ControlAreaGeneratingUnit::addClassAssignFnsToMap, ControlAreaGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* ControlAreaGeneratingUnit_factory() + { + return new ControlAreaGeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp new file mode 100644 index 000000000..96eb060c9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp @@ -0,0 +1,43 @@ +#ifndef ControlAreaGeneratingUnit_H +#define ControlAreaGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ControlAreaGeneratingUnit : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ControlAreaGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp new file mode 100644 index 000000000..48f6c0cb5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ControlAreaTypeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ControlAreaTypeKind& ControlAreaTypeKind::operator=(ControlAreaTypeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ControlAreaTypeKind::operator ControlAreaTypeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ControlAreaTypeKind::debugName[] = "ControlAreaTypeKind"; +const char* ControlAreaTypeKind::debugString() const +{ + return ControlAreaTypeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ControlAreaTypeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "AGC") + { + rop = ControlAreaTypeKind::AGC; + return lop; + } + if(EnumSymbol == "Forecast") + { + rop = ControlAreaTypeKind::Forecast; + return lop; + } + if(EnumSymbol == "Interchange") + { + rop = ControlAreaTypeKind::Interchange; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ControlAreaTypeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ControlAreaTypeKind::AGC) + { + EnumSymbol = "AGC"; + } + if (obj.value == ControlAreaTypeKind::Forecast) + { + EnumSymbol = "Forecast"; + } + if (obj.value == ControlAreaTypeKind::Interchange) + { + EnumSymbol = "Interchange"; + } + + if (!EnumSymbol.empty()) + { + os << "ControlAreaTypeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp new file mode 100644 index 000000000..025df1d5c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp @@ -0,0 +1,50 @@ +#ifndef ControlAreaTypeKind_H +#define ControlAreaTypeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The type of control area. + */ + class ControlAreaTypeKind + { + public: + enum ControlAreaTypeKind_ENUM + { + /** + * Used for automatic generation control. + */ + AGC, + /** + * Used for load forecast. + */ + Forecast, + /** + * Used for interchange specification or control. + */ + Interchange, + }; + + ControlAreaTypeKind() : value(), initialized(false) {} + ControlAreaTypeKind(ControlAreaTypeKind_ENUM value) : value(value), initialized(true) {} + + ControlAreaTypeKind& operator=(ControlAreaTypeKind_ENUM rop); + operator ControlAreaTypeKind_ENUM() const; + + ControlAreaTypeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ControlAreaTypeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ControlAreaTypeKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp b/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp new file mode 100644 index 000000000..c4d4dd7f2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CoordinateSystem.hpp" + +#include +#include + +#include "Location.hpp" +#include "String.hpp" + +using namespace CIMPP; + +CoordinateSystem::CoordinateSystem() {}; +CoordinateSystem::~CoordinateSystem() {}; + + + +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) +{ + CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + Location* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Location.begin(), element->Location.end(), element2) == element->Location.end()) + { + element->Location.push_back(element2); + return assign_Location_CoordinateSystem(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char CoordinateSystem::debugName[] = "CoordinateSystem"; +const char* CoordinateSystem::debugString() const +{ + return CoordinateSystem::debugName; +} + +void CoordinateSystem::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CoordinateSystem::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.Location"), &assign_CoordinateSystem_Location)); +} + +const BaseClassDefiner CoordinateSystem::declare() +{ + return BaseClassDefiner(CoordinateSystem::addConstructToMap, CoordinateSystem::addPrimitiveAssignFnsToMap, CoordinateSystem::addClassAssignFnsToMap, CoordinateSystem::debugName); +} + +namespace CIMPP +{ + BaseClass* CoordinateSystem_factory() + { + return new CoordinateSystem; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp b/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp new file mode 100644 index 000000000..e3b72d8ce --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp @@ -0,0 +1,43 @@ +#ifndef CoordinateSystem_H +#define CoordinateSystem_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class Location; + + /* + Coordinate reference system. + */ + class CoordinateSystem : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CoordinateSystem_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CsConverter.cpp b/CGMES_2.4.13_18DEC2013/CsConverter.cpp new file mode 100644 index 000000000..3998e98e5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CsConverter.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CsConverter.hpp" + +#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() {}; + + +bool assign_CsConverter_alpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->alpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_gamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gamma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_maxAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxAlpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_maxGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxGamma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_maxIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxIdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_minAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minAlpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_minGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minGamma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_minIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minIdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operatingMode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pPccControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_ratedIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedIdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_targetAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetAlpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_targetGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetGamma; + if (buffer.fail()) + return false; + else + 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; +} + + + + + + + + + + + + + + + + +const char CsConverter::debugName[] = "CsConverter"; +const char* CsConverter::debugString() const +{ + return CsConverter::debugName; +} + +void CsConverter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner CsConverter::declare() +{ + return BaseClassDefiner(CsConverter::addConstructToMap, CsConverter::addPrimitiveAssignFnsToMap, CsConverter::addClassAssignFnsToMap, CsConverter::debugName); +} + +namespace CIMPP +{ + BaseClass* CsConverter_factory() + { + return new CsConverter; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CsConverter.hpp b/CGMES_2.4.13_18DEC2013/CsConverter.hpp new file mode 100644 index 000000000..b17bc6252 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CsConverter.hpp @@ -0,0 +1,57 @@ +#ifndef CsConverter_H +#define CsConverter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCConverter.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "CsOperatingModeKind.hpp" +#include "CsPpccControlKind.hpp" +#include "CurrentFlow.hpp" + +namespace CIMPP +{ + + /* + DC side of the current source converter (CSC). + */ + class CsConverter : public ACDCConverter + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CsConverter_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp new file mode 100644 index 000000000..61074c399 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CsOperatingModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CsOperatingModeKind& CsOperatingModeKind::operator=(CsOperatingModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +CsOperatingModeKind::operator CsOperatingModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CsOperatingModeKind::debugName[] = "CsOperatingModeKind"; +const char* CsOperatingModeKind::debugString() const +{ + return CsOperatingModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CsOperatingModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "CsOperatingModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "inverter") + { + rop = CsOperatingModeKind::inverter; + return lop; + } + if(EnumSymbol == "rectifier") + { + rop = CsOperatingModeKind::rectifier; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CsOperatingModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == CsOperatingModeKind::inverter) + { + EnumSymbol = "inverter"; + } + if (obj.value == CsOperatingModeKind::rectifier) + { + EnumSymbol = "rectifier"; + } + + if (!EnumSymbol.empty()) + { + os << "CsOperatingModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp new file mode 100644 index 000000000..eb2af30bf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp @@ -0,0 +1,46 @@ +#ifndef CsOperatingModeKind_H +#define CsOperatingModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Operating mode for HVDC line operating as Current Source Converter. + */ + class CsOperatingModeKind + { + public: + enum CsOperatingModeKind_ENUM + { + /** + * Operating as inverter + */ + inverter, + /** + * Operating as rectifier. + */ + rectifier, + }; + + CsOperatingModeKind() : value(), initialized(false) {} + CsOperatingModeKind(CsOperatingModeKind_ENUM value) : value(value), initialized(true) {} + + CsOperatingModeKind& operator=(CsOperatingModeKind_ENUM rop); + operator CsOperatingModeKind_ENUM() const; + + CsOperatingModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, CsOperatingModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const CsOperatingModeKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp new file mode 100644 index 000000000..e4e9aa9b2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CsPpccControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CsPpccControlKind& CsPpccControlKind::operator=(CsPpccControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +CsPpccControlKind::operator CsPpccControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CsPpccControlKind::debugName[] = "CsPpccControlKind"; +const char* CsPpccControlKind::debugString() const +{ + return CsPpccControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CsPpccControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "CsPpccControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "activePower") + { + rop = CsPpccControlKind::activePower; + return lop; + } + if(EnumSymbol == "dcVoltage") + { + rop = CsPpccControlKind::dcVoltage; + return lop; + } + if(EnumSymbol == "dcCurrent") + { + rop = CsPpccControlKind::dcCurrent; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CsPpccControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == CsPpccControlKind::activePower) + { + EnumSymbol = "activePower"; + } + if (obj.value == CsPpccControlKind::dcVoltage) + { + EnumSymbol = "dcVoltage"; + } + if (obj.value == CsPpccControlKind::dcCurrent) + { + EnumSymbol = "dcCurrent"; + } + + if (!EnumSymbol.empty()) + { + os << "CsPpccControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp new file mode 100644 index 000000000..3c17709fb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp @@ -0,0 +1,50 @@ +#ifndef CsPpccControlKind_H +#define CsPpccControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Active power control modes for HVDC line operating as Current Source Converter. + */ + class CsPpccControlKind + { + public: + enum CsPpccControlKind_ENUM + { + /** + * Active power control at AC side. + */ + activePower, + /** + * DC voltage control. + */ + dcVoltage, + /** + * DC current control + */ + dcCurrent, + }; + + CsPpccControlKind() : value(), initialized(false) {} + CsPpccControlKind(CsPpccControlKind_ENUM value) : value(value), initialized(true) {} + + CsPpccControlKind& operator=(CsPpccControlKind_ENUM rop); + operator CsPpccControlKind_ENUM() const; + + CsPpccControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, CsPpccControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const CsPpccControlKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Currency.cpp b/CGMES_2.4.13_18DEC2013/Currency.cpp new file mode 100644 index 000000000..0a4518071 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Currency.cpp @@ -0,0 +1,198 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Currency.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Currency& Currency::operator=(Currency_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +Currency::operator Currency_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Currency::debugName[] = "Currency"; +const char* Currency::debugString() const +{ + return Currency::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Currency& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "Currency") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "USD") + { + rop = Currency::USD; + return lop; + } + if(EnumSymbol == "EUR") + { + rop = Currency::EUR; + return lop; + } + if(EnumSymbol == "AUD") + { + rop = Currency::AUD; + return lop; + } + if(EnumSymbol == "CAD") + { + rop = Currency::CAD; + return lop; + } + if(EnumSymbol == "CHF") + { + rop = Currency::CHF; + return lop; + } + if(EnumSymbol == "CNY") + { + rop = Currency::CNY; + return lop; + } + if(EnumSymbol == "DKK") + { + rop = Currency::DKK; + return lop; + } + if(EnumSymbol == "GBP") + { + rop = Currency::GBP; + return lop; + } + if(EnumSymbol == "JPY") + { + rop = Currency::JPY; + return lop; + } + if(EnumSymbol == "NOK") + { + rop = Currency::NOK; + return lop; + } + if(EnumSymbol == "RUR") + { + rop = Currency::RUR; + return lop; + } + if(EnumSymbol == "SEK") + { + rop = Currency::SEK; + return lop; + } + if(EnumSymbol == "INR") + { + rop = Currency::INR; + return lop; + } + if(EnumSymbol == "other") + { + rop = Currency::other; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Currency& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == Currency::USD) + { + EnumSymbol = "USD"; + } + if (obj.value == Currency::EUR) + { + EnumSymbol = "EUR"; + } + if (obj.value == Currency::AUD) + { + EnumSymbol = "AUD"; + } + if (obj.value == Currency::CAD) + { + EnumSymbol = "CAD"; + } + if (obj.value == Currency::CHF) + { + EnumSymbol = "CHF"; + } + if (obj.value == Currency::CNY) + { + EnumSymbol = "CNY"; + } + if (obj.value == Currency::DKK) + { + EnumSymbol = "DKK"; + } + if (obj.value == Currency::GBP) + { + EnumSymbol = "GBP"; + } + if (obj.value == Currency::JPY) + { + EnumSymbol = "JPY"; + } + if (obj.value == Currency::NOK) + { + EnumSymbol = "NOK"; + } + if (obj.value == Currency::RUR) + { + EnumSymbol = "RUR"; + } + if (obj.value == Currency::SEK) + { + EnumSymbol = "SEK"; + } + if (obj.value == Currency::INR) + { + EnumSymbol = "INR"; + } + if (obj.value == Currency::other) + { + EnumSymbol = "other"; + } + + if (!EnumSymbol.empty()) + { + os << "Currency." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Currency.hpp b/CGMES_2.4.13_18DEC2013/Currency.hpp new file mode 100644 index 000000000..f4de85751 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Currency.hpp @@ -0,0 +1,94 @@ +#ifndef Currency_H +#define Currency_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Monetary currencies. Apologies for this list not being exhaustive. + */ + class Currency + { + public: + enum Currency_ENUM + { + /** + * US dollar + */ + USD, + /** + * European euro + */ + EUR, + /** + * Australian dollar + */ + AUD, + /** + * Canadian dollar + */ + CAD, + /** + * Swiss francs + */ + CHF, + /** + * Chinese yuan renminbi + */ + CNY, + /** + * Danish crown + */ + DKK, + /** + * British pound + */ + GBP, + /** + * Japanese yen + */ + JPY, + /** + * Norwegian crown + */ + NOK, + /** + * Russian ruble + */ + RUR, + /** + * Swedish crown + */ + SEK, + /** + * India rupees + */ + INR, + /** + * Another type of currency. + */ + other, + }; + + Currency() : value(), initialized(false) {} + Currency(Currency_ENUM value) : value(value), initialized(true) {} + + Currency& operator=(Currency_ENUM rop); + operator Currency_ENUM() const; + + Currency_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Currency& rop); + friend std::ostream& operator<<(std::ostream& os, const Currency& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CurrentFlow.cpp b/CGMES_2.4.13_18DEC2013/CurrentFlow.cpp new file mode 100644 index 000000000..56f73af6e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurrentFlow.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurrentFlow.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CurrentFlow& CurrentFlow::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +CurrentFlow::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CurrentFlow::debugName[] = "CurrentFlow"; +const char* CurrentFlow::debugString() const +{ + return CurrentFlow::debugName; +} + +CurrentFlow& CurrentFlow::operator+=(const CurrentFlow& rhs) +{ + value += rhs.value; + return *this; +} + +CurrentFlow& CurrentFlow::operator-=(const CurrentFlow& rhs) +{ + value -= rhs.value; + return *this; +} + +CurrentFlow& CurrentFlow::operator*=(const CurrentFlow& rhs) +{ + value *= rhs.value; + return *this; +} + +CurrentFlow& CurrentFlow::operator/=(const CurrentFlow& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CurrentFlow& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CurrentFlow& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp b/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp new file mode 100644 index 000000000..0f38f0f07 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp @@ -0,0 +1,39 @@ +#ifndef CurrentFlow_H +#define CurrentFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +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. + */ + class CurrentFlow + { + public: + CurrentFlow() : value(0.0), initialized(false) {} + CurrentFlow(long double value) : value(value), initialized(true) {} + + CurrentFlow& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + CurrentFlow& operator+=(const CurrentFlow& rhs); + CurrentFlow& operator-=(const CurrentFlow& rhs); + CurrentFlow& operator*=(const CurrentFlow& rhs); + CurrentFlow& operator/=(const CurrentFlow& rhs); + + friend std::istream& operator>>(std::istream& lop, CurrentFlow& rop); + friend std::ostream& operator<<(std::ostream& os, const CurrentFlow& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp b/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp new file mode 100644 index 000000000..5572e0f4c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurrentLimit.hpp" + +#include +#include + +#include "CurrentFlow.hpp" + +using namespace CIMPP; + +CurrentLimit::CurrentLimit() {}; +CurrentLimit::~CurrentLimit() {}; + + +bool assign_CurrentLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char CurrentLimit::debugName[] = "CurrentLimit"; +const char* CurrentLimit::debugString() const +{ + return CurrentLimit::debugName; +} + +void CurrentLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CurrentLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner CurrentLimit::declare() +{ + return BaseClassDefiner(CurrentLimit::addConstructToMap, CurrentLimit::addPrimitiveAssignFnsToMap, CurrentLimit::addClassAssignFnsToMap, CurrentLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* CurrentLimit_factory() + { + return new CurrentLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp b/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp new file mode 100644 index 000000000..2b608fa40 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp @@ -0,0 +1,41 @@ +#ifndef CurrentLimit_H +#define CurrentLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" + +namespace CIMPP +{ + + /* + Operational limit on current. + */ + class CurrentLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + CurrentLimit(); + ~CurrentLimit() override; + + CIMPP::CurrentFlow value; /* Limit on current flow. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CurrentLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Curve.cpp b/CGMES_2.4.13_18DEC2013/Curve.cpp new file mode 100644 index 000000000..e25ece428 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Curve.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Curve.hpp" + +#include +#include + +#include "CurveData.hpp" +#include "CurveStyle.hpp" +#include "UnitSymbol.hpp" +#include "UnitSymbol.hpp" +#include "UnitSymbol.hpp" + +using namespace CIMPP; + +Curve::Curve() {}; +Curve::~Curve() {}; + + + +bool assign_Curve_curveStyle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->curveStyle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Curve_xUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xUnit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Curve_y1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y1Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Curve_y2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y2Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_CurveData_Curve(BaseClass*, BaseClass*); +bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Curve* element = dynamic_cast(BaseClass_ptr1); + CurveData* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + +const char Curve::debugName[] = "Curve"; +const char* Curve::debugString() const +{ + return Curve::debugName; +} + +void Curve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Curve::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Curve.CurveDatas"), &assign_Curve_CurveDatas)); +} + +const BaseClassDefiner Curve::declare() +{ + return BaseClassDefiner(Curve::addConstructToMap, Curve::addPrimitiveAssignFnsToMap, Curve::addClassAssignFnsToMap, Curve::debugName); +} + +namespace CIMPP +{ + BaseClass* Curve_factory() + { + return new Curve; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Curve.hpp b/CGMES_2.4.13_18DEC2013/Curve.hpp new file mode 100644 index 000000000..5a634c3df --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Curve.hpp @@ -0,0 +1,47 @@ +#ifndef Curve_H +#define Curve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "CurveStyle.hpp" +#include "UnitSymbol.hpp" + +namespace CIMPP +{ + class CurveData; + + /* + A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. + */ + class Curve : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Curve_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CurveData.cpp b/CGMES_2.4.13_18DEC2013/CurveData.cpp new file mode 100644 index 000000000..85447066e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurveData.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurveData.hpp" + +#include +#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() {}; + + + +bool assign_CurveData_xvalue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xvalue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CurveData_y1value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y1value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CurveData_y2value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y2value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + +const char CurveData::debugName[] = "CurveData"; +const char* CurveData::debugString() const +{ + return CurveData::debugName; +} + +void CurveData::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CurveData::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CurveData.Curve"), &assign_CurveData_Curve)); +} + +const BaseClassDefiner CurveData::declare() +{ + return BaseClassDefiner(CurveData::addConstructToMap, CurveData::addPrimitiveAssignFnsToMap, CurveData::addClassAssignFnsToMap, CurveData::debugName); +} + +namespace CIMPP +{ + BaseClass* CurveData_factory() + { + return new CurveData; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CurveData.hpp b/CGMES_2.4.13_18DEC2013/CurveData.hpp new file mode 100644 index 000000000..d728a8062 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurveData.hpp @@ -0,0 +1,45 @@ +#ifndef CurveData_H +#define CurveData_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +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. + */ + class CurveData : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CurveData_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/CurveStyle.cpp b/CGMES_2.4.13_18DEC2013/CurveStyle.cpp new file mode 100644 index 000000000..d28696151 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurveStyle.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurveStyle.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CurveStyle& CurveStyle::operator=(CurveStyle_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +CurveStyle::operator CurveStyle_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CurveStyle::debugName[] = "CurveStyle"; +const char* CurveStyle::debugString() const +{ + return CurveStyle::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CurveStyle& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "CurveStyle") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "constantYValue") + { + rop = CurveStyle::constantYValue; + return lop; + } + if(EnumSymbol == "straightLineYValues") + { + rop = CurveStyle::straightLineYValues; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CurveStyle& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == CurveStyle::constantYValue) + { + EnumSymbol = "constantYValue"; + } + if (obj.value == CurveStyle::straightLineYValues) + { + EnumSymbol = "straightLineYValues"; + } + + if (!EnumSymbol.empty()) + { + os << "CurveStyle." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/CurveStyle.hpp b/CGMES_2.4.13_18DEC2013/CurveStyle.hpp new file mode 100644 index 000000000..72f95568c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CurveStyle.hpp @@ -0,0 +1,46 @@ +#ifndef CurveStyle_H +#define CurveStyle_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + constantYValue, + /** + * The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. + */ + straightLineYValues, + }; + + CurveStyle() : value(), initialized(false) {} + CurveStyle(CurveStyle_ENUM value) : value(value), initialized(true) {} + + CurveStyle& operator=(CurveStyle_ENUM rop); + operator CurveStyle_ENUM() const; + + CurveStyle_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, CurveStyle& rop); + friend std::ostream& operator<<(std::ostream& os, const CurveStyle& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp new file mode 100644 index 000000000..9f9ea9862 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCBaseTerminal.hpp" + +#include +#include + +#include "DCNode.hpp" +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {}; +DCBaseTerminal::~DCBaseTerminal() {}; + + + + + +bool assign_DCNode_DCTerminals(BaseClass*, BaseClass*); +bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + DCNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCNode != element2) + { + element->DCNode = element2; + return assign_DCNode_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalNode_DCTerminals(BaseClass*, BaseClass*); +bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCTopologicalNode != element2) + { + element->DCTopologicalNode = element2; + return assign_DCTopologicalNode_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCBaseTerminal::debugName[] = "DCBaseTerminal"; +const char* DCBaseTerminal::debugString() const +{ + return DCBaseTerminal::debugName; +} + +void DCBaseTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCBaseTerminal"), &DCBaseTerminal_factory)); +} + +void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCBaseTerminal::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCBaseTerminal::declare() +{ + return BaseClassDefiner(DCBaseTerminal::addConstructToMap, DCBaseTerminal::addPrimitiveAssignFnsToMap, DCBaseTerminal::addClassAssignFnsToMap, DCBaseTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* DCBaseTerminal_factory() + { + return new DCBaseTerminal; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp new file mode 100644 index 000000000..ec52e0f77 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp @@ -0,0 +1,40 @@ +#ifndef DCBaseTerminal_H +#define DCBaseTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCTerminal.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCNode; + class DCTopologicalNode; + + class DCBaseTerminal : public ACDCTerminal + { + public: + /* constructor initialising all attributes to null */ + DCBaseTerminal(); + ~DCBaseTerminal() override; + + CIMPP::DCNode* DCNode; /* Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.Terminal. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCBaseTerminal_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCBreaker.cpp b/CGMES_2.4.13_18DEC2013/DCBreaker.cpp new file mode 100644 index 000000000..c862f40e9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCBreaker.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCBreaker.hpp" + +#include +#include + + +using namespace CIMPP; + +DCBreaker::DCBreaker() {}; +DCBreaker::~DCBreaker() {}; + + + +const char DCBreaker::debugName[] = "DCBreaker"; +const char* DCBreaker::debugString() const +{ + return DCBreaker::debugName; +} + +void DCBreaker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCBreaker"), &DCBreaker_factory)); +} + +void DCBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCBreaker::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCBreaker::declare() +{ + return BaseClassDefiner(DCBreaker::addConstructToMap, DCBreaker::addPrimitiveAssignFnsToMap, DCBreaker::addClassAssignFnsToMap, DCBreaker::debugName); +} + +namespace CIMPP +{ + BaseClass* DCBreaker_factory() + { + return new DCBreaker; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCBreaker.hpp b/CGMES_2.4.13_18DEC2013/DCBreaker.hpp new file mode 100644 index 000000000..a360a1425 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCBreaker.hpp @@ -0,0 +1,39 @@ +#ifndef DCBreaker_H +#define DCBreaker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCSwitch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A breaker within a DC system. + */ + class DCBreaker : public DCSwitch + { + public: + /* constructor initialising all attributes to null */ + DCBreaker(); + ~DCBreaker() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCBreaker_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCBusbar.cpp b/CGMES_2.4.13_18DEC2013/DCBusbar.cpp new file mode 100644 index 000000000..587b722fb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCBusbar.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCBusbar.hpp" + +#include +#include + + +using namespace CIMPP; + +DCBusbar::DCBusbar() {}; +DCBusbar::~DCBusbar() {}; + + + +const char DCBusbar::debugName[] = "DCBusbar"; +const char* DCBusbar::debugString() const +{ + return DCBusbar::debugName; +} + +void DCBusbar::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCBusbar"), &DCBusbar_factory)); +} + +void DCBusbar::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCBusbar::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCBusbar::declare() +{ + return BaseClassDefiner(DCBusbar::addConstructToMap, DCBusbar::addPrimitiveAssignFnsToMap, DCBusbar::addClassAssignFnsToMap, DCBusbar::debugName); +} + +namespace CIMPP +{ + BaseClass* DCBusbar_factory() + { + return new DCBusbar; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCBusbar.hpp b/CGMES_2.4.13_18DEC2013/DCBusbar.hpp new file mode 100644 index 000000000..4e9f6c039 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCBusbar.hpp @@ -0,0 +1,39 @@ +#ifndef DCBusbar_H +#define DCBusbar_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A busbar within a DC system. + */ + class DCBusbar : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCBusbar(); + ~DCBusbar() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCBusbar_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCChopper.cpp b/CGMES_2.4.13_18DEC2013/DCChopper.cpp new file mode 100644 index 000000000..f196636fd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCChopper.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCChopper.hpp" + +#include +#include + + +using namespace CIMPP; + +DCChopper::DCChopper() {}; +DCChopper::~DCChopper() {}; + + + +const char DCChopper::debugName[] = "DCChopper"; +const char* DCChopper::debugString() const +{ + return DCChopper::debugName; +} + +void DCChopper::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCChopper"), &DCChopper_factory)); +} + +void DCChopper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCChopper::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCChopper::declare() +{ + return BaseClassDefiner(DCChopper::addConstructToMap, DCChopper::addPrimitiveAssignFnsToMap, DCChopper::addClassAssignFnsToMap, DCChopper::debugName); +} + +namespace CIMPP +{ + BaseClass* DCChopper_factory() + { + return new DCChopper; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCChopper.hpp b/CGMES_2.4.13_18DEC2013/DCChopper.hpp new file mode 100644 index 000000000..674d2c2db --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCChopper.hpp @@ -0,0 +1,39 @@ +#ifndef DCChopper_H +#define DCChopper_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCChopper : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCChopper(); + ~DCChopper() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCChopper_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp new file mode 100644 index 000000000..30cbbdd8e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCConductingEquipment.hpp" + +#include +#include + +#include "DCTerminal.hpp" + +using namespace CIMPP; + +DCConductingEquipment::DCConductingEquipment() {}; +DCConductingEquipment::~DCConductingEquipment() {}; + + + + +bool assign_DCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); +bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + DCTerminal* 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_DCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCConductingEquipment::debugName[] = "DCConductingEquipment"; +const char* DCConductingEquipment::debugString() const +{ + return DCConductingEquipment::debugName; +} + +void DCConductingEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCConductingEquipment"), &DCConductingEquipment_factory)); +} + +void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCConductingEquipment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.DCTerminals"), &assign_DCConductingEquipment_DCTerminals)); +} + +const BaseClassDefiner DCConductingEquipment::declare() +{ + return BaseClassDefiner(DCConductingEquipment::addConstructToMap, DCConductingEquipment::addPrimitiveAssignFnsToMap, DCConductingEquipment::addClassAssignFnsToMap, DCConductingEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* DCConductingEquipment_factory() + { + return new DCConductingEquipment; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp new file mode 100644 index 000000000..e9c204a64 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp @@ -0,0 +1,41 @@ +#ifndef DCConductingEquipment_H +#define DCConductingEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCConductingEquipment : public Equipment + { + public: + /* constructor initialising all attributes to null */ + DCConductingEquipment(); + ~DCConductingEquipment() override; + + std::list DCTerminals; /* Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCConductingEquipment_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp new file mode 100644 index 000000000..723e4594e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCConverterOperatingModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DCConverterOperatingModeKind& DCConverterOperatingModeKind::operator=(DCConverterOperatingModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +DCConverterOperatingModeKind::operator DCConverterOperatingModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DCConverterOperatingModeKind::debugName[] = "DCConverterOperatingModeKind"; +const char* DCConverterOperatingModeKind::debugString() const +{ + return DCConverterOperatingModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DCConverterOperatingModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "bipolar") + { + rop = DCConverterOperatingModeKind::bipolar; + return lop; + } + if(EnumSymbol == "monopolarMetallicReturn") + { + rop = DCConverterOperatingModeKind::monopolarMetallicReturn; + return lop; + } + if(EnumSymbol == "monopolarGroundReturn") + { + rop = DCConverterOperatingModeKind::monopolarGroundReturn; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DCConverterOperatingModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == DCConverterOperatingModeKind::bipolar) + { + EnumSymbol = "bipolar"; + } + if (obj.value == DCConverterOperatingModeKind::monopolarMetallicReturn) + { + EnumSymbol = "monopolarMetallicReturn"; + } + if (obj.value == DCConverterOperatingModeKind::monopolarGroundReturn) + { + EnumSymbol = "monopolarGroundReturn"; + } + + if (!EnumSymbol.empty()) + { + os << "DCConverterOperatingModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp new file mode 100644 index 000000000..eb7c9c456 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp @@ -0,0 +1,50 @@ +#ifndef DCConverterOperatingModeKind_H +#define DCConverterOperatingModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The operating mode of an HVDC bipole. + */ + class DCConverterOperatingModeKind + { + public: + enum DCConverterOperatingModeKind_ENUM + { + /** + * Bipolar operation. + */ + bipolar, + /** + * Monopolar operation with metallic return + */ + monopolarMetallicReturn, + /** + * Monopolar operation with ground return + */ + monopolarGroundReturn, + }; + + DCConverterOperatingModeKind() : value(), initialized(false) {} + DCConverterOperatingModeKind(DCConverterOperatingModeKind_ENUM value) : value(value), initialized(true) {} + + DCConverterOperatingModeKind& operator=(DCConverterOperatingModeKind_ENUM rop); + operator DCConverterOperatingModeKind_ENUM() const; + + DCConverterOperatingModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DCConverterOperatingModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const DCConverterOperatingModeKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp b/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp new file mode 100644 index 000000000..737004e53 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCConverterUnit.hpp" + +#include +#include + +#include "Substation.hpp" +#include "DCConverterOperatingModeKind.hpp" + +using namespace CIMPP; + +DCConverterUnit::DCConverterUnit() : Substation(nullptr) {}; +DCConverterUnit::~DCConverterUnit() {}; + + + +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) +{ + DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + Substation* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Substation != element2) + { + element->Substation = element2; + return assign_Substation_DCConverterUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char DCConverterUnit::debugName[] = "DCConverterUnit"; +const char* DCConverterUnit::debugString() const +{ + return DCConverterUnit::debugName; +} + +void DCConverterUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCConverterUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.Substation"), &assign_DCConverterUnit_Substation)); +} + +const BaseClassDefiner DCConverterUnit::declare() +{ + return BaseClassDefiner(DCConverterUnit::addConstructToMap, DCConverterUnit::addPrimitiveAssignFnsToMap, DCConverterUnit::addClassAssignFnsToMap, DCConverterUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* DCConverterUnit_factory() + { + return new DCConverterUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp b/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp new file mode 100644 index 000000000..642a2abbd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp @@ -0,0 +1,43 @@ +#ifndef DCConverterUnit_H +#define DCConverterUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" +#include "DCConverterOperatingModeKind.hpp" + +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. + */ + class DCConverterUnit : public DCEquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + DCConverterUnit(); + ~DCConverterUnit() override; + + CIMPP::Substation* Substation; /* Default: 0 */ + CIMPP::DCConverterOperatingModeKind operationMode; /* Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCConverterUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp b/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp new file mode 100644 index 000000000..9386681a3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCDisconnector.hpp" + +#include +#include + + +using namespace CIMPP; + +DCDisconnector::DCDisconnector() {}; +DCDisconnector::~DCDisconnector() {}; + + + +const char DCDisconnector::debugName[] = "DCDisconnector"; +const char* DCDisconnector::debugString() const +{ + return DCDisconnector::debugName; +} + +void DCDisconnector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCDisconnector"), &DCDisconnector_factory)); +} + +void DCDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCDisconnector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCDisconnector::declare() +{ + return BaseClassDefiner(DCDisconnector::addConstructToMap, DCDisconnector::addPrimitiveAssignFnsToMap, DCDisconnector::addClassAssignFnsToMap, DCDisconnector::debugName); +} + +namespace CIMPP +{ + BaseClass* DCDisconnector_factory() + { + return new DCDisconnector; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp b/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp new file mode 100644 index 000000000..11f5da74c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp @@ -0,0 +1,39 @@ +#ifndef DCDisconnector_H +#define DCDisconnector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCSwitch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A disconnector within a DC system. + */ + class DCDisconnector : public DCSwitch + { + public: + /* constructor initialising all attributes to null */ + DCDisconnector(); + ~DCDisconnector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCDisconnector_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp new file mode 100644 index 000000000..ad63fc502 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCEquipmentContainer.hpp" + +#include +#include + +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCEquipmentContainer::DCEquipmentContainer() {}; +DCEquipmentContainer::~DCEquipmentContainer() {}; + + + + +bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass*, BaseClass*); +bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCEquipmentContainer* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTopologicalNode.begin(), element->DCTopologicalNode.end(), element2) == element->DCTopologicalNode.end()) + { + element->DCTopologicalNode.push_back(element2); + return assign_DCTopologicalNode_DCEquipmentContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCEquipmentContainer::debugName[] = "DCEquipmentContainer"; +const char* DCEquipmentContainer::debugString() const +{ + return DCEquipmentContainer::debugName; +} + +void DCEquipmentContainer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer"), &DCEquipmentContainer_factory)); +} + +void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCEquipmentContainer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCTopologicalNode"), &assign_DCEquipmentContainer_DCTopologicalNode)); +} + +const BaseClassDefiner DCEquipmentContainer::declare() +{ + return BaseClassDefiner(DCEquipmentContainer::addConstructToMap, DCEquipmentContainer::addPrimitiveAssignFnsToMap, DCEquipmentContainer::addClassAssignFnsToMap, DCEquipmentContainer::debugName); +} + +namespace CIMPP +{ + BaseClass* DCEquipmentContainer_factory() + { + return new DCEquipmentContainer; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp new file mode 100644 index 000000000..e5017a80a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp @@ -0,0 +1,41 @@ +#ifndef DCEquipmentContainer_H +#define DCEquipmentContainer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCEquipmentContainer : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + DCEquipmentContainer(); + ~DCEquipmentContainer() override; + + std::list DCTopologicalNode; /* Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCEquipmentContainer_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCGround.cpp b/CGMES_2.4.13_18DEC2013/DCGround.cpp new file mode 100644 index 000000000..60cb487cb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCGround.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCGround.hpp" + +#include +#include + + +using namespace CIMPP; + +DCGround::DCGround() {}; +DCGround::~DCGround() {}; + + + +const char DCGround::debugName[] = "DCGround"; +const char* DCGround::debugString() const +{ + return DCGround::debugName; +} + +void DCGround::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCGround"), &DCGround_factory)); +} + +void DCGround::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCGround::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCGround::declare() +{ + return BaseClassDefiner(DCGround::addConstructToMap, DCGround::addPrimitiveAssignFnsToMap, DCGround::addClassAssignFnsToMap, DCGround::debugName); +} + +namespace CIMPP +{ + BaseClass* DCGround_factory() + { + return new DCGround; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCGround.hpp b/CGMES_2.4.13_18DEC2013/DCGround.hpp new file mode 100644 index 000000000..87008a41f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCGround.hpp @@ -0,0 +1,39 @@ +#ifndef DCGround_H +#define DCGround_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A ground within a DC system. + */ + class DCGround : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCGround(); + ~DCGround() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCGround_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCLine.cpp b/CGMES_2.4.13_18DEC2013/DCLine.cpp new file mode 100644 index 000000000..98bc5d517 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCLine.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCLine.hpp" + +#include +#include + +#include "SubGeographicalRegion.hpp" + +using namespace CIMPP; + +DCLine::DCLine() : Region(nullptr) {}; +DCLine::~DCLine() {}; + + + + +bool assign_SubGeographicalRegion_DCLines(BaseClass*, BaseClass*); +bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCLine* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_SubGeographicalRegion_DCLines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCLine::debugName[] = "DCLine"; +const char* DCLine::debugString() const +{ + return DCLine::debugName; +} + +void DCLine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCLine"), &DCLine_factory)); +} + +void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCLine::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCLine.Region"), &assign_DCLine_Region)); +} + +const BaseClassDefiner DCLine::declare() +{ + return BaseClassDefiner(DCLine::addConstructToMap, DCLine::addPrimitiveAssignFnsToMap, DCLine::addClassAssignFnsToMap, DCLine::debugName); +} + +namespace CIMPP +{ + BaseClass* DCLine_factory() + { + return new DCLine; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCLine.hpp b/CGMES_2.4.13_18DEC2013/DCLine.hpp new file mode 100644 index 000000000..24bd47128 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCLine.hpp @@ -0,0 +1,41 @@ +#ifndef DCLine_H +#define DCLine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SubGeographicalRegion; + + /* + Overhead lines and/or cables connecting two or more HVDC substations. + */ + class DCLine : public DCEquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + DCLine(); + ~DCLine() override; + + CIMPP::SubGeographicalRegion* Region; /* Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCLine_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp b/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp new file mode 100644 index 000000000..394d99e04 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCLineSegment.hpp" + +#include +#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() {}; + + + +bool assign_DCLineSegment_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCLineSegment_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCLineSegment_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->length; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCLineSegment_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + +const char DCLineSegment::debugName[] = "DCLineSegment"; +const char* DCLineSegment::debugString() const +{ + return DCLineSegment::debugName; +} + +void DCLineSegment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.PerLengthParameter"), &assign_DCLineSegment_PerLengthParameter)); +} + +const BaseClassDefiner DCLineSegment::declare() +{ + return BaseClassDefiner(DCLineSegment::addConstructToMap, DCLineSegment::addPrimitiveAssignFnsToMap, DCLineSegment::addClassAssignFnsToMap, DCLineSegment::debugName); +} + +namespace CIMPP +{ + BaseClass* DCLineSegment_factory() + { + return new DCLineSegment; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp b/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp new file mode 100644 index 000000000..784cb35e4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp @@ -0,0 +1,49 @@ +#ifndef DCLineSegment_H +#define DCLineSegment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Capacitance.hpp" +#include "Inductance.hpp" +#include "Length.hpp" +#include "Resistance.hpp" + +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. + */ + class DCLineSegment : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCLineSegment_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCNode.cpp b/CGMES_2.4.13_18DEC2013/DCNode.cpp new file mode 100644 index 000000000..3b4e6448f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCNode.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCNode.hpp" + +#include +#include + +#include "DCBaseTerminal.hpp" +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCNode::DCNode() : DCTopologicalNode(nullptr) {}; +DCNode::~DCNode() {}; + + + + + +bool assign_DCBaseTerminal_DCNode(BaseClass*, BaseClass*); +bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCNode* element = dynamic_cast(BaseClass_ptr1); + DCBaseTerminal* 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_DCBaseTerminal_DCNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalNode_DCNodes(BaseClass*, BaseClass*); +bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCNode* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCTopologicalNode != element2) + { + element->DCTopologicalNode = element2; + return assign_DCTopologicalNode_DCNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCNode::debugName[] = "DCNode"; +const char* DCNode::debugString() const +{ + return DCNode::debugName; +} + +void DCNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCNode"), &DCNode_factory)); +} + +void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCNode::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCNode::declare() +{ + return BaseClassDefiner(DCNode::addConstructToMap, DCNode::addPrimitiveAssignFnsToMap, DCNode::addClassAssignFnsToMap, DCNode::debugName); +} + +namespace CIMPP +{ + BaseClass* DCNode_factory() + { + return new DCNode; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCNode.hpp b/CGMES_2.4.13_18DEC2013/DCNode.hpp new file mode 100644 index 000000000..f6909cacc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCNode.hpp @@ -0,0 +1,43 @@ +#ifndef DCNode_H +#define DCNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCBaseTerminal; + class DCTopologicalNode; + + /* + DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. + */ + class DCNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DCNode(); + ~DCNode() override; + + std::list DCTerminals; /* Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCNode_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp b/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp new file mode 100644 index 000000000..a1a646248 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCPolarityKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DCPolarityKind& DCPolarityKind::operator=(DCPolarityKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +DCPolarityKind::operator DCPolarityKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DCPolarityKind::debugName[] = "DCPolarityKind"; +const char* DCPolarityKind::debugString() const +{ + return DCPolarityKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DCPolarityKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "DCPolarityKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "positive") + { + rop = DCPolarityKind::positive; + return lop; + } + if(EnumSymbol == "middle") + { + rop = DCPolarityKind::middle; + return lop; + } + if(EnumSymbol == "negative") + { + rop = DCPolarityKind::negative; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DCPolarityKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == DCPolarityKind::positive) + { + EnumSymbol = "positive"; + } + if (obj.value == DCPolarityKind::middle) + { + EnumSymbol = "middle"; + } + if (obj.value == DCPolarityKind::negative) + { + EnumSymbol = "negative"; + } + + if (!EnumSymbol.empty()) + { + os << "DCPolarityKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp b/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp new file mode 100644 index 000000000..8b3bd24e9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp @@ -0,0 +1,50 @@ +#ifndef DCPolarityKind_H +#define DCPolarityKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Polarity for DC circuits. + */ + class DCPolarityKind + { + public: + enum DCPolarityKind_ENUM + { + /** + * Positive pole. + */ + positive, + /** + * Middle pole, potentially grounded. + */ + middle, + /** + * Negative pole. + */ + negative, + }; + + DCPolarityKind() : value(), initialized(false) {} + DCPolarityKind(DCPolarityKind_ENUM value) : value(value), initialized(true) {} + + DCPolarityKind& operator=(DCPolarityKind_ENUM rop); + operator DCPolarityKind_ENUM() const; + + DCPolarityKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DCPolarityKind& rop); + friend std::ostream& operator<<(std::ostream& os, const DCPolarityKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp new file mode 100644 index 000000000..6cc87ef0e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCSeriesDevice.hpp" + +#include +#include + +#include "Inductance.hpp" +#include "Voltage.hpp" +#include "Resistance.hpp" + +using namespace CIMPP; + +DCSeriesDevice::DCSeriesDevice() {}; +DCSeriesDevice::~DCSeriesDevice() {}; + + +bool assign_DCSeriesDevice_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCSeriesDevice_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCSeriesDevice_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char DCSeriesDevice::debugName[] = "DCSeriesDevice"; +const char* DCSeriesDevice::debugString() const +{ + return DCSeriesDevice::debugName; +} + +void DCSeriesDevice::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCSeriesDevice::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCSeriesDevice::declare() +{ + return BaseClassDefiner(DCSeriesDevice::addConstructToMap, DCSeriesDevice::addPrimitiveAssignFnsToMap, DCSeriesDevice::addClassAssignFnsToMap, DCSeriesDevice::debugName); +} + +namespace CIMPP +{ + BaseClass* DCSeriesDevice_factory() + { + return new DCSeriesDevice; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp new file mode 100644 index 000000000..e8ac734b6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp @@ -0,0 +1,45 @@ +#ifndef DCSeriesDevice_H +#define DCSeriesDevice_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Inductance.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCSeriesDevice_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCShunt.cpp b/CGMES_2.4.13_18DEC2013/DCShunt.cpp new file mode 100644 index 000000000..b99cbcb41 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCShunt.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCShunt.hpp" + +#include +#include + +#include "Capacitance.hpp" +#include "Voltage.hpp" +#include "Resistance.hpp" + +using namespace CIMPP; + +DCShunt::DCShunt() {}; +DCShunt::~DCShunt() {}; + + +bool assign_DCShunt_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCShunt_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCShunt_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char DCShunt::debugName[] = "DCShunt"; +const char* DCShunt::debugString() const +{ + return DCShunt::debugName; +} + +void DCShunt::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCShunt::declare() +{ + return BaseClassDefiner(DCShunt::addConstructToMap, DCShunt::addPrimitiveAssignFnsToMap, DCShunt::addClassAssignFnsToMap, DCShunt::debugName); +} + +namespace CIMPP +{ + BaseClass* DCShunt_factory() + { + return new DCShunt; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCShunt.hpp b/CGMES_2.4.13_18DEC2013/DCShunt.hpp new file mode 100644 index 000000000..bc316c530 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCShunt.hpp @@ -0,0 +1,45 @@ +#ifndef DCShunt_H +#define DCShunt_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Capacitance.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + + /* + A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. + */ + class DCShunt : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCShunt_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCSwitch.cpp b/CGMES_2.4.13_18DEC2013/DCSwitch.cpp new file mode 100644 index 000000000..6ad07472d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCSwitch.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCSwitch.hpp" + +#include +#include + + +using namespace CIMPP; + +DCSwitch::DCSwitch() {}; +DCSwitch::~DCSwitch() {}; + + + +const char DCSwitch::debugName[] = "DCSwitch"; +const char* DCSwitch::debugString() const +{ + return DCSwitch::debugName; +} + +void DCSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCSwitch"), &DCSwitch_factory)); +} + +void DCSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCSwitch::declare() +{ + return BaseClassDefiner(DCSwitch::addConstructToMap, DCSwitch::addPrimitiveAssignFnsToMap, DCSwitch::addClassAssignFnsToMap, DCSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* DCSwitch_factory() + { + return new DCSwitch; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCSwitch.hpp b/CGMES_2.4.13_18DEC2013/DCSwitch.hpp new file mode 100644 index 000000000..76e968ca7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCSwitch.hpp @@ -0,0 +1,39 @@ +#ifndef DCSwitch_H +#define DCSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A switch within the DC system. + */ + class DCSwitch : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCSwitch(); + ~DCSwitch() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCSwitch_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCTerminal.cpp b/CGMES_2.4.13_18DEC2013/DCTerminal.cpp new file mode 100644 index 000000000..b9b3832c1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCTerminal.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCTerminal.hpp" + +#include +#include + +#include "DCConductingEquipment.hpp" + +using namespace CIMPP; + +DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {}; +DCTerminal::~DCTerminal() {}; + + + + +bool assign_DCConductingEquipment_DCTerminals(BaseClass*, BaseClass*); +bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTerminal* element = dynamic_cast(BaseClass_ptr1); + DCConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCConductingEquipment != element2) + { + element->DCConductingEquipment = element2; + return assign_DCConductingEquipment_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCTerminal::debugName[] = "DCTerminal"; +const char* DCTerminal::debugString() const +{ + return DCTerminal::debugName; +} + +void DCTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCTerminal"), &DCTerminal_factory)); +} + +void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCTerminal.DCConductingEquipment"), &assign_DCTerminal_DCConductingEquipment)); +} + +const BaseClassDefiner DCTerminal::declare() +{ + return BaseClassDefiner(DCTerminal::addConstructToMap, DCTerminal::addPrimitiveAssignFnsToMap, DCTerminal::addClassAssignFnsToMap, DCTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* DCTerminal_factory() + { + return new DCTerminal; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCTerminal.hpp b/CGMES_2.4.13_18DEC2013/DCTerminal.hpp new file mode 100644 index 000000000..05e64cb3b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCTerminal.hpp @@ -0,0 +1,41 @@ +#ifndef DCTerminal_H +#define DCTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCBaseTerminal.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCTerminal : public DCBaseTerminal + { + public: + /* constructor initialising all attributes to null */ + DCTerminal(); + ~DCTerminal() override; + + CIMPP::DCConductingEquipment* DCConductingEquipment; /* Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCTerminal_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp new file mode 100644 index 000000000..a764d3e3e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCTopologicalIsland.hpp" + +#include +#include + +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCTopologicalIsland::DCTopologicalIsland() {}; +DCTopologicalIsland::~DCTopologicalIsland() {}; + + + + +bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass*, BaseClass*); +bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTopologicalNodes.begin(), element->DCTopologicalNodes.end(), element2) == element->DCTopologicalNodes.end()) + { + element->DCTopologicalNodes.push_back(element2); + return assign_DCTopologicalNode_DCTopologicalIsland(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCTopologicalIsland::debugName[] = "DCTopologicalIsland"; +const char* DCTopologicalIsland::debugString() const +{ + return DCTopologicalIsland::debugName; +} + +void DCTopologicalIsland::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland"), &DCTopologicalIsland_factory)); +} + +void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCTopologicalIsland::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland.DCTopologicalNodes"), &assign_DCTopologicalIsland_DCTopologicalNodes)); +} + +const BaseClassDefiner DCTopologicalIsland::declare() +{ + return BaseClassDefiner(DCTopologicalIsland::addConstructToMap, DCTopologicalIsland::addPrimitiveAssignFnsToMap, DCTopologicalIsland::addClassAssignFnsToMap, DCTopologicalIsland::debugName); +} + +namespace CIMPP +{ + BaseClass* DCTopologicalIsland_factory() + { + return new DCTopologicalIsland; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp new file mode 100644 index 000000000..7a2e853f2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp @@ -0,0 +1,41 @@ +#ifndef DCTopologicalIsland_H +#define DCTopologicalIsland_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCTopologicalIsland : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DCTopologicalIsland(); + ~DCTopologicalIsland() override; + + std::list DCTopologicalNodes; /* Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCTopologicalIsland_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp new file mode 100644 index 000000000..5a31638d6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCTopologicalNode.hpp" + +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "DCNode.hpp" +#include "DCBaseTerminal.hpp" +#include "DCTopologicalIsland.hpp" + +using namespace CIMPP; + +DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {}; +DCTopologicalNode::~DCTopologicalNode() {}; + + + + + + + +bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCEquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCEquipmentContainer != element2) + { + element->DCEquipmentContainer = element2; + return assign_DCEquipmentContainer_DCTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCNode_DCTopologicalNode(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCNodes.begin(), element->DCNodes.end(), element2) == element->DCNodes.end()) + { + element->DCNodes.push_back(element2); + return assign_DCNode_DCTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCBaseTerminal* 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_DCBaseTerminal_DCTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalIsland* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCTopologicalIsland != element2) + { + element->DCTopologicalIsland = element2; + return assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCTopologicalNode::debugName[] = "DCTopologicalNode"; +const char* DCTopologicalNode::debugString() const +{ + return DCTopologicalNode::debugName; +} + +void DCTopologicalNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCTopologicalNode"), &DCTopologicalNode_factory)); +} + +void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCTopologicalNode::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCTopologicalNode::declare() +{ + return BaseClassDefiner(DCTopologicalNode::addConstructToMap, DCTopologicalNode::addPrimitiveAssignFnsToMap, DCTopologicalNode::addClassAssignFnsToMap, DCTopologicalNode::debugName); +} + +namespace CIMPP +{ + BaseClass* DCTopologicalNode_factory() + { + return new DCTopologicalNode; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp new file mode 100644 index 000000000..b7006a6b3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp @@ -0,0 +1,47 @@ +#ifndef DCTopologicalNode_H +#define DCTopologicalNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCBaseTerminal; + class DCEquipmentContainer; + class DCNode; + class DCTopologicalIsland; + + /* + DC bus. + */ + class DCTopologicalNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCTopologicalNode_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Date.cpp b/CGMES_2.4.13_18DEC2013/Date.cpp new file mode 100644 index 000000000..6bcf3159e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Date.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Date.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Date& Date::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +Date::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Date::debugName[] = "Date"; +const char* Date::debugString() const +{ + return Date::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Date& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Date& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Date.hpp b/CGMES_2.4.13_18DEC2013/Date.hpp new file mode 100644 index 000000000..e2063f08d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Date.hpp @@ -0,0 +1,35 @@ +#ifndef Date_H +#define Date_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#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". + */ + class Date + { + public: + Date() : initialized(false) {} + Date(const std::string& value) : value(value), initialized(true) {} + + Date& operator=(const std::string &rop); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Date& rop); + friend std::ostream& operator<<(std::ostream& os, const Date& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DateTime.cpp b/CGMES_2.4.13_18DEC2013/DateTime.cpp new file mode 100644 index 000000000..866aa87b0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DateTime.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DateTime.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DateTime& DateTime::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +DateTime::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DateTime::debugName[] = "DateTime"; +const char* DateTime::debugString() const +{ + return DateTime::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DateTime& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DateTime& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DateTime.hpp b/CGMES_2.4.13_18DEC2013/DateTime.hpp new file mode 100644 index 000000000..745e7583b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DateTime.hpp @@ -0,0 +1,35 @@ +#ifndef DateTime_H +#define DateTime_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#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. + */ + class DateTime + { + public: + DateTime() : initialized(false) {} + DateTime(const std::string& value) : value(value), initialized(true) {} + + DateTime& operator=(const std::string &rop); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DateTime& rop); + friend std::ostream& operator<<(std::ostream& os, const DateTime& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DayType.cpp b/CGMES_2.4.13_18DEC2013/DayType.cpp new file mode 100644 index 000000000..e53f29f9f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DayType.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DayType.hpp" + +#include +#include + +#include "SeasonDayTypeSchedule.hpp" + +using namespace CIMPP; + +DayType::DayType() {}; +DayType::~DayType() {}; + + + + +bool assign_SeasonDayTypeSchedule_DayType(BaseClass*, BaseClass*); +bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DayType* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + { + element->SeasonDayTypeSchedules.push_back(element2); + return assign_SeasonDayTypeSchedule_DayType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DayType::debugName[] = "DayType"; +const char* DayType::debugString() const +{ + return DayType::debugName; +} + +void DayType::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DayType"), &DayType_factory)); +} + +void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DayType::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DayType.SeasonDayTypeSchedules"), &assign_DayType_SeasonDayTypeSchedules)); +} + +const BaseClassDefiner DayType::declare() +{ + return BaseClassDefiner(DayType::addConstructToMap, DayType::addPrimitiveAssignFnsToMap, DayType::addClassAssignFnsToMap, DayType::debugName); +} + +namespace CIMPP +{ + BaseClass* DayType_factory() + { + return new DayType; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DayType.hpp b/CGMES_2.4.13_18DEC2013/DayType.hpp new file mode 100644 index 000000000..578cabc93 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DayType.hpp @@ -0,0 +1,41 @@ +#ifndef DayType_H +#define DayType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SeasonDayTypeSchedule; + + /* + Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. + */ + class DayType : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DayType(); + ~DayType() override; + + std::list SeasonDayTypeSchedules; /* DayType for the Schedule. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DayType_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Decimal.cpp b/CGMES_2.4.13_18DEC2013/Decimal.cpp new file mode 100644 index 000000000..98be5f30e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Decimal.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Decimal.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Decimal& Decimal::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Decimal::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Decimal::debugName[] = "Decimal"; +const char* Decimal::debugString() const +{ + return Decimal::debugName; +} + +Decimal& Decimal::operator+=(const Decimal& rhs) +{ + value += rhs.value; + return *this; +} + +Decimal& Decimal::operator-=(const Decimal& rhs) +{ + value -= rhs.value; + return *this; +} + +Decimal& Decimal::operator*=(const Decimal& rhs) +{ + value *= rhs.value; + return *this; +} + +Decimal& Decimal::operator/=(const Decimal& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Decimal& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Decimal& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Decimal.hpp b/CGMES_2.4.13_18DEC2013/Decimal.hpp new file mode 100644 index 000000000..fa74e37f8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Decimal.hpp @@ -0,0 +1,39 @@ +#ifndef Decimal_H +#define Decimal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Decimal is the base-10 notational system for representing real numbers. + */ + class Decimal + { + public: + Decimal() : value(0.0), initialized(false) {} + Decimal(long double value) : value(value), initialized(true) {} + + Decimal& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Decimal& operator+=(const Decimal& rhs); + Decimal& operator-=(const Decimal& rhs); + Decimal& operator*=(const Decimal& rhs); + Decimal& operator/=(const Decimal& rhs); + + friend std::istream& operator>>(std::istream& lop, Decimal& rop); + friend std::ostream& operator<<(std::ostream& os, const Decimal& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Diagram.cpp b/CGMES_2.4.13_18DEC2013/Diagram.cpp new file mode 100644 index 000000000..c90822887 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Diagram.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Diagram.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_Diagram_orientation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->orientation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_x1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x1InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_x2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x2InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_y1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y1InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_y2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y2InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_DiagramStyle_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramStyle != element2) + { + element->DiagramStyle = element2; + return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char Diagram::debugName[] = "Diagram"; +const char* Diagram::debugString() const +{ + return Diagram::debugName; +} + +void Diagram::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Diagram::declare() +{ + return BaseClassDefiner(Diagram::addConstructToMap, Diagram::addPrimitiveAssignFnsToMap, Diagram::addClassAssignFnsToMap, Diagram::debugName); +} + +namespace CIMPP +{ + BaseClass* Diagram_factory() + { + return new Diagram; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Diagram.hpp b/CGMES_2.4.13_18DEC2013/Diagram.hpp new file mode 100644 index 000000000..571c85e7c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Diagram.hpp @@ -0,0 +1,50 @@ +#ifndef Diagram_H +#define Diagram_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "OrientationKind.hpp" +#include "Simple_Float.hpp" + +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. + */ + class Diagram : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Diagram_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp new file mode 100644 index 000000000..24968c480 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramLayoutVersion.hpp" + +#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() {}; + + +bool assign_DiagramLayoutVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramLayoutVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char DiagramLayoutVersion::debugName[] = "DiagramLayoutVersion"; +const char* DiagramLayoutVersion::debugString() const +{ + return DiagramLayoutVersion::debugName; +} + +void DiagramLayoutVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiagramLayoutVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiagramLayoutVersion::declare() +{ + return BaseClassDefiner(DiagramLayoutVersion::addConstructToMap, DiagramLayoutVersion::addPrimitiveAssignFnsToMap, DiagramLayoutVersion::addClassAssignFnsToMap, DiagramLayoutVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramLayoutVersion_factory() + { + return new DiagramLayoutVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp new file mode 100644 index 000000000..4cef20371 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp @@ -0,0 +1,51 @@ +#ifndef DiagramLayoutVersion_H +#define DiagramLayoutVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class DiagramLayoutVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramLayoutVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiagramObject.cpp b/CGMES_2.4.13_18DEC2013/DiagramObject.cpp new file mode 100644 index 000000000..686fdca1f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObject.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObject.hpp" + +#include +#include + +#include "Diagram.hpp" +#include "DiagramObjectPoint.hpp" +#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() {}; + + + + + + + +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) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + Diagram* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Diagram != element2) + { + element->Diagram = element2; + return assign_Diagram_DiagramElements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_DiagramObject(BaseClass*, BaseClass*); +bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DiagramObjectPoints.begin(), element->DiagramObjectPoints.end(), element2) == element->DiagramObjectPoints.end()) + { + element->DiagramObjectPoints.push_back(element2); + return assign_DiagramObjectPoint_DiagramObject(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiagramObjectStyle_StyledObjects(BaseClass*, BaseClass*); +bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramObjectStyle != element2) + { + element->DiagramObjectStyle = element2; + return assign_DiagramObjectStyle_StyledObjects(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_IdentifiedObject_DiagramObjects(BaseClass*, BaseClass*); +bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + IdentifiedObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->IdentifiedObject != element2) + { + element->IdentifiedObject = element2; + return assign_IdentifiedObject_DiagramObjects(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VisibilityLayer_VisibleObjects(BaseClass*, BaseClass*); +bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + VisibilityLayer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VisibilityLayers.begin(), element->VisibilityLayers.end(), element2) == element->VisibilityLayers.end()) + { + element->VisibilityLayers.push_back(element2); + return assign_VisibilityLayer_VisibleObjects(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char DiagramObject::debugName[] = "DiagramObject"; +const char* DiagramObject::debugString() const +{ + return DiagramObject::debugName; +} + +void DiagramObject::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner DiagramObject::declare() +{ + return BaseClassDefiner(DiagramObject::addConstructToMap, DiagramObject::addPrimitiveAssignFnsToMap, DiagramObject::addClassAssignFnsToMap, DiagramObject::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObject_factory() + { + return new DiagramObject; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiagramObject.hpp b/CGMES_2.4.13_18DEC2013/DiagramObject.hpp new file mode 100644 index 000000000..62798b6e9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObject.hpp @@ -0,0 +1,58 @@ +#ifndef DiagramObject_H +#define DiagramObject_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class Diagram; + class DiagramObjectPoint; + class DiagramObjectStyle; + 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. + */ + class DiagramObject : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObject_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp new file mode 100644 index 000000000..9efe6a370 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObjectGluePoint.hpp" + +#include +#include + +#include "DiagramObjectPoint.hpp" + +using namespace CIMPP; + +DiagramObjectGluePoint::DiagramObjectGluePoint() {}; +DiagramObjectGluePoint::~DiagramObjectGluePoint() {}; + + + + +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass*, BaseClass*); +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectGluePoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DiagramObjectPoints.begin(), element->DiagramObjectPoints.end(), element2) == element->DiagramObjectPoints.end()) + { + element->DiagramObjectPoints.push_back(element2); + return assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiagramObjectGluePoint::debugName[] = "DiagramObjectGluePoint"; +const char* DiagramObjectGluePoint::debugString() const +{ + return DiagramObjectGluePoint::debugName; +} + +void DiagramObjectGluePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint"), &DiagramObjectGluePoint_factory)); +} + +void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DiagramObjectGluePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint.DiagramObjectPoints"), &assign_DiagramObjectGluePoint_DiagramObjectPoints)); +} + +const BaseClassDefiner DiagramObjectGluePoint::declare() +{ + return BaseClassDefiner(DiagramObjectGluePoint::addConstructToMap, DiagramObjectGluePoint::addPrimitiveAssignFnsToMap, DiagramObjectGluePoint::addClassAssignFnsToMap, DiagramObjectGluePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObjectGluePoint_factory() + { + return new DiagramObjectGluePoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp new file mode 100644 index 000000000..09f9a7fe8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp @@ -0,0 +1,41 @@ +#ifndef DiagramObjectGluePoint_H +#define DiagramObjectGluePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiagramObjectGluePoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + DiagramObjectGluePoint(); + ~DiagramObjectGluePoint() override; + + std::list DiagramObjectPoints; /* The `glue` point to which this point is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObjectGluePoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp new file mode 100644 index 000000000..488a291cc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp @@ -0,0 +1,151 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObjectPoint.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sequenceNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xPosition; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yPosition; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zPosition; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramObject != element2) + { + element->DiagramObject = element2; + return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramObjectGluePoint != element2) + { + element->DiagramObjectGluePoint = element2; + return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char DiagramObjectPoint::debugName[] = "DiagramObjectPoint"; +const char* DiagramObjectPoint::debugString() const +{ + return DiagramObjectPoint::debugName; +} + +void DiagramObjectPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner DiagramObjectPoint::declare() +{ + return BaseClassDefiner(DiagramObjectPoint::addConstructToMap, DiagramObjectPoint::addPrimitiveAssignFnsToMap, DiagramObjectPoint::addClassAssignFnsToMap, DiagramObjectPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObjectPoint_factory() + { + return new DiagramObjectPoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp new file mode 100644 index 000000000..d433fab0e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp @@ -0,0 +1,49 @@ +#ifndef DiagramObjectPoint_H +#define DiagramObjectPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" + +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. + */ + class DiagramObjectPoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObjectPoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp new file mode 100644 index 000000000..8bf2e688d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObjectStyle.hpp" + +#include +#include + +#include "DiagramObject.hpp" + +using namespace CIMPP; + +DiagramObjectStyle::DiagramObjectStyle() {}; +DiagramObjectStyle::~DiagramObjectStyle() {}; + + + + +bool assign_DiagramObject_DiagramObjectStyle(BaseClass*, BaseClass*); +bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectStyle* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->StyledObjects.begin(), element->StyledObjects.end(), element2) == element->StyledObjects.end()) + { + element->StyledObjects.push_back(element2); + return assign_DiagramObject_DiagramObjectStyle(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiagramObjectStyle::debugName[] = "DiagramObjectStyle"; +const char* DiagramObjectStyle::debugString() const +{ + return DiagramObjectStyle::debugName; +} + +void DiagramObjectStyle::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle"), &DiagramObjectStyle_factory)); +} + +void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DiagramObjectStyle::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle.StyledObjects"), &assign_DiagramObjectStyle_StyledObjects)); +} + +const BaseClassDefiner DiagramObjectStyle::declare() +{ + return BaseClassDefiner(DiagramObjectStyle::addConstructToMap, DiagramObjectStyle::addPrimitiveAssignFnsToMap, DiagramObjectStyle::addClassAssignFnsToMap, DiagramObjectStyle::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObjectStyle_factory() + { + return new DiagramObjectStyle; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp new file mode 100644 index 000000000..ff6524077 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp @@ -0,0 +1,41 @@ +#ifndef DiagramObjectStyle_H +#define DiagramObjectStyle_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiagramObjectStyle : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DiagramObjectStyle(); + ~DiagramObjectStyle() override; + + std::list StyledObjects; /* A style can be assigned to multiple diagram objects. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObjectStyle_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp b/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp new file mode 100644 index 000000000..eae09c4d7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramStyle.hpp" + +#include +#include + +#include "Diagram.hpp" + +using namespace CIMPP; + +DiagramStyle::DiagramStyle() {}; +DiagramStyle::~DiagramStyle() {}; + + + + +bool assign_Diagram_DiagramStyle(BaseClass*, BaseClass*); +bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramStyle* element = dynamic_cast(BaseClass_ptr1); + Diagram* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Diagram.begin(), element->Diagram.end(), element2) == element->Diagram.end()) + { + element->Diagram.push_back(element2); + return assign_Diagram_DiagramStyle(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiagramStyle::debugName[] = "DiagramStyle"; +const char* DiagramStyle::debugString() const +{ + return DiagramStyle::debugName; +} + +void DiagramStyle::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiagramStyle"), &DiagramStyle_factory)); +} + +void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DiagramStyle::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiagramStyle.Diagram"), &assign_DiagramStyle_Diagram)); +} + +const BaseClassDefiner DiagramStyle::declare() +{ + return BaseClassDefiner(DiagramStyle::addConstructToMap, DiagramStyle::addPrimitiveAssignFnsToMap, DiagramStyle::addClassAssignFnsToMap, DiagramStyle::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramStyle_factory() + { + return new DiagramStyle; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp b/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp new file mode 100644 index 000000000..43960b981 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp @@ -0,0 +1,41 @@ +#ifndef DiagramStyle_H +#define DiagramStyle_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiagramStyle : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DiagramStyle(); + ~DiagramStyle() override; + + std::list Diagram; /* A DiagramStyle can be used by many Diagrams. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramStyle_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp new file mode 100644 index 000000000..fecfe649c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscExcContIEEEDEC1A.hpp" + +#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() {}; + + +bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->esc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kan; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ketl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tan; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_val(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->val; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vanmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vomax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vomin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtlmt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char DiscExcContIEEEDEC1A::debugName[] = "DiscExcContIEEEDEC1A"; +const char* DiscExcContIEEEDEC1A::debugString() const +{ + return DiscExcContIEEEDEC1A::debugName; +} + +void DiscExcContIEEEDEC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscExcContIEEEDEC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiscExcContIEEEDEC1A::declare() +{ + return BaseClassDefiner(DiscExcContIEEEDEC1A::addConstructToMap, DiscExcContIEEEDEC1A::addPrimitiveAssignFnsToMap, DiscExcContIEEEDEC1A::addClassAssignFnsToMap, DiscExcContIEEEDEC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscExcContIEEEDEC1A_factory() + { + return new DiscExcContIEEEDEC1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp new file mode 100644 index 000000000..e7c14b65d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp @@ -0,0 +1,59 @@ +#ifndef DiscExcContIEEEDEC1A_H +#define DiscExcContIEEEDEC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class DiscExcContIEEEDEC1A : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscExcContIEEEDEC1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp new file mode 100644 index 000000000..0b0a7a11a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscExcContIEEEDEC2A.hpp" + +#include +#include + +#include "Seconds.hpp" +#include "Seconds.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {}; +DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {}; + + +bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char DiscExcContIEEEDEC2A::debugName[] = "DiscExcContIEEEDEC2A"; +const char* DiscExcContIEEEDEC2A::debugString() const +{ + return DiscExcContIEEEDEC2A::debugName; +} + +void DiscExcContIEEEDEC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscExcContIEEEDEC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiscExcContIEEEDEC2A::declare() +{ + return BaseClassDefiner(DiscExcContIEEEDEC2A::addConstructToMap, DiscExcContIEEEDEC2A::addPrimitiveAssignFnsToMap, DiscExcContIEEEDEC2A::addClassAssignFnsToMap, DiscExcContIEEEDEC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscExcContIEEEDEC2A_factory() + { + return new DiscExcContIEEEDEC2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp new file mode 100644 index 000000000..35bb8c70a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp @@ -0,0 +1,46 @@ +#ifndef DiscExcContIEEEDEC2A_H +#define DiscExcContIEEEDEC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class DiscExcContIEEEDEC2A : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscExcContIEEEDEC2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp new file mode 100644 index 000000000..af7d8f9ad --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscExcContIEEEDEC3A.hpp" + +#include +#include + +#include "Seconds.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {}; +DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {}; + + +bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char DiscExcContIEEEDEC3A::debugName[] = "DiscExcContIEEEDEC3A"; +const char* DiscExcContIEEEDEC3A::debugString() const +{ + return DiscExcContIEEEDEC3A::debugName; +} + +void DiscExcContIEEEDEC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscExcContIEEEDEC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiscExcContIEEEDEC3A::declare() +{ + return BaseClassDefiner(DiscExcContIEEEDEC3A::addConstructToMap, DiscExcContIEEEDEC3A::addPrimitiveAssignFnsToMap, DiscExcContIEEEDEC3A::addClassAssignFnsToMap, DiscExcContIEEEDEC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscExcContIEEEDEC3A_factory() + { + return new DiscExcContIEEEDEC3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp new file mode 100644 index 000000000..b6c4728f7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp @@ -0,0 +1,43 @@ +#ifndef DiscExcContIEEEDEC3A_H +#define DiscExcContIEEEDEC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class DiscExcContIEEEDEC3A : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + DiscExcContIEEEDEC3A(); + ~DiscExcContIEEEDEC3A() override; + + CIMPP::Seconds tdr; /* Reset time delay (). Default: nullptr */ + CIMPP::PU vtmin; /* Terminal undervoltage comparison level (). Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscExcContIEEEDEC3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Disconnector.cpp b/CGMES_2.4.13_18DEC2013/Disconnector.cpp new file mode 100644 index 000000000..4c56bdfb9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Disconnector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Disconnector.hpp" + +#include +#include + + +using namespace CIMPP; + +Disconnector::Disconnector() {}; +Disconnector::~Disconnector() {}; + + + +const char Disconnector::debugName[] = "Disconnector"; +const char* Disconnector::debugString() const +{ + return Disconnector::debugName; +} + +void Disconnector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Disconnector"), &Disconnector_factory)); +} + +void Disconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Disconnector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Disconnector::declare() +{ + return BaseClassDefiner(Disconnector::addConstructToMap, Disconnector::addPrimitiveAssignFnsToMap, Disconnector::addClassAssignFnsToMap, Disconnector::debugName); +} + +namespace CIMPP +{ + BaseClass* Disconnector_factory() + { + return new Disconnector; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Disconnector.hpp b/CGMES_2.4.13_18DEC2013/Disconnector.hpp new file mode 100644 index 000000000..a818915ac --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Disconnector.hpp @@ -0,0 +1,39 @@ +#ifndef Disconnector_H +#define Disconnector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Disconnector : public Switch + { + public: + /* constructor initialising all attributes to null */ + Disconnector(); + ~Disconnector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Disconnector_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp new file mode 100644 index 000000000..edf98a3ae --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscontinuousExcitationControlDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; +DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); +bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); +bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiscontinuousExcitationControlDynamics::debugName[] = "DiscontinuousExcitationControlDynamics"; +const char* DiscontinuousExcitationControlDynamics::debugString() const +{ + return DiscontinuousExcitationControlDynamics::debugName; +} + +void DiscontinuousExcitationControlDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics"), &DiscontinuousExcitationControlDynamics_factory)); +} + +void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner DiscontinuousExcitationControlDynamics::declare() +{ + return BaseClassDefiner(DiscontinuousExcitationControlDynamics::addConstructToMap, DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap, DiscontinuousExcitationControlDynamics::addClassAssignFnsToMap, DiscontinuousExcitationControlDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscontinuousExcitationControlDynamics_factory() + { + return new DiscontinuousExcitationControlDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp new file mode 100644 index 000000000..110a96824 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef DiscontinuousExcitationControlDynamics_H +#define DiscontinuousExcitationControlDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + class RemoteInputSignal; + + /* + Discontinuous excitation control function block whose behaviour is described by reference to a standard model . + */ + class DiscontinuousExcitationControlDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscontinuousExcitationControlDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp new file mode 100644 index 000000000..f0cdf252e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscontinuousExcitationControlUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {}; +DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {}; + + + +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) +{ + DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char DiscontinuousExcitationControlUserDefined::debugName[] = "DiscontinuousExcitationControlUserDefined"; +const char* DiscontinuousExcitationControlUserDefined::debugString() const +{ + return DiscontinuousExcitationControlUserDefined::debugName; +} + +void DiscontinuousExcitationControlUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics"), &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner DiscontinuousExcitationControlUserDefined::declare() +{ + return BaseClassDefiner(DiscontinuousExcitationControlUserDefined::addConstructToMap, DiscontinuousExcitationControlUserDefined::addPrimitiveAssignFnsToMap, DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap, DiscontinuousExcitationControlUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscontinuousExcitationControlUserDefined_factory() + { + return new DiscontinuousExcitationControlUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp new file mode 100644 index 000000000..6b48fa523 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef DiscontinuousExcitationControlUserDefined_H +#define DiscontinuousExcitationControlUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Discontinuous excitation control function block whose dynamic behaviour is described by + */ + class DiscontinuousExcitationControlUserDefined : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscontinuousExcitationControlUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Discrete.cpp b/CGMES_2.4.13_18DEC2013/Discrete.cpp new file mode 100644 index 000000000..d6d1f006f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Discrete.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Discrete.hpp" + +#include +#include + +#include "DiscreteValue.hpp" +#include "ValueAliasSet.hpp" + +using namespace CIMPP; + +Discrete::Discrete() : ValueAliasSet(nullptr) {}; +Discrete::~Discrete() {}; + + + + + +bool assign_DiscreteValue_Discrete(BaseClass*, BaseClass*); +bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Discrete* element = dynamic_cast(BaseClass_ptr1); + DiscreteValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DiscreteValues.begin(), element->DiscreteValues.end(), element2) == element->DiscreteValues.end()) + { + element->DiscreteValues.push_back(element2); + return assign_DiscreteValue_Discrete(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ValueAliasSet_Discretes(BaseClass*, BaseClass*); +bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Discrete* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_Discretes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Discrete::debugName[] = "Discrete"; +const char* Discrete::debugString() const +{ + return Discrete::debugName; +} + +void Discrete::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Discrete"), &Discrete_factory)); +} + +void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Discrete::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Discrete::declare() +{ + return BaseClassDefiner(Discrete::addConstructToMap, Discrete::addPrimitiveAssignFnsToMap, Discrete::addClassAssignFnsToMap, Discrete::debugName); +} + +namespace CIMPP +{ + BaseClass* Discrete_factory() + { + return new Discrete; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Discrete.hpp b/CGMES_2.4.13_18DEC2013/Discrete.hpp new file mode 100644 index 000000000..3a3e2b07c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Discrete.hpp @@ -0,0 +1,43 @@ +#ifndef Discrete_H +#define Discrete_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DiscreteValue; + class ValueAliasSet; + + /* + Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. + */ + class Discrete : public Measurement + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Discrete_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp b/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp new file mode 100644 index 000000000..52264d6bd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscreteValue.hpp" + +#include +#include + +#include "Command.hpp" +#include "Discrete.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {}; +DiscreteValue::~DiscreteValue() {}; + + + + +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) +{ + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + Command* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Command != element2) + { + element->Command = element2; + return assign_Command_DiscreteValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Discrete_DiscreteValues(BaseClass*, BaseClass*); +bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + Discrete* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Discrete != element2) + { + element->Discrete = element2; + return assign_Discrete_DiscreteValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char DiscreteValue::debugName[] = "DiscreteValue"; +const char* DiscreteValue::debugString() const +{ + return DiscreteValue::debugName; +} + +void DiscreteValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner DiscreteValue::declare() +{ + return BaseClassDefiner(DiscreteValue::addConstructToMap, DiscreteValue::addPrimitiveAssignFnsToMap, DiscreteValue::addClassAssignFnsToMap, DiscreteValue::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscreteValue_factory() + { + return new DiscreteValue; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp b/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp new file mode 100644 index 000000000..9345c3775 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp @@ -0,0 +1,45 @@ +#ifndef DiscreteValue_H +#define DiscreteValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class Command; + class Discrete; + + /* + DiscreteValue represents a discrete MeasurementValue. + */ + class DiscreteValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscreteValue_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp new file mode 100644 index 000000000..ca339f115 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DroopSignalFeedbackKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DroopSignalFeedbackKind& DroopSignalFeedbackKind::operator=(DroopSignalFeedbackKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +DroopSignalFeedbackKind::operator DroopSignalFeedbackKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DroopSignalFeedbackKind::debugName[] = "DroopSignalFeedbackKind"; +const char* DroopSignalFeedbackKind::debugString() const +{ + return DroopSignalFeedbackKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DroopSignalFeedbackKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "electricalPower") + { + rop = DroopSignalFeedbackKind::electricalPower; + return lop; + } + if(EnumSymbol == "none") + { + rop = DroopSignalFeedbackKind::none; + return lop; + } + if(EnumSymbol == "fuelValveStroke") + { + rop = DroopSignalFeedbackKind::fuelValveStroke; + return lop; + } + if(EnumSymbol == "governorOutput") + { + rop = DroopSignalFeedbackKind::governorOutput; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DroopSignalFeedbackKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == DroopSignalFeedbackKind::electricalPower) + { + EnumSymbol = "electricalPower"; + } + if (obj.value == DroopSignalFeedbackKind::none) + { + EnumSymbol = "none"; + } + if (obj.value == DroopSignalFeedbackKind::fuelValveStroke) + { + EnumSymbol = "fuelValveStroke"; + } + if (obj.value == DroopSignalFeedbackKind::governorOutput) + { + EnumSymbol = "governorOutput"; + } + + if (!EnumSymbol.empty()) + { + os << "DroopSignalFeedbackKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp new file mode 100644 index 000000000..de948a1bc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp @@ -0,0 +1,54 @@ +#ifndef DroopSignalFeedbackKind_H +#define DroopSignalFeedbackKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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). + */ + electricalPower, + /** + * 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). + */ + fuelValveStroke, + /** + * Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). + */ + governorOutput, + }; + + DroopSignalFeedbackKind() : value(), initialized(false) {} + DroopSignalFeedbackKind(DroopSignalFeedbackKind_ENUM value) : value(value), initialized(true) {} + + DroopSignalFeedbackKind& operator=(DroopSignalFeedbackKind_ENUM rop); + operator DroopSignalFeedbackKind_ENUM() const; + + DroopSignalFeedbackKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DroopSignalFeedbackKind& rop); + friend std::ostream& operator<<(std::ostream& os, const DroopSignalFeedbackKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp new file mode 100644 index 000000000..d45cc9fc5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DynamicsFunctionBlock.hpp" + +#include +#include + +#include "Boolean.hpp" + +using namespace CIMPP; + +DynamicsFunctionBlock::DynamicsFunctionBlock() {}; +DynamicsFunctionBlock::~DynamicsFunctionBlock() {}; + + +bool assign_DynamicsFunctionBlock_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->enabled; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char DynamicsFunctionBlock::debugName[] = "DynamicsFunctionBlock"; +const char* DynamicsFunctionBlock::debugString() const +{ + return DynamicsFunctionBlock::debugName; +} + +void DynamicsFunctionBlock::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DynamicsFunctionBlock::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DynamicsFunctionBlock::declare() +{ + return BaseClassDefiner(DynamicsFunctionBlock::addConstructToMap, DynamicsFunctionBlock::addPrimitiveAssignFnsToMap, DynamicsFunctionBlock::addClassAssignFnsToMap, DynamicsFunctionBlock::debugName); +} + +namespace CIMPP +{ + BaseClass* DynamicsFunctionBlock_factory() + { + return new DynamicsFunctionBlock; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp new file mode 100644 index 000000000..75c86d07d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp @@ -0,0 +1,41 @@ +#ifndef DynamicsFunctionBlock_H +#define DynamicsFunctionBlock_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + + /* + Abstract parent class for all Dynamics function blocks. + */ + class DynamicsFunctionBlock : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DynamicsFunctionBlock_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp b/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp new file mode 100644 index 000000000..959b46475 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DynamicsVersion.hpp" + +#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() {}; + + +bool assign_DynamicsVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DynamicsVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char DynamicsVersion::debugName[] = "DynamicsVersion"; +const char* DynamicsVersion::debugString() const +{ + return DynamicsVersion::debugName; +} + +void DynamicsVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DynamicsVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DynamicsVersion::declare() +{ + return BaseClassDefiner(DynamicsVersion::addConstructToMap, DynamicsVersion::addPrimitiveAssignFnsToMap, DynamicsVersion::addClassAssignFnsToMap, DynamicsVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* DynamicsVersion_factory() + { + return new DynamicsVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp b/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp new file mode 100644 index 000000000..4f0dde70f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp @@ -0,0 +1,51 @@ +#ifndef DynamicsVersion_H +#define DynamicsVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class DynamicsVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DynamicsVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp new file mode 100644 index 000000000..3d4c826d4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EarthFaultCompensator.hpp" + +#include +#include + +#include "Resistance.hpp" + +using namespace CIMPP; + +EarthFaultCompensator::EarthFaultCompensator() {}; +EarthFaultCompensator::~EarthFaultCompensator() {}; + + +bool assign_EarthFaultCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char EarthFaultCompensator::debugName[] = "EarthFaultCompensator"; +const char* EarthFaultCompensator::debugString() const +{ + return EarthFaultCompensator::debugName; +} + +void EarthFaultCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EarthFaultCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EarthFaultCompensator::declare() +{ + return BaseClassDefiner(EarthFaultCompensator::addConstructToMap, EarthFaultCompensator::addPrimitiveAssignFnsToMap, EarthFaultCompensator::addClassAssignFnsToMap, EarthFaultCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* EarthFaultCompensator_factory() + { + return new EarthFaultCompensator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp new file mode 100644 index 000000000..9d323d750 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp @@ -0,0 +1,41 @@ +#ifndef EarthFaultCompensator_H +#define EarthFaultCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Resistance.hpp" + +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. + */ + class EarthFaultCompensator : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + EarthFaultCompensator(); + ~EarthFaultCompensator() override; + + CIMPP::Resistance r; /* Nominal resistance of device. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EarthFaultCompensator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EnergyArea.cpp b/CGMES_2.4.13_18DEC2013/EnergyArea.cpp new file mode 100644 index 000000000..e32dc8db6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergyArea.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergyArea.hpp" + +#include +#include + +#include "ControlArea.hpp" + +using namespace CIMPP; + +EnergyArea::EnergyArea() : ControlArea(nullptr) {}; +EnergyArea::~EnergyArea() {}; + + + + +bool assign_ControlArea_EnergyArea(BaseClass*, BaseClass*); +bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergyArea* element = dynamic_cast(BaseClass_ptr1); + ControlArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ControlArea != element2) + { + element->ControlArea = element2; + return assign_ControlArea_EnergyArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EnergyArea::debugName[] = "EnergyArea"; +const char* EnergyArea::debugString() const +{ + return EnergyArea::debugName; +} + +void EnergyArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EnergyArea"), &EnergyArea_factory)); +} + +void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EnergyArea::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EnergyArea.ControlArea"), &assign_EnergyArea_ControlArea)); +} + +const BaseClassDefiner EnergyArea::declare() +{ + return BaseClassDefiner(EnergyArea::addConstructToMap, EnergyArea::addPrimitiveAssignFnsToMap, EnergyArea::addClassAssignFnsToMap, EnergyArea::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergyArea_factory() + { + return new EnergyArea; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EnergyArea.hpp b/CGMES_2.4.13_18DEC2013/EnergyArea.hpp new file mode 100644 index 000000000..b8b5fc6fc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergyArea.hpp @@ -0,0 +1,41 @@ +#ifndef EnergyArea_H +#define EnergyArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ControlArea; + + /* + The class describes an area having energy production or consumption. + */ + class EnergyArea : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + EnergyArea(); + ~EnergyArea() override; + + CIMPP::ControlArea* ControlArea; /* The control area specification that is used for the load forecast. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergyArea_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp b/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp new file mode 100644 index 000000000..8aa4ba5f9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp @@ -0,0 +1,183 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergyConsumer.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_EnergyConsumer_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_pfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfixed; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_pfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfixedPct; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_qfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qfixed; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_qfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qfixedPct; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + 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; +} + + + + + + + +const char EnergyConsumer::debugName[] = "EnergyConsumer"; +const char* EnergyConsumer::debugString() const +{ + return EnergyConsumer::debugName; +} + +void EnergyConsumer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner EnergyConsumer::declare() +{ + return BaseClassDefiner(EnergyConsumer::addConstructToMap, EnergyConsumer::addPrimitiveAssignFnsToMap, EnergyConsumer::addClassAssignFnsToMap, EnergyConsumer::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergyConsumer_factory() + { + return new EnergyConsumer; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp b/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp new file mode 100644 index 000000000..7d04fdbfc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp @@ -0,0 +1,52 @@ +#ifndef EnergyConsumer_H +#define EnergyConsumer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PerCent.hpp" +#include "ReactivePower.hpp" + +namespace CIMPP +{ + class LoadDynamics; + class LoadResponseCharacteristic; + + /* + Generic user of energy - a point of consumption on the power system model. + */ + class EnergyConsumer : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergyConsumer_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp new file mode 100644 index 000000000..aba3d7573 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergySchedulingType.hpp" + +#include +#include + +#include "EnergySource.hpp" + +using namespace CIMPP; + +EnergySchedulingType::EnergySchedulingType() {}; +EnergySchedulingType::~EnergySchedulingType() {}; + + + + +bool assign_EnergySource_EnergySchedulingType(BaseClass*, BaseClass*); +bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySchedulingType* element = dynamic_cast(BaseClass_ptr1); + EnergySource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergySource.begin(), element->EnergySource.end(), element2) == element->EnergySource.end()) + { + element->EnergySource.push_back(element2); + return assign_EnergySource_EnergySchedulingType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EnergySchedulingType::debugName[] = "EnergySchedulingType"; +const char* EnergySchedulingType::debugString() const +{ + return EnergySchedulingType::debugName; +} + +void EnergySchedulingType::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EnergySchedulingType"), &EnergySchedulingType_factory)); +} + +void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EnergySchedulingType::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EnergySchedulingType.EnergySource"), &assign_EnergySchedulingType_EnergySource)); +} + +const BaseClassDefiner EnergySchedulingType::declare() +{ + return BaseClassDefiner(EnergySchedulingType::addConstructToMap, EnergySchedulingType::addPrimitiveAssignFnsToMap, EnergySchedulingType::addClassAssignFnsToMap, EnergySchedulingType::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergySchedulingType_factory() + { + return new EnergySchedulingType; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp new file mode 100644 index 000000000..6ffd57230 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp @@ -0,0 +1,41 @@ +#ifndef EnergySchedulingType_H +#define EnergySchedulingType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class EnergySource; + + /* + Used to define the type of generation for scheduling purposes. + */ + class EnergySchedulingType : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + EnergySchedulingType(); + ~EnergySchedulingType() override; + + std::list EnergySource; /* Energy Scheduling Type of an Energy Source Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergySchedulingType_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EnergySource.cpp b/CGMES_2.4.13_18DEC2013/EnergySource.cpp new file mode 100644 index 000000000..2b02d4b7d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergySource.cpp @@ -0,0 +1,263 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergySource.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_EnergySource_activePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->activePower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalVoltage; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_reactivePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->reactivePower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_rn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_voltageAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageAngle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_voltageMagnitude(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageMagnitude; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + +const char EnergySource::debugName[] = "EnergySource"; +const char* EnergySource::debugString() const +{ + return EnergySource::debugName; +} + +void EnergySource::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner EnergySource::declare() +{ + return BaseClassDefiner(EnergySource::addConstructToMap, EnergySource::addPrimitiveAssignFnsToMap, EnergySource::addClassAssignFnsToMap, EnergySource::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergySource_factory() + { + return new EnergySource; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EnergySource.hpp b/CGMES_2.4.13_18DEC2013/EnergySource.hpp new file mode 100644 index 000000000..2a5321cfe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EnergySource.hpp @@ -0,0 +1,60 @@ +#ifndef EnergySource_H +#define EnergySource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "AngleRadians.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class EnergySchedulingType; + class WindTurbineType3or4Dynamics; + + /* + A generic equivalent for an energy supplier on a transmission or distribution voltage level. + */ + class EnergySource : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergySource_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Equipment.cpp b/CGMES_2.4.13_18DEC2013/Equipment.cpp new file mode 100644 index 000000000..a3f0d0b62 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Equipment.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Equipment.hpp" + +#include +#include + +#include "EquipmentContainer.hpp" +#include "OperationalLimitSet.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +Equipment::Equipment() : EquipmentContainer(nullptr) {}; +Equipment::~Equipment() {}; + + + + +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) +{ + Equipment* element = dynamic_cast(BaseClass_ptr1); + EquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EquipmentContainer != element2) + { + element->EquipmentContainer = element2; + return assign_EquipmentContainer_Equipments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); +bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Equipment* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + +const char Equipment::debugName[] = "Equipment"; +const char* Equipment::debugString() const +{ + return Equipment::debugName; +} + +void Equipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Equipment::declare() +{ + return BaseClassDefiner(Equipment::addConstructToMap, Equipment::addPrimitiveAssignFnsToMap, Equipment::addClassAssignFnsToMap, Equipment::debugName); +} + +namespace CIMPP +{ + BaseClass* Equipment_factory() + { + return new Equipment; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Equipment.hpp b/CGMES_2.4.13_18DEC2013/Equipment.hpp new file mode 100644 index 000000000..731df8bcc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Equipment.hpp @@ -0,0 +1,45 @@ +#ifndef Equipment_H +#define Equipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class EquipmentContainer; + class OperationalLimitSet; + + /* + The parts of a power system that are physical devices, electronic or mechanical. + */ + class Equipment : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Equipment_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp new file mode 100644 index 000000000..a9d39fa2e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquipmentBoundaryVersion.hpp" + +#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() {}; + + +bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURIcore = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURIoperation = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char EquipmentBoundaryVersion::debugName[] = "EquipmentBoundaryVersion"; +const char* EquipmentBoundaryVersion::debugString() const +{ + return EquipmentBoundaryVersion::debugName; +} + +void EquipmentBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquipmentBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EquipmentBoundaryVersion::declare() +{ + return BaseClassDefiner(EquipmentBoundaryVersion::addConstructToMap, EquipmentBoundaryVersion::addPrimitiveAssignFnsToMap, EquipmentBoundaryVersion::addClassAssignFnsToMap, EquipmentBoundaryVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* EquipmentBoundaryVersion_factory() + { + return new EquipmentBoundaryVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp new file mode 100644 index 000000000..0f14a07f6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp @@ -0,0 +1,52 @@ +#ifndef EquipmentBoundaryVersion_H +#define EquipmentBoundaryVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Profile version details. + */ + class EquipmentBoundaryVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquipmentBoundaryVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp b/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp new file mode 100644 index 000000000..c2a2d9b74 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquipmentContainer.hpp" + +#include +#include + +#include "Equipment.hpp" + +using namespace CIMPP; + +EquipmentContainer::EquipmentContainer() {}; +EquipmentContainer::~EquipmentContainer() {}; + + + + +bool assign_Equipment_EquipmentContainer(BaseClass*, BaseClass*); +bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquipmentContainer* element = dynamic_cast(BaseClass_ptr1); + Equipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Equipments.begin(), element->Equipments.end(), element2) == element->Equipments.end()) + { + element->Equipments.push_back(element2); + return assign_Equipment_EquipmentContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EquipmentContainer::debugName[] = "EquipmentContainer"; +const char* EquipmentContainer::debugString() const +{ + return EquipmentContainer::debugName; +} + +void EquipmentContainer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EquipmentContainer"), &EquipmentContainer_factory)); +} + +void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EquipmentContainer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquipmentContainer.Equipments"), &assign_EquipmentContainer_Equipments)); +} + +const BaseClassDefiner EquipmentContainer::declare() +{ + return BaseClassDefiner(EquipmentContainer::addConstructToMap, EquipmentContainer::addPrimitiveAssignFnsToMap, EquipmentContainer::addClassAssignFnsToMap, EquipmentContainer::debugName); +} + +namespace CIMPP +{ + BaseClass* EquipmentContainer_factory() + { + return new EquipmentContainer; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp b/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp new file mode 100644 index 000000000..7b4688598 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp @@ -0,0 +1,41 @@ +#ifndef EquipmentContainer_H +#define EquipmentContainer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConnectivityNodeContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Equipment; + + /* + A modeling construct to provide a root class for containing equipment. + */ + class EquipmentContainer : public ConnectivityNodeContainer + { + public: + /* constructor initialising all attributes to null */ + EquipmentContainer(); + ~EquipmentContainer() override; + + std::list Equipments; /* Contained equipment. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquipmentContainer_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp b/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp new file mode 100644 index 000000000..09b0153e0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquipmentVersion.hpp" + +#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() {}; + + +bool assign_EquipmentVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_baseURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURIcore = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_baseURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURIoperation = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURIshortCircuit = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURIcore = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURIoperation = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURIshortCircuit = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquipmentVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char EquipmentVersion::debugName[] = "EquipmentVersion"; +const char* EquipmentVersion::debugString() const +{ + return EquipmentVersion::debugName; +} + +void EquipmentVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquipmentVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EquipmentVersion::declare() +{ + return BaseClassDefiner(EquipmentVersion::addConstructToMap, EquipmentVersion::addPrimitiveAssignFnsToMap, EquipmentVersion::addClassAssignFnsToMap, EquipmentVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* EquipmentVersion_factory() + { + return new EquipmentVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp b/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp new file mode 100644 index 000000000..a6ff60989 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp @@ -0,0 +1,55 @@ +#ifndef EquipmentVersion_H +#define EquipmentVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class EquipmentVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquipmentVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp b/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp new file mode 100644 index 000000000..306a28be7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentBranch.hpp" + +#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() {}; + + +bool assign_EquivalentBranch_negativeR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeR12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_negativeR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeR21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_negativeX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeX12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_negativeX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeX21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveR12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveR21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveX12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveX21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_r21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_x21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroR12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroR21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroX12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroX21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char EquivalentBranch::debugName[] = "EquivalentBranch"; +const char* EquivalentBranch::debugString() const +{ + return EquivalentBranch::debugName; +} + +void EquivalentBranch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquivalentBranch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EquivalentBranch::declare() +{ + return BaseClassDefiner(EquivalentBranch::addConstructToMap, EquivalentBranch::addPrimitiveAssignFnsToMap, EquivalentBranch::addClassAssignFnsToMap, EquivalentBranch::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentBranch_factory() + { + return new EquivalentBranch; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp b/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp new file mode 100644 index 000000000..72cff31a3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp @@ -0,0 +1,57 @@ +#ifndef EquivalentBranch_H +#define EquivalentBranch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquivalentEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" + +namespace CIMPP +{ + + /* + The class represents equivalent branches. + */ + class EquivalentBranch : public EquivalentEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentBranch_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp new file mode 100644 index 000000000..4591a9d2c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentEquipment.hpp" + +#include +#include + +#include "EquivalentNetwork.hpp" + +using namespace CIMPP; + +EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {}; +EquivalentEquipment::~EquivalentEquipment() {}; + + + + +bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass*, BaseClass*); +bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1); + EquivalentNetwork* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EquivalentNetwork != element2) + { + element->EquivalentNetwork = element2; + return assign_EquivalentNetwork_EquivalentEquipments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EquivalentEquipment::debugName[] = "EquivalentEquipment"; +const char* EquivalentEquipment::debugString() const +{ + return EquivalentEquipment::debugName; +} + +void EquivalentEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EquivalentEquipment"), &EquivalentEquipment_factory)); +} + +void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EquivalentEquipment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquivalentEquipment.EquivalentNetwork"), &assign_EquivalentEquipment_EquivalentNetwork)); +} + +const BaseClassDefiner EquivalentEquipment::declare() +{ + return BaseClassDefiner(EquivalentEquipment::addConstructToMap, EquivalentEquipment::addPrimitiveAssignFnsToMap, EquivalentEquipment::addClassAssignFnsToMap, EquivalentEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentEquipment_factory() + { + return new EquivalentEquipment; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp new file mode 100644 index 000000000..9cab80178 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp @@ -0,0 +1,41 @@ +#ifndef EquivalentEquipment_H +#define EquivalentEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class EquivalentEquipment : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + EquivalentEquipment(); + ~EquivalentEquipment() override; + + CIMPP::EquivalentNetwork* EquivalentNetwork; /* The associated reduced equivalents. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentEquipment_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp b/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp new file mode 100644 index 000000000..c2be44fd4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp @@ -0,0 +1,307 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentInjection.hpp" + +#include +#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() {}; + + + +bool assign_EquivalentInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_regulationCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->regulationCapability; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_regulationStatus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->regulationStatus; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_regulationTarget(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->regulationTarget; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + + + +const char EquivalentInjection::debugName[] = "EquivalentInjection"; +const char* EquivalentInjection::debugString() const +{ + return EquivalentInjection::debugName; +} + +void EquivalentInjection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquivalentInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.ReactiveCapabilityCurve"), &assign_EquivalentInjection_ReactiveCapabilityCurve)); +} + +const BaseClassDefiner EquivalentInjection::declare() +{ + return BaseClassDefiner(EquivalentInjection::addConstructToMap, EquivalentInjection::addPrimitiveAssignFnsToMap, EquivalentInjection::addClassAssignFnsToMap, EquivalentInjection::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentInjection_factory() + { + return new EquivalentInjection; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp b/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp new file mode 100644 index 000000000..6cc6a8342 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp @@ -0,0 +1,62 @@ +#ifndef EquivalentInjection_H +#define EquivalentInjection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquivalentEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class ReactiveCapabilityCurve; + + /* + This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. + */ + class EquivalentInjection : public EquivalentEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentInjection_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp new file mode 100644 index 000000000..f8ed0f8da --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentNetwork.hpp" + +#include +#include + +#include "EquivalentEquipment.hpp" + +using namespace CIMPP; + +EquivalentNetwork::EquivalentNetwork() {}; +EquivalentNetwork::~EquivalentNetwork() {}; + + + + +bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass*, BaseClass*); +bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentNetwork* element = dynamic_cast(BaseClass_ptr1); + EquivalentEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EquivalentEquipments.begin(), element->EquivalentEquipments.end(), element2) == element->EquivalentEquipments.end()) + { + element->EquivalentEquipments.push_back(element2); + return assign_EquivalentEquipment_EquivalentNetwork(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EquivalentNetwork::debugName[] = "EquivalentNetwork"; +const char* EquivalentNetwork::debugString() const +{ + return EquivalentNetwork::debugName; +} + +void EquivalentNetwork::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EquivalentNetwork"), &EquivalentNetwork_factory)); +} + +void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EquivalentNetwork::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquivalentNetwork.EquivalentEquipments"), &assign_EquivalentNetwork_EquivalentEquipments)); +} + +const BaseClassDefiner EquivalentNetwork::declare() +{ + return BaseClassDefiner(EquivalentNetwork::addConstructToMap, EquivalentNetwork::addPrimitiveAssignFnsToMap, EquivalentNetwork::addClassAssignFnsToMap, EquivalentNetwork::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentNetwork_factory() + { + return new EquivalentNetwork; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp new file mode 100644 index 000000000..39b7c3b62 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp @@ -0,0 +1,41 @@ +#ifndef EquivalentNetwork_H +#define EquivalentNetwork_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConnectivityNodeContainer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class EquivalentNetwork : public ConnectivityNodeContainer + { + public: + /* constructor initialising all attributes to null */ + EquivalentNetwork(); + ~EquivalentNetwork() override; + + std::list EquivalentEquipments; /* The equivalent where the reduced model belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentNetwork_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp b/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp new file mode 100644 index 000000000..b62bb06bd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentShunt.hpp" + +#include +#include + +#include "Susceptance.hpp" +#include "Conductance.hpp" + +using namespace CIMPP; + +EquivalentShunt::EquivalentShunt() {}; +EquivalentShunt::~EquivalentShunt() {}; + + +bool assign_EquivalentShunt_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentShunt_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char EquivalentShunt::debugName[] = "EquivalentShunt"; +const char* EquivalentShunt::debugString() const +{ + return EquivalentShunt::debugName; +} + +void EquivalentShunt::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquivalentShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EquivalentShunt::declare() +{ + return BaseClassDefiner(EquivalentShunt::addConstructToMap, EquivalentShunt::addPrimitiveAssignFnsToMap, EquivalentShunt::addClassAssignFnsToMap, EquivalentShunt::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentShunt_factory() + { + return new EquivalentShunt; + } +} diff --git a/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp b/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp new file mode 100644 index 000000000..f6edab3a2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp @@ -0,0 +1,43 @@ +#ifndef EquivalentShunt_H +#define EquivalentShunt_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquivalentEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + + /* + The class represents equivalent shunts. + */ + class EquivalentShunt : public EquivalentEquipment + { + public: + /* constructor initialising all attributes to null */ + EquivalentShunt(); + ~EquivalentShunt() override; + + CIMPP::Susceptance b; /* Positive sequence shunt susceptance. Default: nullptr */ + CIMPP::Conductance g; /* Positive sequence shunt conductance. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentShunt_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp new file mode 100644 index 000000000..e1183202a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC1A.hpp" + +#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() {}; + + +bool assign_ExcAC1A_hvlvgates(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hvlvgates; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC1A::debugName[] = "ExcAC1A"; +const char* ExcAC1A::debugString() const +{ + return ExcAC1A::debugName; +} + +void ExcAC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC1A::declare() +{ + return BaseClassDefiner(ExcAC1A::addConstructToMap, ExcAC1A::addPrimitiveAssignFnsToMap, ExcAC1A::addClassAssignFnsToMap, ExcAC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC1A_factory() + { + return new ExcAC1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp new file mode 100644 index 000000000..8880dc0e4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp @@ -0,0 +1,65 @@ +#ifndef ExcAC1A_H +#define ExcAC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. + */ + class ExcAC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp new file mode 100644 index 000000000..6f3c74e6d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp @@ -0,0 +1,495 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC2A.hpp" + +#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() {}; + + +bool assign_ExcAC2A_hvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hvgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lvgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vlr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC2A::debugName[] = "ExcAC2A"; +const char* ExcAC2A::debugString() const +{ + return ExcAC2A::debugName; +} + +void ExcAC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC2A::declare() +{ + return BaseClassDefiner(ExcAC2A::addConstructToMap, ExcAC2A::addPrimitiveAssignFnsToMap, ExcAC2A::addClassAssignFnsToMap, ExcAC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC2A_factory() + { + return new ExcAC2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp new file mode 100644 index 000000000..17de55256 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp @@ -0,0 +1,71 @@ +#ifndef ExcAC2A_H +#define ExcAC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. + */ + class ExcAC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp new file mode 100644 index 000000000..87e00405c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp @@ -0,0 +1,463 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC3A.hpp" + +#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() {}; + + +bool assign_ExcAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC3A::debugName[] = "ExcAC3A"; +const char* ExcAC3A::debugString() const +{ + return ExcAC3A::debugName; +} + +void ExcAC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC3A::declare() +{ + return BaseClassDefiner(ExcAC3A::addConstructToMap, ExcAC3A::addPrimitiveAssignFnsToMap, ExcAC3A::addClassAssignFnsToMap, ExcAC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC3A_factory() + { + return new ExcAC3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp new file mode 100644 index 000000000..db3685cc7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp @@ -0,0 +1,68 @@ +#ifndef ExcAC3A_H +#define ExcAC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. + */ + class ExcAC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp new file mode 100644 index 000000000..42910c5bc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC4A.hpp" + +#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() {}; + + +bool assign_ExcAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + +const char ExcAC4A::debugName[] = "ExcAC4A"; +const char* ExcAC4A::debugString() const +{ + return ExcAC4A::debugName; +} + +void ExcAC4A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC4A::declare() +{ + return BaseClassDefiner(ExcAC4A::addConstructToMap, ExcAC4A::addPrimitiveAssignFnsToMap, ExcAC4A::addClassAssignFnsToMap, ExcAC4A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC4A_factory() + { + return new ExcAC4A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp new file mode 100644 index 000000000..3351ab9be --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp @@ -0,0 +1,50 @@ +#ifndef ExcAC4A_H +#define ExcAC4A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. + */ + class ExcAC4A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC4A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp new file mode 100644 index 000000000..405cbcaba --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC5A.hpp" + +#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() {}; + + +bool assign_ExcAC5A_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcAC5A::debugName[] = "ExcAC5A"; +const char* ExcAC5A::debugString() const +{ + return ExcAC5A::debugName; +} + +void ExcAC5A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC5A::declare() +{ + return BaseClassDefiner(ExcAC5A::addConstructToMap, ExcAC5A::addPrimitiveAssignFnsToMap, ExcAC5A::addClassAssignFnsToMap, ExcAC5A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC5A_factory() + { + return new ExcAC5A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp new file mode 100644 index 000000000..8e36cf0c6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp @@ -0,0 +1,60 @@ +#ifndef ExcAC5A_H +#define ExcAC5A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. + */ + class ExcAC5A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC5A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp new file mode 100644 index 000000000..f19cc0233 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC6A.hpp" + +#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() {}; + + +bool assign_ExcAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tj; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfelim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC6A::debugName[] = "ExcAC6A"; +const char* ExcAC6A::debugString() const +{ + return ExcAC6A::debugName; +} + +void ExcAC6A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC6A::declare() +{ + return BaseClassDefiner(ExcAC6A::addConstructToMap, ExcAC6A::addPrimitiveAssignFnsToMap, ExcAC6A::addClassAssignFnsToMap, ExcAC6A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC6A_factory() + { + return new ExcAC6A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp new file mode 100644 index 000000000..479374d09 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp @@ -0,0 +1,65 @@ +#ifndef ExcAC6A_H +#define ExcAC6A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. + */ + class ExcAC6A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC6A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp b/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp new file mode 100644 index 000000000..d926b91ad --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC8B.hpp" + +#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() {}; + + +bool assign_ExcAC8B_inlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_pidlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pidlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_telim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->telim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vpidmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpidmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vpidmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpidmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vtmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmult; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC8B::debugName[] = "ExcAC8B"; +const char* ExcAC8B::debugString() const +{ + return ExcAC8B::debugName; +} + +void ExcAC8B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC8B::declare() +{ + return BaseClassDefiner(ExcAC8B::addConstructToMap, ExcAC8B::addPrimitiveAssignFnsToMap, ExcAC8B::addClassAssignFnsToMap, ExcAC8B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC8B_factory() + { + return new ExcAC8B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp b/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp new file mode 100644 index 000000000..884ef3e61 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp @@ -0,0 +1,70 @@ +#ifndef ExcAC8B_H +#define ExcAC8B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. + */ + class ExcAC8B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC8B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcANS.cpp b/CGMES_2.4.13_18DEC2013/ExcANS.cpp new file mode 100644 index 000000000..5faf227b7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcANS.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcANS.hpp" + +#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() {}; + + +bool assign_ExcANS_blint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->blint; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_ifmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_ifmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kce; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_krvecc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->krvecc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_kvfif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvfif; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcANS::debugName[] = "ExcANS"; +const char* ExcANS::debugString() const +{ + return ExcANS::debugName; +} + +void ExcANS::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcANS::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcANS::declare() +{ + return BaseClassDefiner(ExcANS::addConstructToMap, ExcANS::addPrimitiveAssignFnsToMap, ExcANS::addClassAssignFnsToMap, ExcANS::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcANS_factory() + { + return new ExcANS; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcANS.hpp b/CGMES_2.4.13_18DEC2013/ExcANS.hpp new file mode 100644 index 000000000..3ab370692 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcANS.hpp @@ -0,0 +1,57 @@ +#ifndef ExcANS_H +#define ExcANS_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system. It represents static field voltage or excitation current feedback excitation system. + */ + class ExcANS : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcANS_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp new file mode 100644 index 000000000..e94acd57f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR1.hpp" + +#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() {}; + + +bool assign_ExcAVR1_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char ExcAVR1::debugName[] = "ExcAVR1"; +const char* ExcAVR1::debugString() const +{ + return ExcAVR1::debugName; +} + +void ExcAVR1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR1::declare() +{ + return BaseClassDefiner(ExcAVR1::addConstructToMap, ExcAVR1::addPrimitiveAssignFnsToMap, ExcAVR1::addClassAssignFnsToMap, ExcAVR1::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR1_factory() + { + return new ExcAVR1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp new file mode 100644 index 000000000..ae8f6209d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp @@ -0,0 +1,54 @@ +#ifndef ExcAVR1_H +#define ExcAVR1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. + */ + class ExcAVR1 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp new file mode 100644 index 000000000..30734b84e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR2.hpp" + +#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() {}; + + +bool assign_ExcAVR2_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char ExcAVR2::debugName[] = "ExcAVR2"; +const char* ExcAVR2::debugString() const +{ + return ExcAVR2::debugName; +} + +void ExcAVR2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR2::declare() +{ + return BaseClassDefiner(ExcAVR2::addConstructToMap, ExcAVR2::addPrimitiveAssignFnsToMap, ExcAVR2::addClassAssignFnsToMap, ExcAVR2::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR2_factory() + { + return new ExcAVR2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp new file mode 100644 index 000000000..56bcf98fc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp @@ -0,0 +1,55 @@ +#ifndef ExcAVR2_H +#define ExcAVR2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp new file mode 100644 index 000000000..bec98de59 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR3.hpp" + +#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() {}; + + +bool assign_ExcAVR3_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char ExcAVR3::debugName[] = "ExcAVR3"; +const char* ExcAVR3::debugString() const +{ + return ExcAVR3::debugName; +} + +void ExcAVR3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR3::declare() +{ + return BaseClassDefiner(ExcAVR3::addConstructToMap, ExcAVR3::addPrimitiveAssignFnsToMap, ExcAVR3::addClassAssignFnsToMap, ExcAVR3::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR3_factory() + { + return new ExcAVR3; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp new file mode 100644 index 000000000..a3238d239 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp @@ -0,0 +1,54 @@ +#ifndef ExcAVR3_H +#define ExcAVR3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system. It represents exciter dynamo and electric regulator. + */ + class ExcAVR3 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR3_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp new file mode 100644 index 000000000..1c70c9f5a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR4.hpp" + +#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() {}; + + +bool assign_ExcAVR4_imul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_kif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kif; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t1if(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1if; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_tif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tif; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vfmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vfmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcAVR4::debugName[] = "ExcAVR4"; +const char* ExcAVR4::debugString() const +{ + return ExcAVR4::debugName; +} + +void ExcAVR4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR4::declare() +{ + return BaseClassDefiner(ExcAVR4::addConstructToMap, ExcAVR4::addPrimitiveAssignFnsToMap, ExcAVR4::addClassAssignFnsToMap, ExcAVR4::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR4_factory() + { + return new ExcAVR4; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp new file mode 100644 index 000000000..adb83a2fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp @@ -0,0 +1,57 @@ +#ifndef ExcAVR4_H +#define ExcAVR4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system. It represents static exciter and electric voltage regulator. + */ + class ExcAVR4 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR4_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp new file mode 100644 index 000000000..0232b8142 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR5.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +ExcAVR5::ExcAVR5() {}; +ExcAVR5::~ExcAVR5() {}; + + +bool assign_ExcAVR5_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR5_rex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rex; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR5_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char ExcAVR5::debugName[] = "ExcAVR5"; +const char* ExcAVR5::debugString() const +{ + return ExcAVR5::debugName; +} + +void ExcAVR5::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR5::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR5::declare() +{ + return BaseClassDefiner(ExcAVR5::addConstructToMap, ExcAVR5::addPrimitiveAssignFnsToMap, ExcAVR5::addClassAssignFnsToMap, ExcAVR5::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR5_factory() + { + return new ExcAVR5; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp new file mode 100644 index 000000000..53cfd5ee7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp @@ -0,0 +1,44 @@ +#ifndef ExcAVR5_H +#define ExcAVR5_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR5_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp new file mode 100644 index 000000000..0933e6aa5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR7.hpp" + +#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() {}; + + +bool assign_ExcAVR7_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmax3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmax5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmin1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmin3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmin5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAVR7::debugName[] = "ExcAVR7"; +const char* ExcAVR7::debugString() const +{ + return ExcAVR7::debugName; +} + +void ExcAVR7::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR7::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR7::declare() +{ + return BaseClassDefiner(ExcAVR7::addConstructToMap, ExcAVR7::addPrimitiveAssignFnsToMap, ExcAVR7::addClassAssignFnsToMap, ExcAVR7::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR7_factory() + { + return new ExcAVR7; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp new file mode 100644 index 000000000..998268aa7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp @@ -0,0 +1,62 @@ +#ifndef ExcAVR7_H +#define ExcAVR7_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + IVO excitation system. + */ + class ExcAVR7 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR7_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcBBC.cpp b/CGMES_2.4.13_18DEC2013/ExcBBC.cpp new file mode 100644 index 000000000..e78e0f2d7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcBBC.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcBBC.hpp" + +#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() {}; + + +bool assign_ExcBBC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_switch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->_switch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char ExcBBC::debugName[] = "ExcBBC"; +const char* ExcBBC::debugString() const +{ + return ExcBBC::debugName; +} + +void ExcBBC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcBBC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcBBC::declare() +{ + return BaseClassDefiner(ExcBBC::addConstructToMap, ExcBBC::addPrimitiveAssignFnsToMap, ExcBBC::addClassAssignFnsToMap, ExcBBC::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcBBC_factory() + { + return new ExcBBC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcBBC.hpp b/CGMES_2.4.13_18DEC2013/ExcBBC.hpp new file mode 100644 index 000000000..2878ad4ff --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcBBC.hpp @@ -0,0 +1,53 @@ +#ifndef ExcBBC_H +#define ExcBBC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcBBC : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcBBC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcCZ.cpp b/CGMES_2.4.13_18DEC2013/ExcCZ.cpp new file mode 100644 index 000000000..672a78e76 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcCZ.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcCZ.hpp" + +#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() {}; + + +bool assign_ExcCZ_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char ExcCZ::debugName[] = "ExcCZ"; +const char* ExcCZ::debugString() const +{ + return ExcCZ::debugName; +} + +void ExcCZ::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcCZ::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcCZ::declare() +{ + return BaseClassDefiner(ExcCZ::addConstructToMap, ExcCZ::addPrimitiveAssignFnsToMap, ExcCZ::addClassAssignFnsToMap, ExcCZ::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcCZ_factory() + { + return new ExcCZ; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcCZ.hpp b/CGMES_2.4.13_18DEC2013/ExcCZ.hpp new file mode 100644 index 000000000..31978efcc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcCZ.hpp @@ -0,0 +1,51 @@ +#ifndef ExcCZ_H +#define ExcCZ_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Czech Proportion/Integral Exciter. + */ + class ExcCZ : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcCZ_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp new file mode 100644 index 000000000..f8cf51244 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC1A.hpp" + +#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() {}; + + +bool assign_ExcDC1A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->edfmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcDC1A::debugName[] = "ExcDC1A"; +const char* ExcDC1A::debugString() const +{ + return ExcDC1A::debugName; +} + +void ExcDC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC1A::declare() +{ + return BaseClassDefiner(ExcDC1A::addConstructToMap, ExcDC1A::addPrimitiveAssignFnsToMap, ExcDC1A::addClassAssignFnsToMap, ExcDC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC1A_factory() + { + return new ExcDC1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp new file mode 100644 index 000000000..d18025cc9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp @@ -0,0 +1,61 @@ +#ifndef ExcDC1A_H +#define ExcDC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. + */ + class ExcDC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp new file mode 100644 index 000000000..0dc85256f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC2A.hpp" + +#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() {}; + + +bool assign_ExcDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_vtlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcDC2A::debugName[] = "ExcDC2A"; +const char* ExcDC2A::debugString() const +{ + return ExcDC2A::debugName; +} + +void ExcDC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC2A::declare() +{ + return BaseClassDefiner(ExcDC2A::addConstructToMap, ExcDC2A::addPrimitiveAssignFnsToMap, ExcDC2A::addClassAssignFnsToMap, ExcDC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC2A_factory() + { + return new ExcDC2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp new file mode 100644 index 000000000..143921a50 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp @@ -0,0 +1,61 @@ +#ifndef ExcDC2A_H +#define ExcDC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcDC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp new file mode 100644 index 000000000..77fa53c3e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC3A.hpp" + +#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() {}; + + +bool assign_ExcDC3A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->edfmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcDC3A::debugName[] = "ExcDC3A"; +const char* ExcDC3A::debugString() const +{ + return ExcDC3A::debugName; +} + +void ExcDC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC3A::declare() +{ + return BaseClassDefiner(ExcDC3A::addConstructToMap, ExcDC3A::addPrimitiveAssignFnsToMap, ExcDC3A::addClassAssignFnsToMap, ExcDC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC3A_factory() + { + return new ExcDC3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp new file mode 100644 index 000000000..f28f29984 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcDC3A_H +#define ExcDC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. + */ + class ExcDC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp b/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp new file mode 100644 index 000000000..1723a0039 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC3A1.hpp" + +#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() {}; + + +bool assign_ExcDC3A1_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vb1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vb1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vblim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vblim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcDC3A1::debugName[] = "ExcDC3A1"; +const char* ExcDC3A1::debugString() const +{ + return ExcDC3A1::debugName; +} + +void ExcDC3A1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC3A1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC3A1::declare() +{ + return BaseClassDefiner(ExcDC3A1::addConstructToMap, ExcDC3A1::addPrimitiveAssignFnsToMap, ExcDC3A1::addClassAssignFnsToMap, ExcDC3A1::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC3A1_factory() + { + return new ExcDC3A1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp b/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp new file mode 100644 index 000000000..1ff34b005 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp @@ -0,0 +1,56 @@ +#ifndef ExcDC3A1_H +#define ExcDC3A1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + This is modified old IEEE type 3 excitation system. + */ + class ExcDC3A1 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC3A1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp b/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp new file mode 100644 index 000000000..5137c3751 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcELIN1.hpp" + +#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() {}; + + +bool assign_ExcELIN1_dpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpnf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_efmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_efmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_smax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->smax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_tfi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_tnu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tnu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_tsw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_vpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_vpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpnf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_vpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char ExcELIN1::debugName[] = "ExcELIN1"; +const char* ExcELIN1::debugString() const +{ + return ExcELIN1::debugName; +} + +void ExcELIN1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcELIN1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcELIN1::declare() +{ + return BaseClassDefiner(ExcELIN1::addConstructToMap, ExcELIN1::addPrimitiveAssignFnsToMap, ExcELIN1::addClassAssignFnsToMap, ExcELIN1::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcELIN1_factory() + { + return new ExcELIN1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp b/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp new file mode 100644 index 000000000..938588450 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp @@ -0,0 +1,56 @@ +#ifndef ExcELIN1_H +#define ExcELIN1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcELIN1 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcELIN1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp b/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp new file mode 100644 index 000000000..c75dd79b5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcELIN2.hpp" + +#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() {}; + + +bool assign_ExcELIN2_efdbas(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdbas; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_iefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_iefmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iefmax2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_iefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k1ec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1ec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_kd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ke2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ketb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ketb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_pid1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pid1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_te2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_tr4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_upmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_upmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcELIN2::debugName[] = "ExcELIN2"; +const char* ExcELIN2::debugString() const +{ + return ExcELIN2::debugName; +} + +void ExcELIN2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcELIN2::declare() +{ + return BaseClassDefiner(ExcELIN2::addConstructToMap, ExcELIN2::addPrimitiveAssignFnsToMap, ExcELIN2::addClassAssignFnsToMap, ExcELIN2::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcELIN2_factory() + { + return new ExcELIN2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp b/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp new file mode 100644 index 000000000..d9f1bfd71 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp @@ -0,0 +1,68 @@ +#ifndef ExcELIN2_H +#define ExcELIN2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcELIN2 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcELIN2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcHU.cpp b/CGMES_2.4.13_18DEC2013/ExcHU.cpp new file mode 100644 index 000000000..0414a2cd4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcHU.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcHU.hpp" + +#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() {}; + + +bool assign_ExcHU_ae(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ae; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ai(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ai; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_atr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->atr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_imin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char ExcHU::debugName[] = "ExcHU"; +const char* ExcHU::debugString() const +{ + return ExcHU::debugName; +} + +void ExcHU::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcHU::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcHU::declare() +{ + return BaseClassDefiner(ExcHU::addConstructToMap, ExcHU::addPrimitiveAssignFnsToMap, ExcHU::addClassAssignFnsToMap, ExcHU::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcHU_factory() + { + return new ExcHU; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcHU.hpp b/CGMES_2.4.13_18DEC2013/ExcHU.hpp new file mode 100644 index 000000000..ae718ffa4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcHU.hpp @@ -0,0 +1,54 @@ +#ifndef ExcHU_H +#define ExcHU_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Hungarian Excitation System Model, with built-in voltage transducer. + */ + class ExcHU : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcHU_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp new file mode 100644 index 000000000..c1eb35e8d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC1A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC1A::debugName[] = "ExcIEEEAC1A"; +const char* ExcIEEEAC1A::debugString() const +{ + return ExcIEEEAC1A::debugName; +} + +void ExcIEEEAC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC1A::declare() +{ + return BaseClassDefiner(ExcIEEEAC1A::addConstructToMap, ExcIEEEAC1A::addPrimitiveAssignFnsToMap, ExcIEEEAC1A::addClassAssignFnsToMap, ExcIEEEAC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC1A_factory() + { + return new ExcIEEEAC1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp new file mode 100644 index 000000000..b00761df6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp @@ -0,0 +1,60 @@ +#ifndef ExcIEEEAC1A_H +#define ExcIEEEAC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp new file mode 100644 index 000000000..e544a1fe1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC2A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC2A::debugName[] = "ExcIEEEAC2A"; +const char* ExcIEEEAC2A::debugString() const +{ + return ExcIEEEAC2A::debugName; +} + +void ExcIEEEAC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC2A::declare() +{ + return BaseClassDefiner(ExcIEEEAC2A::addConstructToMap, ExcIEEEAC2A::addPrimitiveAssignFnsToMap, ExcIEEEAC2A::addClassAssignFnsToMap, ExcIEEEAC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC2A_factory() + { + return new ExcIEEEAC2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp new file mode 100644 index 000000000..d2217767f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp @@ -0,0 +1,63 @@ +#ifndef ExcIEEEAC2A_H +#define ExcIEEEAC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp new file mode 100644 index 000000000..a88aae49d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC3A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC3A::debugName[] = "ExcIEEEAC3A"; +const char* ExcIEEEAC3A::debugString() const +{ + return ExcIEEEAC3A::debugName; +} + +void ExcIEEEAC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC3A::declare() +{ + return BaseClassDefiner(ExcIEEEAC3A::addConstructToMap, ExcIEEEAC3A::addPrimitiveAssignFnsToMap, ExcIEEEAC3A::addClassAssignFnsToMap, ExcIEEEAC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC3A_factory() + { + return new ExcIEEEAC3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp new file mode 100644 index 000000000..3c04151b3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp @@ -0,0 +1,65 @@ +#ifndef ExcIEEEAC3A_H +#define ExcIEEEAC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp new file mode 100644 index 000000000..54c509ac0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC4A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + +const char ExcIEEEAC4A::debugName[] = "ExcIEEEAC4A"; +const char* ExcIEEEAC4A::debugString() const +{ + return ExcIEEEAC4A::debugName; +} + +void ExcIEEEAC4A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC4A::declare() +{ + return BaseClassDefiner(ExcIEEEAC4A::addConstructToMap, ExcIEEEAC4A::addPrimitiveAssignFnsToMap, ExcIEEEAC4A::addClassAssignFnsToMap, ExcIEEEAC4A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC4A_factory() + { + return new ExcIEEEAC4A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp new file mode 100644 index 000000000..884938057 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp @@ -0,0 +1,50 @@ +#ifndef ExcIEEEAC4A_H +#define ExcIEEEAC4A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC4A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC4A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp new file mode 100644 index 000000000..691cba77a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC5A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcIEEEAC5A::debugName[] = "ExcIEEEAC5A"; +const char* ExcIEEEAC5A::debugString() const +{ + return ExcIEEEAC5A::debugName; +} + +void ExcIEEEAC5A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC5A::declare() +{ + return BaseClassDefiner(ExcIEEEAC5A::addConstructToMap, ExcIEEEAC5A::addPrimitiveAssignFnsToMap, ExcIEEEAC5A::addClassAssignFnsToMap, ExcIEEEAC5A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC5A_factory() + { + return new ExcIEEEAC5A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp new file mode 100644 index 000000000..dfe6bad93 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp @@ -0,0 +1,56 @@ +#ifndef ExcIEEEAC5A_H +#define ExcIEEEAC5A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC5A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC5A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp new file mode 100644 index 000000000..241e30969 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC6A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tj; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfelim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC6A::debugName[] = "ExcIEEEAC6A"; +const char* ExcIEEEAC6A::debugString() const +{ + return ExcIEEEAC6A::debugName; +} + +void ExcIEEEAC6A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC6A::declare() +{ + return BaseClassDefiner(ExcIEEEAC6A::addConstructToMap, ExcIEEEAC6A::addPrimitiveAssignFnsToMap, ExcIEEEAC6A::addClassAssignFnsToMap, ExcIEEEAC6A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC6A_factory() + { + return new ExcIEEEAC6A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp new file mode 100644 index 000000000..d41b29933 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp @@ -0,0 +1,64 @@ +#ifndef ExcIEEEAC6A_H +#define ExcIEEEAC6A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC6A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC6A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp new file mode 100644 index 000000000..f4c5ba1bb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp @@ -0,0 +1,463 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC7B.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC7B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC7B::debugName[] = "ExcIEEEAC7B"; +const char* ExcIEEEAC7B::debugString() const +{ + return ExcIEEEAC7B::debugName; +} + +void ExcIEEEAC7B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC7B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC7B::declare() +{ + return BaseClassDefiner(ExcIEEEAC7B::addConstructToMap, ExcIEEEAC7B::addPrimitiveAssignFnsToMap, ExcIEEEAC7B::addClassAssignFnsToMap, ExcIEEEAC7B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC7B_factory() + { + return new ExcIEEEAC7B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp new file mode 100644 index 000000000..3eda15144 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp @@ -0,0 +1,68 @@ +#ifndef ExcIEEEAC7B_H +#define ExcIEEEAC7B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC7B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC7B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp new file mode 100644 index 000000000..ec5301141 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC8B.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC8B::debugName[] = "ExcIEEEAC8B"; +const char* ExcIEEEAC8B::debugString() const +{ + return ExcIEEEAC8B::debugName; +} + +void ExcIEEEAC8B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC8B::declare() +{ + return BaseClassDefiner(ExcIEEEAC8B::addConstructToMap, ExcIEEEAC8B::addPrimitiveAssignFnsToMap, ExcIEEEAC8B::addClassAssignFnsToMap, ExcIEEEAC8B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC8B_factory() + { + return new ExcIEEEAC8B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp new file mode 100644 index 000000000..e3597ea8e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp @@ -0,0 +1,60 @@ +#ifndef ExcIEEEAC8B_H +#define ExcIEEEAC8B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEAC8B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC8B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp new file mode 100644 index 000000000..a48495089 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC1A.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcIEEEDC1A::debugName[] = "ExcIEEEDC1A"; +const char* ExcIEEEDC1A::debugString() const +{ + return ExcIEEEDC1A::debugName; +} + +void ExcIEEEDC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC1A::declare() +{ + return BaseClassDefiner(ExcIEEEDC1A::addConstructToMap, ExcIEEEDC1A::addPrimitiveAssignFnsToMap, ExcIEEEDC1A::addClassAssignFnsToMap, ExcIEEEDC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC1A_factory() + { + return new ExcIEEEDC1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp new file mode 100644 index 000000000..bc0f8df03 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcIEEEDC1A_H +#define ExcIEEEDC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEDC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp new file mode 100644 index 000000000..520e5765c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC2A.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcIEEEDC2A::debugName[] = "ExcIEEEDC2A"; +const char* ExcIEEEDC2A::debugString() const +{ + return ExcIEEEDC2A::debugName; +} + +void ExcIEEEDC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC2A::declare() +{ + return BaseClassDefiner(ExcIEEEDC2A::addConstructToMap, ExcIEEEDC2A::addPrimitiveAssignFnsToMap, ExcIEEEDC2A::addClassAssignFnsToMap, ExcIEEEDC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC2A_factory() + { + return new ExcIEEEDC2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp new file mode 100644 index 000000000..1956522e9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcIEEEDC2A_H +#define ExcIEEEDC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEDC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp new file mode 100644 index 000000000..116d404a9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC3A.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char ExcIEEEDC3A::debugName[] = "ExcIEEEDC3A"; +const char* ExcIEEEDC3A::debugString() const +{ + return ExcIEEEDC3A::debugName; +} + +void ExcIEEEDC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC3A::declare() +{ + return BaseClassDefiner(ExcIEEEDC3A::addConstructToMap, ExcIEEEDC3A::addPrimitiveAssignFnsToMap, ExcIEEEDC3A::addClassAssignFnsToMap, ExcIEEEDC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC3A_factory() + { + return new ExcIEEEDC3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp new file mode 100644 index 000000000..49c988e59 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp @@ -0,0 +1,54 @@ +#ifndef ExcIEEEDC3A_H +#define ExcIEEEDC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEDC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp new file mode 100644 index 000000000..9c83746f6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC4B.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC4B_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEDC4B::debugName[] = "ExcIEEEDC4B"; +const char* ExcIEEEDC4B::debugString() const +{ + return ExcIEEEDC4B::debugName; +} + +void ExcIEEEDC4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC4B::declare() +{ + return BaseClassDefiner(ExcIEEEDC4B::addConstructToMap, ExcIEEEDC4B::addPrimitiveAssignFnsToMap, ExcIEEEDC4B::addClassAssignFnsToMap, ExcIEEEDC4B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC4B_factory() + { + return new ExcIEEEDC4B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp new file mode 100644 index 000000000..f5ea5c20a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp @@ -0,0 +1,62 @@ +#ifndef ExcIEEEDC4B_H +#define ExcIEEEDC4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class ExcIEEEDC4B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC4B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp new file mode 100644 index 000000000..48a92f05e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST1A.hpp" + +#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() {}; + + +bool assign_ExcIEEEST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_pssin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pssin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEST1A::debugName[] = "ExcIEEEST1A"; +const char* ExcIEEEST1A::debugString() const +{ + return ExcIEEEST1A::debugName; +} + +void ExcIEEEST1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST1A::declare() +{ + return BaseClassDefiner(ExcIEEEST1A::addConstructToMap, ExcIEEEST1A::addPrimitiveAssignFnsToMap, ExcIEEEST1A::addClassAssignFnsToMap, ExcIEEEST1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST1A_factory() + { + return new ExcIEEEST1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp new file mode 100644 index 000000000..c59603d1c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp @@ -0,0 +1,62 @@ +#ifndef ExcIEEEST1A_H +#define ExcIEEEST1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "ExcIEEEST1AUELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp new file mode 100644 index 000000000..cac712136 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST1AUELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcIEEEST1AUELselectorKind& ExcIEEEST1AUELselectorKind::operator=(ExcIEEEST1AUELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcIEEEST1AUELselectorKind::operator ExcIEEEST1AUELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcIEEEST1AUELselectorKind::debugName[] = "ExcIEEEST1AUELselectorKind"; +const char* ExcIEEEST1AUELselectorKind::debugString() const +{ + return ExcIEEEST1AUELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcIEEEST1AUELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "ignoreUELsignal") + { + rop = ExcIEEEST1AUELselectorKind::ignoreUELsignal; + return lop; + } + if(EnumSymbol == "inputHVgateVoltageOutput") + { + rop = ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput; + return lop; + } + if(EnumSymbol == "inputHVgateErrorSignal") + { + rop = ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal; + return lop; + } + if(EnumSymbol == "inputAddedToErrorSignal") + { + rop = ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcIEEEST1AUELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcIEEEST1AUELselectorKind::ignoreUELsignal) + { + EnumSymbol = "ignoreUELsignal"; + } + if (obj.value == ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput) + { + EnumSymbol = "inputHVgateVoltageOutput"; + } + if (obj.value == ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal) + { + EnumSymbol = "inputHVgateErrorSignal"; + } + if (obj.value == ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal) + { + EnumSymbol = "inputAddedToErrorSignal"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcIEEEST1AUELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp new file mode 100644 index 000000000..62cd07318 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ExcIEEEST1AUELselectorKind_H +#define ExcIEEEST1AUELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of connection for the UEL input used in ExcIEEEST1A. + */ + class ExcIEEEST1AUELselectorKind + { + public: + enum ExcIEEEST1AUELselectorKind_ENUM + { + /** + * Ignore UEL signal. + */ + ignoreUELsignal, + /** + * UEL input HV gate with voltage regulator output. + */ + inputHVgateVoltageOutput, + /** + * UEL input HV gate with error signal. + */ + inputHVgateErrorSignal, + /** + * UEL input added to error signal. + */ + inputAddedToErrorSignal, + }; + + ExcIEEEST1AUELselectorKind() : value(), initialized(false) {} + ExcIEEEST1AUELselectorKind(ExcIEEEST1AUELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcIEEEST1AUELselectorKind& operator=(ExcIEEEST1AUELselectorKind_ENUM rop); + operator ExcIEEEST1AUELselectorKind_ENUM() const; + + ExcIEEEST1AUELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcIEEEST1AUELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcIEEEST1AUELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp new file mode 100644 index 000000000..def7e0e1c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST2A.hpp" + +#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() {}; + + +bool assign_ExcIEEEST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char ExcIEEEST2A::debugName[] = "ExcIEEEST2A"; +const char* ExcIEEEST2A::debugString() const +{ + return ExcIEEEST2A::debugName; +} + +void ExcIEEEST2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST2A::declare() +{ + return BaseClassDefiner(ExcIEEEST2A::addConstructToMap, ExcIEEEST2A::addPrimitiveAssignFnsToMap, ExcIEEEST2A::addClassAssignFnsToMap, ExcIEEEST2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST2A_factory() + { + return new ExcIEEEST2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp new file mode 100644 index 000000000..817ffedb7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp @@ -0,0 +1,55 @@ +#ifndef ExcIEEEST2A_H +#define ExcIEEEST2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp new file mode 100644 index 000000000..63b81a0cb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp @@ -0,0 +1,367 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST3A.hpp" + +#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() {}; + + +bool assign_ExcIEEEST3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vgmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEST3A::debugName[] = "ExcIEEEST3A"; +const char* ExcIEEEST3A::debugString() const +{ + return ExcIEEEST3A::debugName; +} + +void ExcIEEEST3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST3A::declare() +{ + return BaseClassDefiner(ExcIEEEST3A::addConstructToMap, ExcIEEEST3A::addPrimitiveAssignFnsToMap, ExcIEEEST3A::addClassAssignFnsToMap, ExcIEEEST3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST3A_factory() + { + return new ExcIEEEST3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp new file mode 100644 index 000000000..9497c70c7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp @@ -0,0 +1,62 @@ +#ifndef ExcIEEEST3A_H +#define ExcIEEEST3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp new file mode 100644 index 000000000..7f8bb74f6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST4B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcIEEEST4B::debugName[] = "ExcIEEEST4B"; +const char* ExcIEEEST4B::debugString() const +{ + return ExcIEEEST4B::debugName; +} + +void ExcIEEEST4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST4B::declare() +{ + return BaseClassDefiner(ExcIEEEST4B::addConstructToMap, ExcIEEEST4B::addPrimitiveAssignFnsToMap, ExcIEEEST4B::addClassAssignFnsToMap, ExcIEEEST4B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST4B_factory() + { + return new ExcIEEEST4B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp new file mode 100644 index 000000000..7ddb62e5b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp @@ -0,0 +1,58 @@ +#ifndef ExcIEEEST4B_H +#define ExcIEEEST4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST4B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST4B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp new file mode 100644 index 000000000..8a63ef0f1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST5B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST5B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tob1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tob1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tob2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tob2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_toc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->toc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_toc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->toc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tub1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tub1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tub2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tub2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tuc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tuc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char ExcIEEEST5B::debugName[] = "ExcIEEEST5B"; +const char* ExcIEEEST5B::debugString() const +{ + return ExcIEEEST5B::debugName; +} + +void ExcIEEEST5B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST5B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST5B::declare() +{ + return BaseClassDefiner(ExcIEEEST5B::addConstructToMap, ExcIEEEST5B::addPrimitiveAssignFnsToMap, ExcIEEEST5B::addClassAssignFnsToMap, ExcIEEEST5B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST5B_factory() + { + return new ExcIEEEST5B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp new file mode 100644 index 000000000..895909b3a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp @@ -0,0 +1,58 @@ +#ifndef ExcIEEEST5B_H +#define ExcIEEEST5B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST5B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST5B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp new file mode 100644 index 000000000..1d19b4998 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST6B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kci(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kci; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcIEEEST6B::debugName[] = "ExcIEEEST6B"; +const char* ExcIEEEST6B::debugString() const +{ + return ExcIEEEST6B::debugName; +} + +void ExcIEEEST6B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST6B::declare() +{ + return BaseClassDefiner(ExcIEEEST6B::addConstructToMap, ExcIEEEST6B::addPrimitiveAssignFnsToMap, ExcIEEEST6B::addClassAssignFnsToMap, ExcIEEEST6B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST6B_factory() + { + return new ExcIEEEST6B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp new file mode 100644 index 000000000..1c5b7b3c9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp @@ -0,0 +1,56 @@ +#ifndef ExcIEEEST6B_H +#define ExcIEEEST6B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcST6BOELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST6B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST6B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp new file mode 100644 index 000000000..76c7e0260 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST7B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char ExcIEEEST7B::debugName[] = "ExcIEEEST7B"; +const char* ExcIEEEST7B::debugString() const +{ + return ExcIEEEST7B::debugName; +} + +void ExcIEEEST7B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST7B::declare() +{ + return BaseClassDefiner(ExcIEEEST7B::addConstructToMap, ExcIEEEST7B::addPrimitiveAssignFnsToMap, ExcIEEEST7B::addClassAssignFnsToMap, ExcIEEEST7B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST7B_factory() + { + return new ExcIEEEST7B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp new file mode 100644 index 000000000..68301f797 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp @@ -0,0 +1,58 @@ +#ifndef ExcIEEEST7B_H +#define ExcIEEEST7B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcST7BOELselectorKind.hpp" +#include "ExcST7BUELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST7B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST7B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp b/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp new file mode 100644 index 000000000..6849a4fed --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcOEX3T.hpp" + +#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() {}; + + +bool assign_ExcOEX3T_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_see1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->see1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_see2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->see2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcOEX3T::debugName[] = "ExcOEX3T"; +const char* ExcOEX3T::debugString() const +{ + return ExcOEX3T::debugName; +} + +void ExcOEX3T::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcOEX3T::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcOEX3T::declare() +{ + return BaseClassDefiner(ExcOEX3T::addConstructToMap, ExcOEX3T::addPrimitiveAssignFnsToMap, ExcOEX3T::addClassAssignFnsToMap, ExcOEX3T::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcOEX3T_factory() + { + return new ExcOEX3T; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp b/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp new file mode 100644 index 000000000..8ee520293 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp @@ -0,0 +1,60 @@ +#ifndef ExcOEX3T_H +#define ExcOEX3T_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. + */ + class ExcOEX3T : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcOEX3T_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcPIC.cpp b/CGMES_2.4.13_18DEC2013/ExcPIC.cpp new file mode 100644 index 000000000..4e7434109 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcPIC.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcPIC.hpp" + +#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() {}; + + +bool assign_ExcPIC_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcPIC::debugName[] = "ExcPIC"; +const char* ExcPIC::debugString() const +{ + return ExcPIC::debugName; +} + +void ExcPIC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcPIC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcPIC::declare() +{ + return BaseClassDefiner(ExcPIC::addConstructToMap, ExcPIC::addPrimitiveAssignFnsToMap, ExcPIC::addClassAssignFnsToMap, ExcPIC::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcPIC_factory() + { + return new ExcPIC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcPIC.hpp b/CGMES_2.4.13_18DEC2013/ExcPIC.hpp new file mode 100644 index 000000000..29379a6fa --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcPIC.hpp @@ -0,0 +1,64 @@ +#ifndef ExcPIC_H +#define ExcPIC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcPIC : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcPIC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcREXS.cpp b/CGMES_2.4.13_18DEC2013/ExcREXS.cpp new file mode 100644 index 000000000..29f89ca72 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcREXS.cpp @@ -0,0 +1,623 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcREXS.hpp" + +#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() {}; + + +bool assign_ExcREXS_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_flimf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flimf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kefd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kefd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kii(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kii; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kvi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kvp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvphz; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_nvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nvphz; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vcmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcREXS::debugName[] = "ExcREXS"; +const char* ExcREXS::debugString() const +{ + return ExcREXS::debugName; +} + +void ExcREXS::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcREXS::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcREXS::declare() +{ + return BaseClassDefiner(ExcREXS::addConstructToMap, ExcREXS::addPrimitiveAssignFnsToMap, ExcREXS::addClassAssignFnsToMap, ExcREXS::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcREXS_factory() + { + return new ExcREXS; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcREXS.hpp b/CGMES_2.4.13_18DEC2013/ExcREXS.hpp new file mode 100644 index 000000000..bb6ea0147 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcREXS.hpp @@ -0,0 +1,78 @@ +#ifndef ExcREXS_H +#define ExcREXS_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcREXSFeedbackSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcREXS : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcREXS_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp new file mode 100644 index 000000000..de55c6691 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcREXSFeedbackSignalKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcREXSFeedbackSignalKind& ExcREXSFeedbackSignalKind::operator=(ExcREXSFeedbackSignalKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcREXSFeedbackSignalKind::operator ExcREXSFeedbackSignalKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcREXSFeedbackSignalKind::debugName[] = "ExcREXSFeedbackSignalKind"; +const char* ExcREXSFeedbackSignalKind::debugString() const +{ + return ExcREXSFeedbackSignalKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcREXSFeedbackSignalKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "fieldVoltage") + { + rop = ExcREXSFeedbackSignalKind::fieldVoltage; + return lop; + } + if(EnumSymbol == "fieldCurrent") + { + rop = ExcREXSFeedbackSignalKind::fieldCurrent; + return lop; + } + if(EnumSymbol == "outputVoltage") + { + rop = ExcREXSFeedbackSignalKind::outputVoltage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcREXSFeedbackSignalKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcREXSFeedbackSignalKind::fieldVoltage) + { + EnumSymbol = "fieldVoltage"; + } + if (obj.value == ExcREXSFeedbackSignalKind::fieldCurrent) + { + EnumSymbol = "fieldCurrent"; + } + if (obj.value == ExcREXSFeedbackSignalKind::outputVoltage) + { + EnumSymbol = "outputVoltage"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcREXSFeedbackSignalKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp new file mode 100644 index 000000000..2ca199680 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp @@ -0,0 +1,50 @@ +#ifndef ExcREXSFeedbackSignalKind_H +#define ExcREXSFeedbackSignalKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + fieldVoltage, + /** + * The exciter field current is used. + */ + fieldCurrent, + /** + * The output voltage of the exciter is used. + */ + outputVoltage, + }; + + ExcREXSFeedbackSignalKind() : value(), initialized(false) {} + ExcREXSFeedbackSignalKind(ExcREXSFeedbackSignalKind_ENUM value) : value(value), initialized(true) {} + + ExcREXSFeedbackSignalKind& operator=(ExcREXSFeedbackSignalKind_ENUM rop); + operator ExcREXSFeedbackSignalKind_ENUM() const; + + ExcREXSFeedbackSignalKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcREXSFeedbackSignalKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcREXSFeedbackSignalKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp b/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp new file mode 100644 index 000000000..7f086d80e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcSCRX.hpp" + +#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() {}; + + +bool assign_ExcSCRX_cswitch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cswitch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_rcrfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rcrfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tatb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char ExcSCRX::debugName[] = "ExcSCRX"; +const char* ExcSCRX::debugString() const +{ + return ExcSCRX::debugName; +} + +void ExcSCRX::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcSCRX::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcSCRX::declare() +{ + return BaseClassDefiner(ExcSCRX::addConstructToMap, ExcSCRX::addPrimitiveAssignFnsToMap, ExcSCRX::addClassAssignFnsToMap, ExcSCRX::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcSCRX_factory() + { + return new ExcSCRX; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp b/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp new file mode 100644 index 000000000..af289a605 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp @@ -0,0 +1,51 @@ +#ifndef ExcSCRX_H +#define ExcSCRX_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcSCRX_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp b/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp new file mode 100644 index 000000000..0877745ba --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcSEXS.hpp" + +#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() {}; + + +bool assign_ExcSEXS_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tatb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char ExcSEXS::debugName[] = "ExcSEXS"; +const char* ExcSEXS::debugString() const +{ + return ExcSEXS::debugName; +} + +void ExcSEXS::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcSEXS::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcSEXS::declare() +{ + return BaseClassDefiner(ExcSEXS::addConstructToMap, ExcSEXS::addPrimitiveAssignFnsToMap, ExcSEXS::addClassAssignFnsToMap, ExcSEXS::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcSEXS_factory() + { + return new ExcSEXS; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp b/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp new file mode 100644 index 000000000..cda7c72b1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp @@ -0,0 +1,52 @@ +#ifndef ExcSEXS_H +#define ExcSEXS_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Simplified Excitation System Model. + */ + class ExcSEXS : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcSEXS_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcSK.cpp b/CGMES_2.4.13_18DEC2013/ExcSK.cpp new file mode 100644 index 000000000..8c9d63df5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcSK.cpp @@ -0,0 +1,559 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcSK.hpp" + +#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() {}; + + +bool assign_ExcSK_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kce; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kgob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kgob; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kqi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kqob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqob; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kqp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_nq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_qconoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qconoff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_qz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qz; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_remote(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->remote; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_sbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_uimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_uimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_urmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->urmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_urmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->urmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_vtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_yp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcSK::debugName[] = "ExcSK"; +const char* ExcSK::debugString() const +{ + return ExcSK::debugName; +} + +void ExcSK::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcSK::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcSK::declare() +{ + return BaseClassDefiner(ExcSK::addConstructToMap, ExcSK::addPrimitiveAssignFnsToMap, ExcSK::addClassAssignFnsToMap, ExcSK::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcSK_factory() + { + return new ExcSK; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcSK.hpp b/CGMES_2.4.13_18DEC2013/ExcSK.hpp new file mode 100644 index 000000000..663fb7330 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcSK.hpp @@ -0,0 +1,75 @@ +#ifndef ExcSK_H +#define ExcSK_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ApparentPower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcSK : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcSK_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST1A.cpp b/CGMES_2.4.13_18DEC2013/ExcST1A.cpp new file mode 100644 index 000000000..cfc5dfec5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST1A.hpp" + +#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() {}; + + +bool assign_ExcST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcST1A::debugName[] = "ExcST1A"; +const char* ExcST1A::debugString() const +{ + return ExcST1A::debugName; +} + +void ExcST1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST1A::declare() +{ + return BaseClassDefiner(ExcST1A::addConstructToMap, ExcST1A::addPrimitiveAssignFnsToMap, ExcST1A::addClassAssignFnsToMap, ExcST1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST1A_factory() + { + return new ExcST1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST1A.hpp b/CGMES_2.4.13_18DEC2013/ExcST1A.hpp new file mode 100644 index 000000000..f1d6e87f1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST1A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcST1A_H +#define ExcST1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). + */ + class ExcST1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST2A.cpp b/CGMES_2.4.13_18DEC2013/ExcST2A.cpp new file mode 100644 index 000000000..8ca08167e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST2A.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST2A.hpp" + +#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() {}; + + +bool assign_ExcST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char ExcST2A::debugName[] = "ExcST2A"; +const char* ExcST2A::debugString() const +{ + return ExcST2A::debugName; +} + +void ExcST2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST2A::declare() +{ + return BaseClassDefiner(ExcST2A::addConstructToMap, ExcST2A::addPrimitiveAssignFnsToMap, ExcST2A::addClassAssignFnsToMap, ExcST2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST2A_factory() + { + return new ExcST2A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST2A.hpp b/CGMES_2.4.13_18DEC2013/ExcST2A.hpp new file mode 100644 index 000000000..6b8f5aa82 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST2A.hpp @@ -0,0 +1,57 @@ +#ifndef ExcST2A_H +#define ExcST2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. + */ + class ExcST2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST2A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST3A.cpp b/CGMES_2.4.13_18DEC2013/ExcST3A.cpp new file mode 100644 index 000000000..3c0cddb9b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST3A.cpp @@ -0,0 +1,367 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST3A.hpp" + +#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() {}; + + +bool assign_ExcST3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kj; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vgmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + +const char ExcST3A::debugName[] = "ExcST3A"; +const char* ExcST3A::debugString() const +{ + return ExcST3A::debugName; +} + +void ExcST3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST3A::declare() +{ + return BaseClassDefiner(ExcST3A::addConstructToMap, ExcST3A::addPrimitiveAssignFnsToMap, ExcST3A::addClassAssignFnsToMap, ExcST3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST3A_factory() + { + return new ExcST3A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST3A.hpp b/CGMES_2.4.13_18DEC2013/ExcST3A.hpp new file mode 100644 index 000000000..23856c5c5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST3A.hpp @@ -0,0 +1,62 @@ +#ifndef ExcST3A_H +#define ExcST3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST3A static excitation system with added speed multiplier. + */ + class ExcST3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST3A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST4B.cpp b/CGMES_2.4.13_18DEC2013/ExcST4B.cpp new file mode 100644 index 000000000..ad7d7540d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST4B.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST4B.hpp" + +#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() {}; + + +bool assign_ExcST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lvgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_uel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uel; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vgmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcST4B::debugName[] = "ExcST4B"; +const char* ExcST4B::debugString() const +{ + return ExcST4B::debugName; +} + +void ExcST4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST4B::declare() +{ + return BaseClassDefiner(ExcST4B::addConstructToMap, ExcST4B::addPrimitiveAssignFnsToMap, ExcST4B::addClassAssignFnsToMap, ExcST4B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST4B_factory() + { + return new ExcST4B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST4B.hpp b/CGMES_2.4.13_18DEC2013/ExcST4B.hpp new file mode 100644 index 000000000..a1f945fde --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST4B.hpp @@ -0,0 +1,62 @@ +#ifndef ExcST4B_H +#define ExcST4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . + */ + class ExcST4B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST4B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST6B.cpp b/CGMES_2.4.13_18DEC2013/ExcST6B.cpp new file mode 100644 index 000000000..29ef119cf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST6B.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST6B.hpp" + +#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() {}; + + +bool assign_ExcST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_tvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vilim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vilim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmult; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcST6B::debugName[] = "ExcST6B"; +const char* ExcST6B::debugString() const +{ + return ExcST6B::debugName; +} + +void ExcST6B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST6B::declare() +{ + return BaseClassDefiner(ExcST6B::addConstructToMap, ExcST6B::addPrimitiveAssignFnsToMap, ExcST6B::addClassAssignFnsToMap, ExcST6B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST6B_factory() + { + return new ExcST6B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST6B.hpp b/CGMES_2.4.13_18DEC2013/ExcST6B.hpp new file mode 100644 index 000000000..2f218adba --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST6B.hpp @@ -0,0 +1,66 @@ +#ifndef ExcST6B_H +#define ExcST6B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "ExcST6BOELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. + */ + class ExcST6B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST6B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp new file mode 100644 index 000000000..4a1e0d921 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST6BOELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcST6BOELselectorKind& ExcST6BOELselectorKind::operator=(ExcST6BOELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcST6BOELselectorKind::operator ExcST6BOELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcST6BOELselectorKind::debugName[] = "ExcST6BOELselectorKind"; +const char* ExcST6BOELselectorKind::debugString() const +{ + return ExcST6BOELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcST6BOELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "noOELinput") + { + rop = ExcST6BOELselectorKind::noOELinput; + return lop; + } + if(EnumSymbol == "beforeUEL") + { + rop = ExcST6BOELselectorKind::beforeUEL; + return lop; + } + if(EnumSymbol == "afterUEL") + { + rop = ExcST6BOELselectorKind::afterUEL; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcST6BOELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcST6BOELselectorKind::noOELinput) + { + EnumSymbol = "noOELinput"; + } + if (obj.value == ExcST6BOELselectorKind::beforeUEL) + { + EnumSymbol = "beforeUEL"; + } + if (obj.value == ExcST6BOELselectorKind::afterUEL) + { + EnumSymbol = "afterUEL"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcST6BOELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp new file mode 100644 index 000000000..b30b3b8df --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp @@ -0,0 +1,50 @@ +#ifndef ExcST6BOELselectorKind_H +#define ExcST6BOELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + noOELinput, + /** + * The connection is before UEL. + */ + beforeUEL, + /** + * The connection is after UEL. + */ + afterUEL, + }; + + ExcST6BOELselectorKind() : value(), initialized(false) {} + ExcST6BOELselectorKind(ExcST6BOELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcST6BOELselectorKind& operator=(ExcST6BOELselectorKind_ENUM rop); + operator ExcST6BOELselectorKind_ENUM() const; + + ExcST6BOELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcST6BOELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcST6BOELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST7B.cpp b/CGMES_2.4.13_18DEC2013/ExcST7B.cpp new file mode 100644 index 000000000..37e50539b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST7B.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST7B.hpp" + +#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() {}; + + +bool assign_ExcST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcST7B::debugName[] = "ExcST7B"; +const char* ExcST7B::debugString() const +{ + return ExcST7B::debugName; +} + +void ExcST7B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST7B::declare() +{ + return BaseClassDefiner(ExcST7B::addConstructToMap, ExcST7B::addPrimitiveAssignFnsToMap, ExcST7B::addClassAssignFnsToMap, ExcST7B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST7B_factory() + { + return new ExcST7B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST7B.hpp b/CGMES_2.4.13_18DEC2013/ExcST7B.hpp new file mode 100644 index 000000000..50f30bca5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST7B.hpp @@ -0,0 +1,59 @@ +#ifndef ExcST7B_H +#define ExcST7B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcST7BOELselectorKind.hpp" +#include "ExcST7BUELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. + */ + class ExcST7B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST7B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp new file mode 100644 index 000000000..d400a7859 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST7BOELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcST7BOELselectorKind& ExcST7BOELselectorKind::operator=(ExcST7BOELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcST7BOELselectorKind::operator ExcST7BOELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcST7BOELselectorKind::debugName[] = "ExcST7BOELselectorKind"; +const char* ExcST7BOELselectorKind::debugString() const +{ + return ExcST7BOELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcST7BOELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "noOELinput") + { + rop = ExcST7BOELselectorKind::noOELinput; + return lop; + } + if(EnumSymbol == "addVref") + { + rop = ExcST7BOELselectorKind::addVref; + return lop; + } + if(EnumSymbol == "inputLVgate") + { + rop = ExcST7BOELselectorKind::inputLVgate; + return lop; + } + if(EnumSymbol == "outputLVgate") + { + rop = ExcST7BOELselectorKind::outputLVgate; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcST7BOELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcST7BOELselectorKind::noOELinput) + { + EnumSymbol = "noOELinput"; + } + if (obj.value == ExcST7BOELselectorKind::addVref) + { + EnumSymbol = "addVref"; + } + if (obj.value == ExcST7BOELselectorKind::inputLVgate) + { + EnumSymbol = "inputLVgate"; + } + if (obj.value == ExcST7BOELselectorKind::outputLVgate) + { + EnumSymbol = "outputLVgate"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcST7BOELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp new file mode 100644 index 000000000..66d97cdae --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ExcST7BOELselectorKind_H +#define ExcST7BOELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + noOELinput, + /** + * The signal is added to Vref. + */ + addVref, + /** + * The signal is connected in the input of the LV gate. + */ + inputLVgate, + /** + * The signal is connected in the output of the LV gate. + */ + outputLVgate, + }; + + ExcST7BOELselectorKind() : value(), initialized(false) {} + ExcST7BOELselectorKind(ExcST7BOELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcST7BOELselectorKind& operator=(ExcST7BOELselectorKind_ENUM rop); + operator ExcST7BOELselectorKind_ENUM() const; + + ExcST7BOELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcST7BOELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcST7BOELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp new file mode 100644 index 000000000..2260a4e4d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST7BUELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcST7BUELselectorKind& ExcST7BUELselectorKind::operator=(ExcST7BUELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcST7BUELselectorKind::operator ExcST7BUELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcST7BUELselectorKind::debugName[] = "ExcST7BUELselectorKind"; +const char* ExcST7BUELselectorKind::debugString() const +{ + return ExcST7BUELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcST7BUELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "noUELinput") + { + rop = ExcST7BUELselectorKind::noUELinput; + return lop; + } + if(EnumSymbol == "addVref") + { + rop = ExcST7BUELselectorKind::addVref; + return lop; + } + if(EnumSymbol == "inputHVgate") + { + rop = ExcST7BUELselectorKind::inputHVgate; + return lop; + } + if(EnumSymbol == "outputHVgate") + { + rop = ExcST7BUELselectorKind::outputHVgate; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcST7BUELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcST7BUELselectorKind::noUELinput) + { + EnumSymbol = "noUELinput"; + } + if (obj.value == ExcST7BUELselectorKind::addVref) + { + EnumSymbol = "addVref"; + } + if (obj.value == ExcST7BUELselectorKind::inputHVgate) + { + EnumSymbol = "inputHVgate"; + } + if (obj.value == ExcST7BUELselectorKind::outputHVgate) + { + EnumSymbol = "outputHVgate"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcST7BUELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp new file mode 100644 index 000000000..b509d7dad --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ExcST7BUELselectorKind_H +#define ExcST7BUELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + noUELinput, + /** + * The signal is added to Vref. + */ + addVref, + /** + * The signal is connected in the input of the HV gate. + */ + inputHVgate, + /** + * The signal is connected in the output of the HV gate. + */ + outputHVgate, + }; + + ExcST7BUELselectorKind() : value(), initialized(false) {} + ExcST7BUELselectorKind(ExcST7BUELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcST7BUELselectorKind& operator=(ExcST7BUELselectorKind_ENUM rop); + operator ExcST7BUELselectorKind_ENUM() const; + + ExcST7BUELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcST7BUELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcST7BUELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp new file mode 100644 index 000000000..806190c25 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcitationSystemDynamics.hpp" + +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "OverexcitationLimiterDynamics.hpp" +#include "PFVArControllerType1Dynamics.hpp" +#include "PFVArControllerType2Dynamics.hpp" +#include "PowerSystemStabilizerDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" +#include "UnderexcitationLimiterDynamics.hpp" +#include "VoltageCompensatorDynamics.hpp" + +using namespace CIMPP; + +ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {}; +ExcitationSystemDynamics::~ExcitationSystemDynamics() {}; + + + + + + + + + + + +bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + DiscontinuousExcitationControlDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscontinuousExcitationControlDynamics != element2) + { + element->DiscontinuousExcitationControlDynamics = element2; + return assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + OverexcitationLimiterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OverexcitationLimiterDynamics != element2) + { + element->OverexcitationLimiterDynamics = element2; + return assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1Dynamics != element2) + { + element->PFVArControllerType1Dynamics = element2; + return assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType2Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType2Dynamics != element2) + { + element->PFVArControllerType2Dynamics = element2; + return assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + PowerSystemStabilizerDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemStabilizerDynamics != element2) + { + element->PowerSystemStabilizerDynamics = element2; + return assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* 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_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + UnderexcitationLimiterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->UnderexcitationLimiterDynamics != element2) + { + element->UnderexcitationLimiterDynamics = element2; + return assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageCompensatorDynamics != element2) + { + element->VoltageCompensatorDynamics = element2; + return assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ExcitationSystemDynamics::debugName[] = "ExcitationSystemDynamics"; +const char* ExcitationSystemDynamics::debugString() const +{ + return ExcitationSystemDynamics::debugName; +} + +void ExcitationSystemDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics"), &ExcitationSystemDynamics_factory)); +} + +void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ExcitationSystemDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ExcitationSystemDynamics::declare() +{ + return BaseClassDefiner(ExcitationSystemDynamics::addConstructToMap, ExcitationSystemDynamics::addPrimitiveAssignFnsToMap, ExcitationSystemDynamics::addClassAssignFnsToMap, ExcitationSystemDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcitationSystemDynamics_factory() + { + return new ExcitationSystemDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp new file mode 100644 index 000000000..c4896aed2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp @@ -0,0 +1,55 @@ +#ifndef ExcitationSystemDynamics_H +#define ExcitationSystemDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DiscontinuousExcitationControlDynamics; + class OverexcitationLimiterDynamics; + class PFVArControllerType1Dynamics; + class PFVArControllerType2Dynamics; + class PowerSystemStabilizerDynamics; + class SynchronousMachineDynamics; + class UnderexcitationLimiterDynamics; + class VoltageCompensatorDynamics; + + /* + Excitation system function block whose behavior is described by reference to a standard model + */ + class ExcitationSystemDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcitationSystemDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp new file mode 100644 index 000000000..463b994b9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcitationSystemUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +ExcitationSystemUserDefined::ExcitationSystemUserDefined() {}; +ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {}; + + + +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) +{ + ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char ExcitationSystemUserDefined::debugName[] = "ExcitationSystemUserDefined"; +const char* ExcitationSystemUserDefined::debugString() const +{ + return ExcitationSystemUserDefined::debugName; +} + +void ExcitationSystemUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcitationSystemUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics"), &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner ExcitationSystemUserDefined::declare() +{ + return BaseClassDefiner(ExcitationSystemUserDefined::addConstructToMap, ExcitationSystemUserDefined::addPrimitiveAssignFnsToMap, ExcitationSystemUserDefined::addClassAssignFnsToMap, ExcitationSystemUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcitationSystemUserDefined_factory() + { + return new ExcitationSystemUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp new file mode 100644 index 000000000..ed84868ea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef ExcitationSystemUserDefined_H +#define ExcitationSystemUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Excitation system function block whose dynamic behaviour is described by + */ + class ExcitationSystemUserDefined : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcitationSystemUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp new file mode 100644 index 000000000..52ba55b11 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExternalNetworkInjection.hpp" + +#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() {}; + + +bool assign_ExternalNetworkInjection_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorSCD; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_ikSecond(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ikSecond; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxInitialSymShCCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxR0ToX0Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxR1ToX1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxZ0ToZ1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minInitialSymShCCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minR0ToX0Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minR1ToX1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minZ0ToZ1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->referencePriority; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageFactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExternalNetworkInjection::debugName[] = "ExternalNetworkInjection"; +const char* ExternalNetworkInjection::debugString() const +{ + return ExternalNetworkInjection::debugName; +} + +void ExternalNetworkInjection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExternalNetworkInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExternalNetworkInjection::declare() +{ + return BaseClassDefiner(ExternalNetworkInjection::addConstructToMap, ExternalNetworkInjection::addPrimitiveAssignFnsToMap, ExternalNetworkInjection::addClassAssignFnsToMap, ExternalNetworkInjection::debugName); +} + +namespace CIMPP +{ + BaseClass* ExternalNetworkInjection_factory() + { + return new ExternalNetworkInjection; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp new file mode 100644 index 000000000..8fc781a70 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp @@ -0,0 +1,65 @@ +#ifndef ExternalNetworkInjection_H +#define ExternalNetworkInjection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ActivePowerPerFrequency.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "ReactivePower.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + This class represents external network and it is used for IEC 60909 calculations. + */ + class ExternalNetworkInjection : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExternalNetworkInjection_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Float.cpp b/CGMES_2.4.13_18DEC2013/Float.cpp new file mode 100644 index 000000000..04c13ae6e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Float.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Float.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Float& Float::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Float::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Float::debugName[] = "Float"; +const char* Float::debugString() const +{ + return Float::debugName; +} + +Float& Float::operator+=(const Float& rhs) +{ + value += rhs.value; + return *this; +} + +Float& Float::operator-=(const Float& rhs) +{ + value -= rhs.value; + return *this; +} + +Float& Float::operator*=(const Float& rhs) +{ + value *= rhs.value; + return *this; +} + +Float& Float::operator/=(const Float& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Float& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Float& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Float.hpp b/CGMES_2.4.13_18DEC2013/Float.hpp new file mode 100644 index 000000000..ede68d395 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Float.hpp @@ -0,0 +1,39 @@ +#ifndef Float_H +#define Float_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + A floating point number. The range is unspecified and not limited. + */ + class Float + { + public: + Float() : value(0.0), initialized(false) {} + Float(long double value) : value(value), initialized(true) {} + + Float& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Float& operator+=(const Float& rhs); + Float& operator-=(const Float& rhs); + Float& operator*=(const Float& rhs); + Float& operator/=(const Float& rhs); + + friend std::istream& operator>>(std::istream& lop, Float& rop); + friend std::ostream& operator<<(std::ostream& os, const Float& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/FossilFuel.cpp b/CGMES_2.4.13_18DEC2013/FossilFuel.cpp new file mode 100644 index 000000000..cead5d6ea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/FossilFuel.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FossilFuel.hpp" + +#include +#include + +#include "ThermalGeneratingUnit.hpp" +#include "FuelType.hpp" + +using namespace CIMPP; + +FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {}; +FossilFuel::~FossilFuel() {}; + + + +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) +{ + FossilFuel* element = dynamic_cast(BaseClass_ptr1); + ThermalGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ThermalGeneratingUnit != element2) + { + element->ThermalGeneratingUnit = element2; + return assign_ThermalGeneratingUnit_FossilFuels(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char FossilFuel::debugName[] = "FossilFuel"; +const char* FossilFuel::debugString() const +{ + return FossilFuel::debugName; +} + +void FossilFuel::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void FossilFuel::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:FossilFuel.ThermalGeneratingUnit"), &assign_FossilFuel_ThermalGeneratingUnit)); +} + +const BaseClassDefiner FossilFuel::declare() +{ + return BaseClassDefiner(FossilFuel::addConstructToMap, FossilFuel::addPrimitiveAssignFnsToMap, FossilFuel::addClassAssignFnsToMap, FossilFuel::debugName); +} + +namespace CIMPP +{ + BaseClass* FossilFuel_factory() + { + return new FossilFuel; + } +} diff --git a/CGMES_2.4.13_18DEC2013/FossilFuel.hpp b/CGMES_2.4.13_18DEC2013/FossilFuel.hpp new file mode 100644 index 000000000..2c683ecd5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/FossilFuel.hpp @@ -0,0 +1,43 @@ +#ifndef FossilFuel_H +#define FossilFuel_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "FuelType.hpp" + +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. + */ + class FossilFuel : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* FossilFuel_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp new file mode 100644 index 000000000..dd419372c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FrancisGovernorControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +FrancisGovernorControlKind& FrancisGovernorControlKind::operator=(FrancisGovernorControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +FrancisGovernorControlKind::operator FrancisGovernorControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char FrancisGovernorControlKind::debugName[] = "FrancisGovernorControlKind"; +const char* FrancisGovernorControlKind::debugString() const +{ + return FrancisGovernorControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, FrancisGovernorControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "mechanicHydrolicTachoAccelerator") + { + rop = FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator; + return lop; + } + if(EnumSymbol == "mechanicHydraulicTransientFeedback") + { + rop = FrancisGovernorControlKind::mechanicHydraulicTransientFeedback; + return lop; + } + if(EnumSymbol == "electromechanicalElectrohydraulic") + { + rop = FrancisGovernorControlKind::electromechanicalElectrohydraulic; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const FrancisGovernorControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator) + { + EnumSymbol = "mechanicHydrolicTachoAccelerator"; + } + if (obj.value == FrancisGovernorControlKind::mechanicHydraulicTransientFeedback) + { + EnumSymbol = "mechanicHydraulicTransientFeedback"; + } + if (obj.value == FrancisGovernorControlKind::electromechanicalElectrohydraulic) + { + EnumSymbol = "electromechanicalElectrohydraulic"; + } + + if (!EnumSymbol.empty()) + { + os << "FrancisGovernorControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp new file mode 100644 index 000000000..a694f5429 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp @@ -0,0 +1,50 @@ +#ifndef FrancisGovernorControlKind_H +#define FrancisGovernorControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Governor control flag for Francis hydro model. + */ + class FrancisGovernorControlKind + { + public: + enum FrancisGovernorControlKind_ENUM + { + /** + * Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). + */ + mechanicHydrolicTachoAccelerator, + /** + * Mechanic-hydraulic regulator with transient feedback (Cflag=2). + */ + mechanicHydraulicTransientFeedback, + /** + * Electromechanical and electrohydraulic regulator (Cflag=3). + */ + electromechanicalElectrohydraulic, + }; + + FrancisGovernorControlKind() : value(), initialized(false) {} + FrancisGovernorControlKind(FrancisGovernorControlKind_ENUM value) : value(value), initialized(true) {} + + FrancisGovernorControlKind& operator=(FrancisGovernorControlKind_ENUM rop); + operator FrancisGovernorControlKind_ENUM() const; + + FrancisGovernorControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, FrancisGovernorControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const FrancisGovernorControlKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Frequency.cpp b/CGMES_2.4.13_18DEC2013/Frequency.cpp new file mode 100644 index 000000000..1809ef8c4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Frequency.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Frequency.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Frequency& Frequency::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Frequency::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Frequency::debugName[] = "Frequency"; +const char* Frequency::debugString() const +{ + return Frequency::debugName; +} + +Frequency& Frequency::operator+=(const Frequency& rhs) +{ + value += rhs.value; + return *this; +} + +Frequency& Frequency::operator-=(const Frequency& rhs) +{ + value -= rhs.value; + return *this; +} + +Frequency& Frequency::operator*=(const Frequency& rhs) +{ + value *= rhs.value; + return *this; +} + +Frequency& Frequency::operator/=(const Frequency& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Frequency& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Frequency& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Frequency.hpp b/CGMES_2.4.13_18DEC2013/Frequency.hpp new file mode 100644 index 000000000..28f5a1022 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Frequency.hpp @@ -0,0 +1,39 @@ +#ifndef Frequency_H +#define Frequency_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Cycles per second. + */ + class Frequency + { + public: + Frequency() : value(0.0), initialized(false) {} + Frequency(long double value) : value(value), initialized(true) {} + + Frequency& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Frequency& operator+=(const Frequency& rhs); + Frequency& operator-=(const Frequency& rhs); + Frequency& operator*=(const Frequency& rhs); + Frequency& operator/=(const Frequency& rhs); + + friend std::istream& operator>>(std::istream& lop, Frequency& rop); + friend std::ostream& operator<<(std::ostream& os, const Frequency& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/FuelType.cpp b/CGMES_2.4.13_18DEC2013/FuelType.cpp new file mode 100644 index 000000000..e59bf1fd4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/FuelType.cpp @@ -0,0 +1,126 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FuelType.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +FuelType& FuelType::operator=(FuelType_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +FuelType::operator FuelType_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char FuelType::debugName[] = "FuelType"; +const char* FuelType::debugString() const +{ + return FuelType::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, FuelType& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "FuelType") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "coal") + { + rop = FuelType::coal; + return lop; + } + if(EnumSymbol == "oil") + { + rop = FuelType::oil; + return lop; + } + if(EnumSymbol == "gas") + { + rop = FuelType::gas; + return lop; + } + if(EnumSymbol == "lignite") + { + rop = FuelType::lignite; + return lop; + } + if(EnumSymbol == "hardCoal") + { + rop = FuelType::hardCoal; + return lop; + } + if(EnumSymbol == "oilShale") + { + rop = FuelType::oilShale; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const FuelType& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == FuelType::coal) + { + EnumSymbol = "coal"; + } + if (obj.value == FuelType::oil) + { + EnumSymbol = "oil"; + } + if (obj.value == FuelType::gas) + { + EnumSymbol = "gas"; + } + if (obj.value == FuelType::lignite) + { + EnumSymbol = "lignite"; + } + if (obj.value == FuelType::hardCoal) + { + EnumSymbol = "hardCoal"; + } + if (obj.value == FuelType::oilShale) + { + EnumSymbol = "oilShale"; + } + + if (!EnumSymbol.empty()) + { + os << "FuelType." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/FuelType.hpp b/CGMES_2.4.13_18DEC2013/FuelType.hpp new file mode 100644 index 000000000..452590f12 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/FuelType.hpp @@ -0,0 +1,62 @@ +#ifndef FuelType_H +#define FuelType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of fuel. + */ + class FuelType + { + public: + enum FuelType_ENUM + { + /** + * Generic coal, not including lignite type. + */ + coal, + /** + * Oil. + */ + oil, + /** + * 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. + */ + lignite, + /** + * Hard coal + */ + hardCoal, + /** + * Oil Shale + */ + oilShale, + }; + + FuelType() : value(), initialized(false) {} + FuelType(FuelType_ENUM value) : value(value), initialized(true) {} + + FuelType& operator=(FuelType_ENUM rop); + operator FuelType_ENUM() const; + + FuelType_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, FuelType& rop); + friend std::ostream& operator<<(std::ostream& os, const FuelType& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp new file mode 100644 index 000000000..c78172e82 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GenICompensationForGenJ.hpp" + +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "VCompIEEEType2.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {}; +GenICompensationForGenJ::~GenICompensationForGenJ() {}; + + + + +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) +{ + GenICompensationForGenJ* 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_GenICompensationForGenJ(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass*, BaseClass*); +bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + VCompIEEEType2* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VcompIEEEType2 != element2) + { + element->VcompIEEEType2 = element2; + return assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char GenICompensationForGenJ::debugName[] = "GenICompensationForGenJ"; +const char* GenICompensationForGenJ::debugString() const +{ + return GenICompensationForGenJ::debugName; +} + +void GenICompensationForGenJ::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner GenICompensationForGenJ::declare() +{ + return BaseClassDefiner(GenICompensationForGenJ::addConstructToMap, GenICompensationForGenJ::addPrimitiveAssignFnsToMap, GenICompensationForGenJ::addClassAssignFnsToMap, GenICompensationForGenJ::debugName); +} + +namespace CIMPP +{ + BaseClass* GenICompensationForGenJ_factory() + { + return new GenICompensationForGenJ; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp new file mode 100644 index 000000000..80b337103 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp @@ -0,0 +1,46 @@ +#ifndef GenICompensationForGenJ_H +#define GenICompensationForGenJ_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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. + */ + class GenICompensationForGenJ : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GenICompensationForGenJ_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp new file mode 100644 index 000000000..b89e20d52 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp @@ -0,0 +1,363 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeneratingUnit.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_GeneratingUnit_genControlSource(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->genControlSource; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorSCD; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_initialP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->initialP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_longPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->longPF; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_maxOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxOperatingP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maximumAllowableSpinningReserve; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_minOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minOperatingP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_nominalP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_normalPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalPF; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedGrossMaxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedGrossMinP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedNetMaxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_shortPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->shortPF; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_startupCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->startupCost; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_totalEfficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->totalEfficiency; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_variableCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->variableCost; + if (buffer.fail()) + return false; + else + 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) +{ + 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; +} + + + + + + + + + + + + + + + + + +const char GeneratingUnit::debugName[] = "GeneratingUnit"; +const char* GeneratingUnit::debugString() const +{ + return GeneratingUnit::debugName; +} + +void GeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner GeneratingUnit::declare() +{ + return BaseClassDefiner(GeneratingUnit::addConstructToMap, GeneratingUnit::addPrimitiveAssignFnsToMap, GeneratingUnit::addClassAssignFnsToMap, GeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* GeneratingUnit_factory() + { + return new GeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp new file mode 100644 index 000000000..b2e844024 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp @@ -0,0 +1,66 @@ +#ifndef GeneratingUnit_H +#define GeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "GeneratorControlSource.hpp" +#include "Money.hpp" +#include "PerCent.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class ControlAreaGeneratingUnit; + 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. + */ + class GeneratingUnit : public Equipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp new file mode 100644 index 000000000..1850d2514 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeneratorControlSource.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +GeneratorControlSource& GeneratorControlSource::operator=(GeneratorControlSource_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +GeneratorControlSource::operator GeneratorControlSource_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char GeneratorControlSource::debugName[] = "GeneratorControlSource"; +const char* GeneratorControlSource::debugString() const +{ + return GeneratorControlSource::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, GeneratorControlSource& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "GeneratorControlSource") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "unavailable") + { + rop = GeneratorControlSource::unavailable; + return lop; + } + if(EnumSymbol == "offAGC") + { + rop = GeneratorControlSource::offAGC; + return lop; + } + if(EnumSymbol == "onAGC") + { + rop = GeneratorControlSource::onAGC; + return lop; + } + if(EnumSymbol == "plantControl") + { + rop = GeneratorControlSource::plantControl; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const GeneratorControlSource& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == GeneratorControlSource::unavailable) + { + EnumSymbol = "unavailable"; + } + if (obj.value == GeneratorControlSource::offAGC) + { + EnumSymbol = "offAGC"; + } + if (obj.value == GeneratorControlSource::onAGC) + { + EnumSymbol = "onAGC"; + } + if (obj.value == GeneratorControlSource::plantControl) + { + EnumSymbol = "plantControl"; + } + + if (!EnumSymbol.empty()) + { + os << "GeneratorControlSource." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp new file mode 100644 index 000000000..463a53ab3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp @@ -0,0 +1,54 @@ +#ifndef GeneratorControlSource_H +#define GeneratorControlSource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The source of controls for a generating unit. + */ + class GeneratorControlSource + { + public: + enum GeneratorControlSource_ENUM + { + /** + * Not available. + */ + unavailable, + /** + * Off of automatic generation control (AGC). + */ + offAGC, + /** + * On automatic generation control (AGC). + */ + onAGC, + /** + * Plant is controlling. + */ + plantControl, + }; + + GeneratorControlSource() : value(), initialized(false) {} + GeneratorControlSource(GeneratorControlSource_ENUM value) : value(value), initialized(true) {} + + GeneratorControlSource& operator=(GeneratorControlSource_ENUM rop); + operator GeneratorControlSource_ENUM() const; + + GeneratorControlSource_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, GeneratorControlSource& rop); + friend std::ostream& operator<<(std::ostream& os, const GeneratorControlSource& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp new file mode 100644 index 000000000..2d1052ed1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GenericNonLinearLoadModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +GenericNonLinearLoadModelKind& GenericNonLinearLoadModelKind::operator=(GenericNonLinearLoadModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +GenericNonLinearLoadModelKind::operator GenericNonLinearLoadModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char GenericNonLinearLoadModelKind::debugName[] = "GenericNonLinearLoadModelKind"; +const char* GenericNonLinearLoadModelKind::debugString() const +{ + return GenericNonLinearLoadModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, GenericNonLinearLoadModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "exponentialRecovery") + { + rop = GenericNonLinearLoadModelKind::exponentialRecovery; + return lop; + } + if(EnumSymbol == "loadAdaptive") + { + rop = GenericNonLinearLoadModelKind::loadAdaptive; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const GenericNonLinearLoadModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == GenericNonLinearLoadModelKind::exponentialRecovery) + { + EnumSymbol = "exponentialRecovery"; + } + if (obj.value == GenericNonLinearLoadModelKind::loadAdaptive) + { + EnumSymbol = "loadAdaptive"; + } + + if (!EnumSymbol.empty()) + { + os << "GenericNonLinearLoadModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp new file mode 100644 index 000000000..7b6aa0c38 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp @@ -0,0 +1,46 @@ +#ifndef GenericNonLinearLoadModelKind_H +#define GenericNonLinearLoadModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of generic non-linear load model. + */ + class GenericNonLinearLoadModelKind + { + public: + enum GenericNonLinearLoadModelKind_ENUM + { + /** + * Exponential recovery model. + */ + exponentialRecovery, + /** + * Load adaptive model. + */ + loadAdaptive, + }; + + GenericNonLinearLoadModelKind() : value(), initialized(false) {} + GenericNonLinearLoadModelKind(GenericNonLinearLoadModelKind_ENUM value) : value(value), initialized(true) {} + + GenericNonLinearLoadModelKind& operator=(GenericNonLinearLoadModelKind_ENUM rop); + operator GenericNonLinearLoadModelKind_ENUM() const; + + GenericNonLinearLoadModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, GenericNonLinearLoadModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const GenericNonLinearLoadModelKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp new file mode 100644 index 000000000..b23c584fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeographicalLocationVersion.hpp" + +#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() {}; + + +bool assign_GeographicalLocationVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeographicalLocationVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char GeographicalLocationVersion::debugName[] = "GeographicalLocationVersion"; +const char* GeographicalLocationVersion::debugString() const +{ + return GeographicalLocationVersion::debugName; +} + +void GeographicalLocationVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GeographicalLocationVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GeographicalLocationVersion::declare() +{ + return BaseClassDefiner(GeographicalLocationVersion::addConstructToMap, GeographicalLocationVersion::addPrimitiveAssignFnsToMap, GeographicalLocationVersion::addClassAssignFnsToMap, GeographicalLocationVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* GeographicalLocationVersion_factory() + { + return new GeographicalLocationVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp new file mode 100644 index 000000000..46e7a6d4e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp @@ -0,0 +1,51 @@ +#ifndef GeographicalLocationVersion_H +#define GeographicalLocationVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class GeographicalLocationVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GeographicalLocationVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp b/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp new file mode 100644 index 000000000..e2c0faf26 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeographicalRegion.hpp" + +#include +#include + +#include "SubGeographicalRegion.hpp" + +using namespace CIMPP; + +GeographicalRegion::GeographicalRegion() {}; +GeographicalRegion::~GeographicalRegion() {}; + + + + +bool assign_SubGeographicalRegion_Region(BaseClass*, BaseClass*); +bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Regions.begin(), element->Regions.end(), element2) == element->Regions.end()) + { + element->Regions.push_back(element2); + return assign_SubGeographicalRegion_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char GeographicalRegion::debugName[] = "GeographicalRegion"; +const char* GeographicalRegion::debugString() const +{ + return GeographicalRegion::debugName; +} + +void GeographicalRegion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:GeographicalRegion"), &GeographicalRegion_factory)); +} + +void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void GeographicalRegion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:GeographicalRegion.Regions"), &assign_GeographicalRegion_Regions)); +} + +const BaseClassDefiner GeographicalRegion::declare() +{ + return BaseClassDefiner(GeographicalRegion::addConstructToMap, GeographicalRegion::addPrimitiveAssignFnsToMap, GeographicalRegion::addClassAssignFnsToMap, GeographicalRegion::debugName); +} + +namespace CIMPP +{ + BaseClass* GeographicalRegion_factory() + { + return new GeographicalRegion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp b/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp new file mode 100644 index 000000000..a629c89ff --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp @@ -0,0 +1,41 @@ +#ifndef GeographicalRegion_H +#define GeographicalRegion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SubGeographicalRegion; + + /* + A geographical region of a power system network model. + */ + class GeographicalRegion : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + GeographicalRegion(); + ~GeographicalRegion() override; + + std::list Regions; /* All sub-geograhpical regions within this geographical region. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GeographicalRegion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovCT1.cpp b/CGMES_2.4.13_18DEC2013/GovCT1.cpp new file mode 100644 index 000000000..f5fa14a80 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovCT1.cpp @@ -0,0 +1,623 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovCT1.hpp" + +#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() {}; + + +bool assign_GovCT1_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kigov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kimw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ldref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmwset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rclose; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rdown; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ropen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rselect; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rup; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tact; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->teng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpelec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfspd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovCT1::debugName[] = "GovCT1"; +const char* GovCT1::debugString() const +{ + return GovCT1::debugName; +} + +void GovCT1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovCT1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovCT1::declare() +{ + return BaseClassDefiner(GovCT1::addConstructToMap, GovCT1::addPrimitiveAssignFnsToMap, GovCT1::addClassAssignFnsToMap, GovCT1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovCT1_factory() + { + return new GovCT1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovCT1.hpp b/CGMES_2.4.13_18DEC2013/GovCT1.hpp new file mode 100644 index 000000000..3b5339d53 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovCT1.hpp @@ -0,0 +1,81 @@ +#ifndef GovCT1_H +#define GovCT1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "DroopSignalFeedbackKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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). + */ + class GovCT1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovCT1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovCT2.cpp b/CGMES_2.4.13_18DEC2013/GovCT2.cpp new file mode 100644 index 000000000..a309e3553 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovCT2.cpp @@ -0,0 +1,959 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovCT2.hpp" + +#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() {}; + + +bool assign_GovCT2_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kigov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kimw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ldref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmwset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_prate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rclose; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rdown; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ropen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rselect; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rup; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tact; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->teng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpelec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfspd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovCT2::debugName[] = "GovCT2"; +const char* GovCT2::debugString() const +{ + return GovCT2::debugName; +} + +void GovCT2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovCT2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovCT2::declare() +{ + return BaseClassDefiner(GovCT2::addConstructToMap, GovCT2::addPrimitiveAssignFnsToMap, GovCT2::addClassAssignFnsToMap, GovCT2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovCT2_factory() + { + return new GovCT2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovCT2.hpp b/CGMES_2.4.13_18DEC2013/GovCT2.hpp new file mode 100644 index 000000000..cb578dd49 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovCT2.hpp @@ -0,0 +1,103 @@ +#ifndef GovCT2_H +#define GovCT2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "DroopSignalFeedbackKind.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class GovCT2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovCT2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovGAST.cpp b/CGMES_2.4.13_18DEC2013/GovGAST.cpp new file mode 100644 index 000000000..0f657d21e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST.hpp" + +#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() {}; + + +bool assign_GovGAST_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char GovGAST::debugName[] = "GovGAST"; +const char* GovGAST::debugString() const +{ + return GovGAST::debugName; +} + +void GovGAST::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST::declare() +{ + return BaseClassDefiner(GovGAST::addConstructToMap, GovGAST::addPrimitiveAssignFnsToMap, GovGAST::addClassAssignFnsToMap, GovGAST::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST_factory() + { + return new GovGAST; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovGAST.hpp b/CGMES_2.4.13_18DEC2013/GovGAST.hpp new file mode 100644 index 000000000..e0b807a03 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST.hpp @@ -0,0 +1,52 @@ +#ifndef GovGAST_H +#define GovGAST_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Single shaft gas turbine. + */ + class GovGAST : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovGAST1.cpp b/CGMES_2.4.13_18DEC2013/GovGAST1.cpp new file mode 100644 index 000000000..260daa6e7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST1.cpp @@ -0,0 +1,591 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST1.hpp" + +#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() {}; + + +bool assign_GovGAST1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_fidle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fidle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_lmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_loadinc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->loadinc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_ltrate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ltrate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_tltr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tltr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovGAST1::debugName[] = "GovGAST1"; +const char* GovGAST1::debugString() const +{ + return GovGAST1::debugName; +} + +void GovGAST1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST1::declare() +{ + return BaseClassDefiner(GovGAST1::addConstructToMap, GovGAST1::addPrimitiveAssignFnsToMap, GovGAST1::addClassAssignFnsToMap, GovGAST1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST1_factory() + { + return new GovGAST1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovGAST1.hpp b/CGMES_2.4.13_18DEC2013/GovGAST1.hpp new file mode 100644 index 000000000..cd37a1798 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST1.hpp @@ -0,0 +1,78 @@ +#ifndef GovGAST1_H +#define GovGAST1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified single shaft gas turbine. + */ + class GovGAST1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovGAST2.cpp b/CGMES_2.4.13_18DEC2013/GovGAST2.cpp new file mode 100644 index 000000000..d800dff6c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST2.cpp @@ -0,0 +1,559 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST2.hpp" + +#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() {}; + + +bool assign_GovGAST2_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->c; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ecr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->etd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_w(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->w; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_z(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->z; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovGAST2::debugName[] = "GovGAST2"; +const char* GovGAST2::debugString() const +{ + return GovGAST2::debugName; +} + +void GovGAST2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST2::declare() +{ + return BaseClassDefiner(GovGAST2::addConstructToMap, GovGAST2::addPrimitiveAssignFnsToMap, GovGAST2::addClassAssignFnsToMap, GovGAST2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST2_factory() + { + return new GovGAST2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovGAST2.hpp b/CGMES_2.4.13_18DEC2013/GovGAST2.hpp new file mode 100644 index 000000000..dd07400d5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST2.hpp @@ -0,0 +1,77 @@ +#ifndef GovGAST2_H +#define GovGAST2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "Temperature.hpp" + +namespace CIMPP +{ + + /* + Gas turbine model. + */ + class GovGAST2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovGAST3.cpp b/CGMES_2.4.13_18DEC2013/GovGAST3.cpp new file mode 100644 index 000000000..cc6585f6e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST3.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST3.hpp" + +#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() {}; + + +bool assign_GovGAST3_bca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bca; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_kac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_kca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kca; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ksi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ksi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ky(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ky; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_rcmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rcmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_rcmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rcmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tfen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tsi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ttc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ttc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ty; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char GovGAST3::debugName[] = "GovGAST3"; +const char* GovGAST3::debugString() const +{ + return GovGAST3::debugName; +} + +void GovGAST3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST3::declare() +{ + return BaseClassDefiner(GovGAST3::addConstructToMap, GovGAST3::addPrimitiveAssignFnsToMap, GovGAST3::addClassAssignFnsToMap, GovGAST3::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST3_factory() + { + return new GovGAST3; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovGAST3.hpp b/CGMES_2.4.13_18DEC2013/GovGAST3.hpp new file mode 100644 index 000000000..dad20cfc8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST3.hpp @@ -0,0 +1,64 @@ +#ifndef GovGAST3_H +#define GovGAST3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "Temperature.hpp" + +namespace CIMPP +{ + + /* + Generic turbogas with acceleration and temperature controller. + */ + class GovGAST3 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST3_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovGAST4.cpp b/CGMES_2.4.13_18DEC2013/GovGAST4.cpp new file mode 100644 index 000000000..5d9f66540 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST4.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST4.hpp" + +#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() {}; + + +bool assign_GovGAST4_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_ktm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ktm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_rymn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rymn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_rymx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rymx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char GovGAST4::debugName[] = "GovGAST4"; +const char* GovGAST4::debugString() const +{ + return GovGAST4::debugName; +} + +void GovGAST4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST4::declare() +{ + return BaseClassDefiner(GovGAST4::addConstructToMap, GovGAST4::addPrimitiveAssignFnsToMap, GovGAST4::addClassAssignFnsToMap, GovGAST4::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST4_factory() + { + return new GovGAST4; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovGAST4.hpp b/CGMES_2.4.13_18DEC2013/GovGAST4.hpp new file mode 100644 index 000000000..db6a06980 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGAST4.hpp @@ -0,0 +1,52 @@ +#ifndef GovGAST4_H +#define GovGAST4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Generic turbogas. + */ + class GovGAST4 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST4_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp b/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp new file mode 100644 index 000000000..553f65613 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp @@ -0,0 +1,575 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGASTWD.hpp" + +#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() {}; + + +bool assign_GovGASTWD_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->c; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ecr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->etd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdroop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovGASTWD::debugName[] = "GovGASTWD"; +const char* GovGASTWD::debugString() const +{ + return GovGASTWD::debugName; +} + +void GovGASTWD::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGASTWD::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGASTWD::declare() +{ + return BaseClassDefiner(GovGASTWD::addConstructToMap, GovGASTWD::addPrimitiveAssignFnsToMap, GovGASTWD::addClassAssignFnsToMap, GovGASTWD::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGASTWD_factory() + { + return new GovGASTWD; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp b/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp new file mode 100644 index 000000000..f37266ee1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp @@ -0,0 +1,77 @@ +#ifndef GovGASTWD_H +#define GovGASTWD_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "Temperature.hpp" + +namespace CIMPP +{ + + /* + Woodward Gas turbine governor model. + */ + class GovGASTWD : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGASTWD_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydro1.cpp b/CGMES_2.4.13_18DEC2013/GovHydro1.cpp new file mode 100644 index 000000000..5905eed08 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro1.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro1.hpp" + +#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() {}; + + +bool assign_GovHydro1_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hdam; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_velm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char GovHydro1::debugName[] = "GovHydro1"; +const char* GovHydro1::debugString() const +{ + return GovHydro1::debugName; +} + +void GovHydro1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro1::declare() +{ + return BaseClassDefiner(GovHydro1::addConstructToMap, GovHydro1::addPrimitiveAssignFnsToMap, GovHydro1::addClassAssignFnsToMap, GovHydro1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro1_factory() + { + return new GovHydro1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydro1.hpp b/CGMES_2.4.13_18DEC2013/GovHydro1.hpp new file mode 100644 index 000000000..cb56f9b66 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro1.hpp @@ -0,0 +1,57 @@ +#ifndef GovHydro1_H +#define GovHydro1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Basic Hydro turbine governor model. + */ + class GovHydro1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydro2.cpp b/CGMES_2.4.13_18DEC2013/GovHydro2.cpp new file mode 100644 index 000000000..5ce722b05 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro2.cpp @@ -0,0 +1,511 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro2.hpp" + +#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() {}; + + +bool assign_GovHydro2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydro2::debugName[] = "GovHydro2"; +const char* GovHydro2::debugString() const +{ + return GovHydro2::debugName; +} + +void GovHydro2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro2::declare() +{ + return BaseClassDefiner(GovHydro2::addConstructToMap, GovHydro2::addPrimitiveAssignFnsToMap, GovHydro2::addClassAssignFnsToMap, GovHydro2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro2_factory() + { + return new GovHydro2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydro2.hpp b/CGMES_2.4.13_18DEC2013/GovHydro2.hpp new file mode 100644 index 000000000..551e5adfb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro2.hpp @@ -0,0 +1,73 @@ +#ifndef GovHydro2_H +#define GovHydro2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. + */ + class GovHydro2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydro3.cpp b/CGMES_2.4.13_18DEC2013/GovHydro3.cpp new file mode 100644 index 000000000..e14871a36 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro3.cpp @@ -0,0 +1,623 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro3.hpp" + +#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() {}; + + +bool assign_GovHydro3_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_relec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->relec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_rgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydro3::debugName[] = "GovHydro3"; +const char* GovHydro3::debugString() const +{ + return GovHydro3::debugName; +} + +void GovHydro3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro3::declare() +{ + return BaseClassDefiner(GovHydro3::addConstructToMap, GovHydro3::addPrimitiveAssignFnsToMap, GovHydro3::addClassAssignFnsToMap, GovHydro3::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro3_factory() + { + return new GovHydro3; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydro3.hpp b/CGMES_2.4.13_18DEC2013/GovHydro3.hpp new file mode 100644 index 000000000..833479d65 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro3.hpp @@ -0,0 +1,81 @@ +#ifndef GovHydro3_H +#define GovHydro3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class GovHydro3 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro3_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydro4.cpp b/CGMES_2.4.13_18DEC2013/GovHydro4.cpp new file mode 100644 index 000000000..fd340cff5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro4.cpp @@ -0,0 +1,655 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro4.hpp" + +#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() {}; + + +bool assign_GovHydro4_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hdam; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_qn1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qn1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tblade(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tblade; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydro4::debugName[] = "GovHydro4"; +const char* GovHydro4::debugString() const +{ + return GovHydro4::debugName; +} + +void GovHydro4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro4::declare() +{ + return BaseClassDefiner(GovHydro4::addConstructToMap, GovHydro4::addPrimitiveAssignFnsToMap, GovHydro4::addClassAssignFnsToMap, GovHydro4::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro4_factory() + { + return new GovHydro4; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydro4.hpp b/CGMES_2.4.13_18DEC2013/GovHydro4.hpp new file mode 100644 index 000000000..f91554cfd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydro4.hpp @@ -0,0 +1,82 @@ +#ifndef GovHydro4_H +#define GovHydro4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class GovHydro4 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro4_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp b/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp new file mode 100644 index 000000000..af9c6f749 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp @@ -0,0 +1,607 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroDD.hpp" + +#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() {}; + + +bool assign_GovHydroDD_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroDD::debugName[] = "GovHydroDD"; +const char* GovHydroDD::debugString() const +{ + return GovHydroDD::debugName; +} + +void GovHydroDD::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroDD::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroDD::declare() +{ + return BaseClassDefiner(GovHydroDD::addConstructToMap, GovHydroDD::addPrimitiveAssignFnsToMap, GovHydroDD::addClassAssignFnsToMap, GovHydroDD::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroDD_factory() + { + return new GovHydroDD; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp b/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp new file mode 100644 index 000000000..66448cd4e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp @@ -0,0 +1,80 @@ +#ifndef GovHydroDD_H +#define GovHydroDD_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Double derivative hydro governor and turbine. + */ + class GovHydroDD : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroDD_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp new file mode 100644 index 000000000..69a4aec31 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroFrancis.hpp" + +#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() {}; + + +bool assign_GovHydroFrancis_am(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->am; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_etamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->etamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qc0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twnc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->va; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->waterTunnelSurgeChamberSimulation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zsfc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroFrancis::debugName[] = "GovHydroFrancis"; +const char* GovHydroFrancis::debugString() const +{ + return GovHydroFrancis::debugName; +} + +void GovHydroFrancis::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroFrancis::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroFrancis::declare() +{ + return BaseClassDefiner(GovHydroFrancis::addConstructToMap, GovHydroFrancis::addPrimitiveAssignFnsToMap, GovHydroFrancis::addClassAssignFnsToMap, GovHydroFrancis::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroFrancis_factory() + { + return new GovHydroFrancis; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp new file mode 100644 index 000000000..82318836e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp @@ -0,0 +1,75 @@ +#ifndef GovHydroFrancis_H +#define GovHydroFrancis_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Area.hpp" +#include "Boolean.hpp" +#include "FrancisGovernorControlKind.hpp" +#include "Frequency.hpp" +#include "Length.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "VolumeFlowRate.hpp" + +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. + */ + class GovHydroFrancis : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroFrancis_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp new file mode 100644 index 000000000..282e23474 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroIEEE0.hpp" + +#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() {}; + + +bool assign_GovHydroIEEE0_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char GovHydroIEEE0::debugName[] = "GovHydroIEEE0"; +const char* GovHydroIEEE0::debugString() const +{ + return GovHydroIEEE0::debugName; +} + +void GovHydroIEEE0::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroIEEE0::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroIEEE0::declare() +{ + return BaseClassDefiner(GovHydroIEEE0::addConstructToMap, GovHydroIEEE0::addPrimitiveAssignFnsToMap, GovHydroIEEE0::addClassAssignFnsToMap, GovHydroIEEE0::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroIEEE0_factory() + { + return new GovHydroIEEE0; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp new file mode 100644 index 000000000..f7ce7aa7d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp @@ -0,0 +1,50 @@ +#ifndef GovHydroIEEE0_H +#define GovHydroIEEE0_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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 + */ + class GovHydroIEEE0 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroIEEE0_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp new file mode 100644 index 000000000..7eba81a7d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp @@ -0,0 +1,463 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroIEEE2.hpp" + +#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() {}; + + +bool assign_GovHydroIEEE2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroIEEE2::debugName[] = "GovHydroIEEE2"; +const char* GovHydroIEEE2::debugString() const +{ + return GovHydroIEEE2::debugName; +} + +void GovHydroIEEE2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroIEEE2::declare() +{ + return BaseClassDefiner(GovHydroIEEE2::addConstructToMap, GovHydroIEEE2::addPrimitiveAssignFnsToMap, GovHydroIEEE2::addClassAssignFnsToMap, GovHydroIEEE2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroIEEE2_factory() + { + return new GovHydroIEEE2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp new file mode 100644 index 000000000..db7fb4c8f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp @@ -0,0 +1,69 @@ +#ifndef GovHydroIEEE2_H +#define GovHydroIEEE2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref + */ + class GovHydroIEEE2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroIEEE2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp b/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp new file mode 100644 index 000000000..a6e48d00d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp @@ -0,0 +1,575 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroPID.hpp" + +#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() {}; + + +bool assign_GovHydroPID_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroPID::debugName[] = "GovHydroPID"; +const char* GovHydroPID::debugString() const +{ + return GovHydroPID::debugName; +} + +void GovHydroPID::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroPID::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroPID::declare() +{ + return BaseClassDefiner(GovHydroPID::addConstructToMap, GovHydroPID::addPrimitiveAssignFnsToMap, GovHydroPID::addClassAssignFnsToMap, GovHydroPID::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroPID_factory() + { + return new GovHydroPID; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp b/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp new file mode 100644 index 000000000..62b09b74c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp @@ -0,0 +1,78 @@ +#ifndef GovHydroPID_H +#define GovHydroPID_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + PID governor and turbine. + */ + class GovHydroPID : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroPID_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp b/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp new file mode 100644 index 000000000..4d1cc7efb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroPID2.hpp" + +#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() {}; + + +bool assign_GovHydroPID2_atw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->atw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->feedbackSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_g1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_g2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->treg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroPID2::debugName[] = "GovHydroPID2"; +const char* GovHydroPID2::debugString() const +{ + return GovHydroPID2::debugName; +} + +void GovHydroPID2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroPID2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroPID2::declare() +{ + return BaseClassDefiner(GovHydroPID2::addConstructToMap, GovHydroPID2::addPrimitiveAssignFnsToMap, GovHydroPID2::addClassAssignFnsToMap, GovHydroPID2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroPID2_factory() + { + return new GovHydroPID2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp b/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp new file mode 100644 index 000000000..4927a18e5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp @@ -0,0 +1,66 @@ +#ifndef GovHydroPID2_H +#define GovHydroPID2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroPID2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp b/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp new file mode 100644 index 000000000..beecbd3c5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp @@ -0,0 +1,495 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroPelton.hpp" + +#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() {}; + + +bool assign_GovHydroPelton_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qc0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_simplifiedPelton(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->simplifiedPelton; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_staticCompensating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->staticCompensating; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twnc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->va; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_vav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vav; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_vcv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->waterTunnelSurgeChamberSimulation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zsfc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroPelton::debugName[] = "GovHydroPelton"; +const char* GovHydroPelton::debugString() const +{ + return GovHydroPelton::debugName; +} + +void GovHydroPelton::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroPelton::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroPelton::declare() +{ + return BaseClassDefiner(GovHydroPelton::addConstructToMap, GovHydroPelton::addPrimitiveAssignFnsToMap, GovHydroPelton::addClassAssignFnsToMap, GovHydroPelton::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroPelton_factory() + { + return new GovHydroPelton; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp b/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp new file mode 100644 index 000000000..e891067ca --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp @@ -0,0 +1,75 @@ +#ifndef GovHydroPelton_H +#define GovHydroPelton_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Area.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "Length.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "VolumeFlowRate.hpp" + +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. + */ + class GovHydroPelton : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroPelton_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroR.cpp b/CGMES_2.4.13_18DEC2013/GovHydroR.cpp new file mode 100644 index 000000000..d4491f137 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroR.cpp @@ -0,0 +1,719 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroR.hpp" + +#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() {}; + + +bool assign_GovHydroR_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroR::debugName[] = "GovHydroR"; +const char* GovHydroR::debugString() const +{ + return GovHydroR::debugName; +} + +void GovHydroR::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroR::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroR::declare() +{ + return BaseClassDefiner(GovHydroR::addConstructToMap, GovHydroR::addPrimitiveAssignFnsToMap, GovHydroR::addClassAssignFnsToMap, GovHydroR::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroR_factory() + { + return new GovHydroR; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroR.hpp b/CGMES_2.4.13_18DEC2013/GovHydroR.hpp new file mode 100644 index 000000000..116b646d5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroR.hpp @@ -0,0 +1,87 @@ +#ifndef GovHydroR_H +#define GovHydroR_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Fourth order lead-lag governor and hydro turbine. + */ + class GovHydroR : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroR_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp b/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp new file mode 100644 index 000000000..5a81200a1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp @@ -0,0 +1,863 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroWEH.hpp" + +#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() {}; + + +bool assign_GovHydroWEH_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_dicn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dicn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_dpv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->feedbackSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gtmxcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gtmxcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gtmxop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gtmxop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_rpg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rpg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_rpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tdv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroWEH::debugName[] = "GovHydroWEH"; +const char* GovHydroWEH::debugString() const +{ + return GovHydroWEH::debugName; +} + +void GovHydroWEH::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroWEH::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroWEH::declare() +{ + return BaseClassDefiner(GovHydroWEH::addConstructToMap, GovHydroWEH::addPrimitiveAssignFnsToMap, GovHydroWEH::addClassAssignFnsToMap, GovHydroWEH::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroWEH_factory() + { + return new GovHydroWEH; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp b/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp new file mode 100644 index 000000000..acefea27a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp @@ -0,0 +1,95 @@ +#ifndef GovHydroWEH_H +#define GovHydroWEH_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Woodward Electric Hydro Governor Model. + */ + class GovHydroWEH : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroWEH_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp b/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp new file mode 100644 index 000000000..951e73be7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroWPID.hpp" + +#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() {}; + + +bool assign_GovHydroWPID_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gatmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gatmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gatmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gatmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_reg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->reg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->treg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroWPID::debugName[] = "GovHydroWPID"; +const char* GovHydroWPID::debugString() const +{ + return GovHydroWPID::debugName; +} + +void GovHydroWPID::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroWPID::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroWPID::declare() +{ + return BaseClassDefiner(GovHydroWPID::addConstructToMap, GovHydroWPID::addPrimitiveAssignFnsToMap, GovHydroWPID::addClassAssignFnsToMap, GovHydroWPID::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroWPID_factory() + { + return new GovHydroWPID; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp b/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp new file mode 100644 index 000000000..fb769d79e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp @@ -0,0 +1,64 @@ +#ifndef GovHydroWPID_H +#define GovHydroWPID_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Woodward PID Hydro Governor. + */ + class GovHydroWPID : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroWPID_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteam0.cpp b/CGMES_2.4.13_18DEC2013/GovSteam0.cpp new file mode 100644 index 000000000..a1e1a0254 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteam0.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteam0.hpp" + +#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() {}; + + +bool assign_GovSteam0_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char GovSteam0::debugName[] = "GovSteam0"; +const char* GovSteam0::debugString() const +{ + return GovSteam0::debugName; +} + +void GovSteam0::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteam0::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteam0::declare() +{ + return BaseClassDefiner(GovSteam0::addConstructToMap, GovSteam0::addPrimitiveAssignFnsToMap, GovSteam0::addClassAssignFnsToMap, GovSteam0::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteam0_factory() + { + return new GovSteam0; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteam0.hpp b/CGMES_2.4.13_18DEC2013/GovSteam0.hpp new file mode 100644 index 000000000..942e644f8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteam0.hpp @@ -0,0 +1,50 @@ +#ifndef GovSteam0_H +#define GovSteam0_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + A simplified steam turbine governor model. + */ + class GovSteam0 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteam0_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteam1.cpp b/CGMES_2.4.13_18DEC2013/GovSteam1.cpp new file mode 100644 index 000000000..ef3c598f9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteam1.cpp @@ -0,0 +1,671 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteam1.hpp" + +#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() {}; + + +bool assign_GovSteam1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_sdb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sdb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_sdb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sdb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_valve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valve; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteam1::debugName[] = "GovSteam1"; +const char* GovSteam1::debugString() const +{ + return GovSteam1::debugName; +} + +void GovSteam1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteam1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteam1::declare() +{ + return BaseClassDefiner(GovSteam1::addConstructToMap, GovSteam1::addPrimitiveAssignFnsToMap, GovSteam1::addClassAssignFnsToMap, GovSteam1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteam1_factory() + { + return new GovSteam1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteam1.hpp b/CGMES_2.4.13_18DEC2013/GovSteam1.hpp new file mode 100644 index 000000000..ee0ccf5fb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteam1.hpp @@ -0,0 +1,84 @@ +#ifndef GovSteam1_H +#define GovSteam1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). + */ + class GovSteam1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteam1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteam2.cpp b/CGMES_2.4.13_18DEC2013/GovSteam2.cpp new file mode 100644 index 000000000..dae038a86 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteam2.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteam2.hpp" + +#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() {}; + + +bool assign_GovSteam2_dbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char GovSteam2::debugName[] = "GovSteam2"; +const char* GovSteam2::debugString() const +{ + return GovSteam2::debugName; +} + +void GovSteam2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteam2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteam2::declare() +{ + return BaseClassDefiner(GovSteam2::addConstructToMap, GovSteam2::addPrimitiveAssignFnsToMap, GovSteam2::addClassAssignFnsToMap, GovSteam2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteam2_factory() + { + return new GovSteam2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteam2.hpp b/CGMES_2.4.13_18DEC2013/GovSteam2.hpp new file mode 100644 index 000000000..855305c31 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteam2.hpp @@ -0,0 +1,50 @@ +#ifndef GovSteam2_H +#define GovSteam2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Simplified governor model. + */ + class GovSteam2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteam2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp b/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp new file mode 100644 index 000000000..b99f888df --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamCC.hpp" + +#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() {}; + + +bool assign_GovSteamCC_dhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_dlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_fhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_flp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_pmaxhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmaxhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_pmaxlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmaxlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_rhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_rlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t1hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t1lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t3hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t3lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t4hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t4lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t5hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t5lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char GovSteamCC::debugName[] = "GovSteamCC"; +const char* GovSteamCC::debugString() const +{ + return GovSteamCC::debugName; +} + +void GovSteamCC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamCC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamCC::declare() +{ + return BaseClassDefiner(GovSteamCC::addConstructToMap, GovSteamCC::addPrimitiveAssignFnsToMap, GovSteamCC::addClassAssignFnsToMap, GovSteamCC::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamCC_factory() + { + return new GovSteamCC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp b/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp new file mode 100644 index 000000000..72759ea29 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp @@ -0,0 +1,59 @@ +#ifndef GovSteamCC_H +#define GovSteamCC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Cross compound turbine governor model. + */ + class GovSteamCC : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamCC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp b/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp new file mode 100644 index 000000000..b5a684c62 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp @@ -0,0 +1,607 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamEU.hpp" + +#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() {}; + + +bool assign_GovSteamEU_chc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->chc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_cho(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cho; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_cic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_cio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_hhpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hhpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_kfcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kfcor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->khp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_klp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_kwcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kwcor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_prhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_simx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->simx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tdp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_ten(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ten; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tfp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tvhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tvip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wmax1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wmax2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wwmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wwmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wwmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wwmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamEU::debugName[] = "GovSteamEU"; +const char* GovSteamEU::debugString() const +{ + return GovSteamEU::debugName; +} + +void GovSteamEU::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamEU::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamEU::declare() +{ + return BaseClassDefiner(GovSteamEU::addConstructToMap, GovSteamEU::addPrimitiveAssignFnsToMap, GovSteamEU::addClassAssignFnsToMap, GovSteamEU::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamEU_factory() + { + return new GovSteamEU; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp b/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp new file mode 100644 index 000000000..11e4f65eb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp @@ -0,0 +1,78 @@ +#ifndef GovSteamEU_H +#define GovSteamEU_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Simplified model of boiler and steam turbine with PID governor. + */ + class GovSteamEU : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamEU_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp b/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp new file mode 100644 index 000000000..6fb69673f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamFV2.hpp" + +#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() {}; + + +bool assign_GovSteamFV2_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char GovSteamFV2::debugName[] = "GovSteamFV2"; +const char* GovSteamFV2::debugString() const +{ + return GovSteamFV2::debugName; +} + +void GovSteamFV2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamFV2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamFV2::declare() +{ + return BaseClassDefiner(GovSteamFV2::addConstructToMap, GovSteamFV2::addPrimitiveAssignFnsToMap, GovSteamFV2::addClassAssignFnsToMap, GovSteamFV2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamFV2_factory() + { + return new GovSteamFV2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp b/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp new file mode 100644 index 000000000..6271ab5b3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp @@ -0,0 +1,55 @@ +#ifndef GovSteamFV2_H +#define GovSteamFV2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamFV2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp b/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp new file mode 100644 index 000000000..3bdf5d1ba --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamFV3.hpp" + +#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() {}; + + +bool assign_GovSteamFV3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_prmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char GovSteamFV3::debugName[] = "GovSteamFV3"; +const char* GovSteamFV3::debugString() const +{ + return GovSteamFV3::debugName; +} + +void GovSteamFV3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamFV3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamFV3::declare() +{ + return BaseClassDefiner(GovSteamFV3::addConstructToMap, GovSteamFV3::addPrimitiveAssignFnsToMap, GovSteamFV3::addClassAssignFnsToMap, GovSteamFV3::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamFV3_factory() + { + return new GovSteamFV3; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp b/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp new file mode 100644 index 000000000..6a09f094e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp @@ -0,0 +1,62 @@ +#ifndef GovSteamFV3_H +#define GovSteamFV3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. + */ + class GovSteamFV3 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamFV3_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp b/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp new file mode 100644 index 000000000..3c3628870 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp @@ -0,0 +1,863 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamFV4.hpp" + +#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() {}; + + +bool assign_GovSteamFV4_cpsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cpsmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_cpsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cpsmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_crmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->crmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_crmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->crmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->khp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kmp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmp1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kmp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmp2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kpt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_krc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->krc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ksh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ksh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_lpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lpi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_lps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_pr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_pr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_psmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->psmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rsmimn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rsmimn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rsmimx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rsmimx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rvgmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rvgmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rvgmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rvgmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_srmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->srmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_srmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->srmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_srsmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->srsmp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_svmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->svmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_svmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->svmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tam; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ty; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_yhpmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yhpmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_yhpmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yhpmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ympmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ympmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ympmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ympmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamFV4::debugName[] = "GovSteamFV4"; +const char* GovSteamFV4::debugString() const +{ + return GovSteamFV4::debugName; +} + +void GovSteamFV4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamFV4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamFV4::declare() +{ + return BaseClassDefiner(GovSteamFV4::addConstructToMap, GovSteamFV4::addPrimitiveAssignFnsToMap, GovSteamFV4::addClassAssignFnsToMap, GovSteamFV4::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamFV4_factory() + { + return new GovSteamFV4; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp b/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp new file mode 100644 index 000000000..2b19c8f6e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp @@ -0,0 +1,93 @@ +#ifndef GovSteamFV4_H +#define GovSteamFV4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Detailed electro-hydraulic governor for steam unit. + */ + class GovSteamFV4 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamFV4_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp new file mode 100644 index 000000000..e21c36d0a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamIEEE1.hpp" + +#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() {}; + + +bool assign_GovSteamIEEE1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamIEEE1::debugName[] = "GovSteamIEEE1"; +const char* GovSteamIEEE1::debugString() const +{ + return GovSteamIEEE1::debugName; +} + +void GovSteamIEEE1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamIEEE1::declare() +{ + return BaseClassDefiner(GovSteamIEEE1::addConstructToMap, GovSteamIEEE1::addPrimitiveAssignFnsToMap, GovSteamIEEE1::addClassAssignFnsToMap, GovSteamIEEE1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamIEEE1_factory() + { + return new GovSteamIEEE1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp new file mode 100644 index 000000000..e42a8348c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp @@ -0,0 +1,64 @@ +#ifndef GovSteamIEEE1_H +#define GovSteamIEEE1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + IEEE steam turbine governor model. Ref + */ + class GovSteamIEEE1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamIEEE1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp b/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp new file mode 100644 index 000000000..6ebbc4068 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamSGO.hpp" + +#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() {}; + + +bool assign_GovSteamSGO_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char GovSteamSGO::debugName[] = "GovSteamSGO"; +const char* GovSteamSGO::debugString() const +{ + return GovSteamSGO::debugName; +} + +void GovSteamSGO::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamSGO::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamSGO::declare() +{ + return BaseClassDefiner(GovSteamSGO::addConstructToMap, GovSteamSGO::addPrimitiveAssignFnsToMap, GovSteamSGO::addClassAssignFnsToMap, GovSteamSGO::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamSGO_factory() + { + return new GovSteamSGO; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp b/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp new file mode 100644 index 000000000..24b2aab7f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp @@ -0,0 +1,54 @@ +#ifndef GovSteamSGO_H +#define GovSteamSGO_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Simplified Steam turbine governor model. + */ + class GovSteamSGO : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamSGO_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp new file mode 100644 index 000000000..5613e7343 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GrossToNetActivePowerCurve.hpp" + +#include +#include + +#include "GeneratingUnit.hpp" + +using namespace CIMPP; + +GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {}; +GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {}; + + + + +bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass*, BaseClass*); +bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GrossToNetActivePowerCurve* 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_GrossToNetActivePowerCurves(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char GrossToNetActivePowerCurve::debugName[] = "GrossToNetActivePowerCurve"; +const char* GrossToNetActivePowerCurve::debugString() const +{ + return GrossToNetActivePowerCurve::debugName; +} + +void GrossToNetActivePowerCurve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve"), &GrossToNetActivePowerCurve_factory)); +} + +void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void GrossToNetActivePowerCurve::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve.GeneratingUnit"), &assign_GrossToNetActivePowerCurve_GeneratingUnit)); +} + +const BaseClassDefiner GrossToNetActivePowerCurve::declare() +{ + return BaseClassDefiner(GrossToNetActivePowerCurve::addConstructToMap, GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap, GrossToNetActivePowerCurve::addClassAssignFnsToMap, GrossToNetActivePowerCurve::debugName); +} + +namespace CIMPP +{ + BaseClass* GrossToNetActivePowerCurve_factory() + { + return new GrossToNetActivePowerCurve; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp new file mode 100644 index 000000000..9d1c592a5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp @@ -0,0 +1,41 @@ +#ifndef GrossToNetActivePowerCurve_H +#define GrossToNetActivePowerCurve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Curve.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class GrossToNetActivePowerCurve : public Curve + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GrossToNetActivePowerCurve_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Ground.cpp b/CGMES_2.4.13_18DEC2013/Ground.cpp new file mode 100644 index 000000000..6ecc2e31b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Ground.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Ground.hpp" + +#include +#include + + +using namespace CIMPP; + +Ground::Ground() {}; +Ground::~Ground() {}; + + + +const char Ground::debugName[] = "Ground"; +const char* Ground::debugString() const +{ + return Ground::debugName; +} + +void Ground::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Ground"), &Ground_factory)); +} + +void Ground::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Ground::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Ground::declare() +{ + return BaseClassDefiner(Ground::addConstructToMap, Ground::addPrimitiveAssignFnsToMap, Ground::addClassAssignFnsToMap, Ground::debugName); +} + +namespace CIMPP +{ + BaseClass* Ground_factory() + { + return new Ground; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Ground.hpp b/CGMES_2.4.13_18DEC2013/Ground.hpp new file mode 100644 index 000000000..884ee0ea2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Ground.hpp @@ -0,0 +1,39 @@ +#ifndef Ground_H +#define Ground_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Ground : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + Ground(); + ~Ground() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Ground_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp b/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp new file mode 100644 index 000000000..0e0e20f77 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GroundDisconnector.hpp" + +#include +#include + + +using namespace CIMPP; + +GroundDisconnector::GroundDisconnector() {}; +GroundDisconnector::~GroundDisconnector() {}; + + + +const char GroundDisconnector::debugName[] = "GroundDisconnector"; +const char* GroundDisconnector::debugString() const +{ + return GroundDisconnector::debugName; +} + +void GroundDisconnector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:GroundDisconnector"), &GroundDisconnector_factory)); +} + +void GroundDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void GroundDisconnector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GroundDisconnector::declare() +{ + return BaseClassDefiner(GroundDisconnector::addConstructToMap, GroundDisconnector::addPrimitiveAssignFnsToMap, GroundDisconnector::addClassAssignFnsToMap, GroundDisconnector::debugName); +} + +namespace CIMPP +{ + BaseClass* GroundDisconnector_factory() + { + return new GroundDisconnector; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp b/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp new file mode 100644 index 000000000..205e960d4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp @@ -0,0 +1,39 @@ +#ifndef GroundDisconnector_H +#define GroundDisconnector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. + */ + class GroundDisconnector : public Switch + { + public: + /* constructor initialising all attributes to null */ + GroundDisconnector(); + ~GroundDisconnector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GroundDisconnector_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp b/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp new file mode 100644 index 000000000..69249ef74 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GroundingImpedance.hpp" + +#include +#include + +#include "Reactance.hpp" + +using namespace CIMPP; + +GroundingImpedance::GroundingImpedance() {}; +GroundingImpedance::~GroundingImpedance() {}; + + +bool assign_GroundingImpedance_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char GroundingImpedance::debugName[] = "GroundingImpedance"; +const char* GroundingImpedance::debugString() const +{ + return GroundingImpedance::debugName; +} + +void GroundingImpedance::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GroundingImpedance::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GroundingImpedance::declare() +{ + return BaseClassDefiner(GroundingImpedance::addConstructToMap, GroundingImpedance::addPrimitiveAssignFnsToMap, GroundingImpedance::addClassAssignFnsToMap, GroundingImpedance::debugName); +} + +namespace CIMPP +{ + BaseClass* GroundingImpedance_factory() + { + return new GroundingImpedance; + } +} diff --git a/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp b/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp new file mode 100644 index 000000000..38e6733ff --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp @@ -0,0 +1,41 @@ +#ifndef GroundingImpedance_H +#define GroundingImpedance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EarthFaultCompensator.hpp" +#include "BaseClassDefiner.hpp" +#include "Reactance.hpp" + +namespace CIMPP +{ + + /* + A fixed impedance device used for grounding. + */ + class GroundingImpedance : public EarthFaultCompensator + { + public: + /* constructor initialising all attributes to null */ + GroundingImpedance(); + ~GroundingImpedance() override; + + CIMPP::Reactance x; /* Reactance of device. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GroundingImpedance_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp new file mode 100644 index 000000000..1bc81701f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroEnergyConversionKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +HydroEnergyConversionKind& HydroEnergyConversionKind::operator=(HydroEnergyConversionKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +HydroEnergyConversionKind::operator HydroEnergyConversionKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char HydroEnergyConversionKind::debugName[] = "HydroEnergyConversionKind"; +const char* HydroEnergyConversionKind::debugString() const +{ + return HydroEnergyConversionKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, HydroEnergyConversionKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = HydroEnergyConversionKind::generator; + return lop; + } + if(EnumSymbol == "pumpAndGenerator") + { + rop = HydroEnergyConversionKind::pumpAndGenerator; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const HydroEnergyConversionKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == HydroEnergyConversionKind::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == HydroEnergyConversionKind::pumpAndGenerator) + { + EnumSymbol = "pumpAndGenerator"; + } + + if (!EnumSymbol.empty()) + { + os << "HydroEnergyConversionKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp new file mode 100644 index 000000000..fb666b097 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp @@ -0,0 +1,46 @@ +#ifndef HydroEnergyConversionKind_H +#define HydroEnergyConversionKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + generator, + /** + * Able to both generate power and pump water for energy storage. + */ + pumpAndGenerator, + }; + + HydroEnergyConversionKind() : value(), initialized(false) {} + HydroEnergyConversionKind(HydroEnergyConversionKind_ENUM value) : value(value), initialized(true) {} + + HydroEnergyConversionKind& operator=(HydroEnergyConversionKind_ENUM rop); + operator HydroEnergyConversionKind_ENUM() const; + + HydroEnergyConversionKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, HydroEnergyConversionKind& rop); + friend std::ostream& operator<<(std::ostream& os, const HydroEnergyConversionKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp new file mode 100644 index 000000000..f9ce566a9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroGeneratingUnit.hpp" + +#include +#include + +#include "HydroPowerPlant.hpp" +#include "HydroEnergyConversionKind.hpp" + +using namespace CIMPP; + +HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {}; +HydroGeneratingUnit::~HydroGeneratingUnit() {}; + + + +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) +{ + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + HydroPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HydroPowerPlant != element2) + { + element->HydroPowerPlant = element2; + return assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char HydroGeneratingUnit::debugName[] = "HydroGeneratingUnit"; +const char* HydroGeneratingUnit::debugString() const +{ + return HydroGeneratingUnit::debugName; +} + +void HydroGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void HydroGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.HydroPowerPlant"), &assign_HydroGeneratingUnit_HydroPowerPlant)); +} + +const BaseClassDefiner HydroGeneratingUnit::declare() +{ + return BaseClassDefiner(HydroGeneratingUnit::addConstructToMap, HydroGeneratingUnit::addPrimitiveAssignFnsToMap, HydroGeneratingUnit::addClassAssignFnsToMap, HydroGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* HydroGeneratingUnit_factory() + { + return new HydroGeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp new file mode 100644 index 000000000..c431967f3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp @@ -0,0 +1,43 @@ +#ifndef HydroGeneratingUnit_H +#define HydroGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" +#include "HydroEnergyConversionKind.hpp" + +namespace CIMPP +{ + class HydroPowerPlant; + + /* + A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). + */ + class HydroGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HydroGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp new file mode 100644 index 000000000..4930efb66 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroPlantStorageKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +HydroPlantStorageKind& HydroPlantStorageKind::operator=(HydroPlantStorageKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +HydroPlantStorageKind::operator HydroPlantStorageKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char HydroPlantStorageKind::debugName[] = "HydroPlantStorageKind"; +const char* HydroPlantStorageKind::debugString() const +{ + return HydroPlantStorageKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, HydroPlantStorageKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "runOfRiver") + { + rop = HydroPlantStorageKind::runOfRiver; + return lop; + } + if(EnumSymbol == "pumpedStorage") + { + rop = HydroPlantStorageKind::pumpedStorage; + return lop; + } + if(EnumSymbol == "storage") + { + rop = HydroPlantStorageKind::storage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const HydroPlantStorageKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == HydroPlantStorageKind::runOfRiver) + { + EnumSymbol = "runOfRiver"; + } + if (obj.value == HydroPlantStorageKind::pumpedStorage) + { + EnumSymbol = "pumpedStorage"; + } + if (obj.value == HydroPlantStorageKind::storage) + { + EnumSymbol = "storage"; + } + + if (!EnumSymbol.empty()) + { + os << "HydroPlantStorageKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp new file mode 100644 index 000000000..ddd375110 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp @@ -0,0 +1,50 @@ +#ifndef HydroPlantStorageKind_H +#define HydroPlantStorageKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The type of hydro power plant. + */ + class HydroPlantStorageKind + { + public: + enum HydroPlantStorageKind_ENUM + { + /** + * Run of river. + */ + runOfRiver, + /** + * Pumped storage. + */ + pumpedStorage, + /** + * Storage. + */ + storage, + }; + + HydroPlantStorageKind() : value(), initialized(false) {} + HydroPlantStorageKind(HydroPlantStorageKind_ENUM value) : value(value), initialized(true) {} + + HydroPlantStorageKind& operator=(HydroPlantStorageKind_ENUM rop); + operator HydroPlantStorageKind_ENUM() const; + + HydroPlantStorageKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, HydroPlantStorageKind& rop); + friend std::ostream& operator<<(std::ostream& os, const HydroPlantStorageKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp new file mode 100644 index 000000000..d17dd63dc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroPowerPlant.hpp" + +#include +#include + +#include "HydroGeneratingUnit.hpp" +#include "HydroPump.hpp" +#include "HydroPlantStorageKind.hpp" + +using namespace CIMPP; + +HydroPowerPlant::HydroPowerPlant() {}; +HydroPowerPlant::~HydroPowerPlant() {}; + + + + +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) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + HydroGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HydroGeneratingUnits.begin(), element->HydroGeneratingUnits.end(), element2) == element->HydroGeneratingUnits.end()) + { + element->HydroGeneratingUnits.push_back(element2); + return assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_HydroPump_HydroPowerPlant(BaseClass*, BaseClass*); +bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HydroPumps.begin(), element->HydroPumps.end(), element2) == element->HydroPumps.end()) + { + element->HydroPumps.push_back(element2); + return assign_HydroPump_HydroPowerPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char HydroPowerPlant::debugName[] = "HydroPowerPlant"; +const char* HydroPowerPlant::debugString() const +{ + return HydroPowerPlant::debugName; +} + +void HydroPowerPlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner HydroPowerPlant::declare() +{ + return BaseClassDefiner(HydroPowerPlant::addConstructToMap, HydroPowerPlant::addPrimitiveAssignFnsToMap, HydroPowerPlant::addClassAssignFnsToMap, HydroPowerPlant::debugName); +} + +namespace CIMPP +{ + BaseClass* HydroPowerPlant_factory() + { + return new HydroPowerPlant; + } +} diff --git a/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp new file mode 100644 index 000000000..40f735bc6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp @@ -0,0 +1,45 @@ +#ifndef HydroPowerPlant_H +#define HydroPowerPlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "HydroPlantStorageKind.hpp" + +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. + */ + class HydroPowerPlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HydroPowerPlant_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/HydroPump.cpp b/CGMES_2.4.13_18DEC2013/HydroPump.cpp new file mode 100644 index 000000000..0e80d09dc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroPump.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroPump.hpp" + +#include +#include + +#include "HydroPowerPlant.hpp" +#include "RotatingMachine.hpp" + +using namespace CIMPP; + +HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {}; +HydroPump::~HydroPump() {}; + + + + + +bool assign_HydroPowerPlant_HydroPumps(BaseClass*, BaseClass*); +bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + HydroPump* element = dynamic_cast(BaseClass_ptr1); + HydroPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HydroPowerPlant != element2) + { + element->HydroPowerPlant = element2; + return assign_HydroPowerPlant_HydroPumps(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RotatingMachine_HydroPump(BaseClass*, BaseClass*); +bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + HydroPump* element = dynamic_cast(BaseClass_ptr1); + RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RotatingMachine != element2) + { + element->RotatingMachine = element2; + return assign_RotatingMachine_HydroPump(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char HydroPump::debugName[] = "HydroPump"; +const char* HydroPump::debugString() const +{ + return HydroPump::debugName; +} + +void HydroPump::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:HydroPump"), &HydroPump_factory)); +} + +void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void HydroPump::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner HydroPump::declare() +{ + return BaseClassDefiner(HydroPump::addConstructToMap, HydroPump::addPrimitiveAssignFnsToMap, HydroPump::addClassAssignFnsToMap, HydroPump::debugName); +} + +namespace CIMPP +{ + BaseClass* HydroPump_factory() + { + return new HydroPump; + } +} diff --git a/CGMES_2.4.13_18DEC2013/HydroPump.hpp b/CGMES_2.4.13_18DEC2013/HydroPump.hpp new file mode 100644 index 000000000..54ab372d8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/HydroPump.hpp @@ -0,0 +1,43 @@ +#ifndef HydroPump_H +#define HydroPump_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class HydroPowerPlant; + class RotatingMachine; + + /* + A synchronous motor-driven pump, typically associated with a pumped storage plant. + */ + class HydroPump : public Equipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HydroPump_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/IEC61970.hpp b/CGMES_2.4.13_18DEC2013/IEC61970.hpp new file mode 100644 index 000000000..32e9abca4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/IEC61970.hpp @@ -0,0 +1,404 @@ +#ifndef IEC61970_H +#define IEC61970_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include "ACDCConverter.hpp" +#include "ACDCConverterDCTerminal.hpp" +#include "ACDCTerminal.hpp" +#include "ACLineSegment.hpp" +#include "Accumulator.hpp" +#include "AccumulatorLimit.hpp" +#include "AccumulatorLimitSet.hpp" +#include "AccumulatorReset.hpp" +#include "AccumulatorValue.hpp" +#include "ActivePowerLimit.hpp" +#include "Analog.hpp" +#include "AnalogControl.hpp" +#include "AnalogLimit.hpp" +#include "AnalogLimitSet.hpp" +#include "AnalogValue.hpp" +#include "ApparentPowerLimit.hpp" +#include "AsynchronousMachine.hpp" +#include "AsynchronousMachineDynamics.hpp" +#include "AsynchronousMachineEquivalentCircuit.hpp" +#include "AsynchronousMachineTimeConstantReactance.hpp" +#include "AsynchronousMachineUserDefined.hpp" +#include "BaseVoltage.hpp" +#include "BasicIntervalSchedule.hpp" +#include "Bay.hpp" +#include "Breaker.hpp" +#include "BusNameMarker.hpp" +#include "BusbarSection.hpp" +#include "Command.hpp" +#include "ConductingEquipment.hpp" +#include "Conductor.hpp" +#include "ConformLoad.hpp" +#include "ConformLoadGroup.hpp" +#include "ConformLoadSchedule.hpp" +#include "ConnectivityNode.hpp" +#include "ConnectivityNodeContainer.hpp" +#include "Connector.hpp" +#include "Control.hpp" +#include "ControlArea.hpp" +#include "ControlAreaGeneratingUnit.hpp" +#include "CoordinateSystem.hpp" +#include "CsConverter.hpp" +#include "CurrentLimit.hpp" +#include "Curve.hpp" +#include "CurveData.hpp" +#include "DCBaseTerminal.hpp" +#include "DCBreaker.hpp" +#include "DCBusbar.hpp" +#include "DCChopper.hpp" +#include "DCConductingEquipment.hpp" +#include "DCConverterUnit.hpp" +#include "DCDisconnector.hpp" +#include "DCEquipmentContainer.hpp" +#include "DCGround.hpp" +#include "DCLine.hpp" +#include "DCLineSegment.hpp" +#include "DCNode.hpp" +#include "DCSeriesDevice.hpp" +#include "DCShunt.hpp" +#include "DCSwitch.hpp" +#include "DCTerminal.hpp" +#include "DCTopologicalIsland.hpp" +#include "DCTopologicalNode.hpp" +#include "DayType.hpp" +#include "Diagram.hpp" +#include "DiagramLayoutVersion.hpp" +#include "DiagramObject.hpp" +#include "DiagramObjectGluePoint.hpp" +#include "DiagramObjectPoint.hpp" +#include "DiagramObjectStyle.hpp" +#include "DiagramStyle.hpp" +#include "DiscExcContIEEEDEC1A.hpp" +#include "DiscExcContIEEEDEC2A.hpp" +#include "DiscExcContIEEEDEC3A.hpp" +#include "Disconnector.hpp" +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "DiscontinuousExcitationControlUserDefined.hpp" +#include "Discrete.hpp" +#include "DiscreteValue.hpp" +#include "DynamicsFunctionBlock.hpp" +#include "DynamicsVersion.hpp" +#include "EarthFaultCompensator.hpp" +#include "EnergyArea.hpp" +#include "EnergyConsumer.hpp" +#include "EnergySchedulingType.hpp" +#include "EnergySource.hpp" +#include "Equipment.hpp" +#include "EquipmentBoundaryVersion.hpp" +#include "EquipmentContainer.hpp" +#include "EquipmentVersion.hpp" +#include "EquivalentBranch.hpp" +#include "EquivalentEquipment.hpp" +#include "EquivalentInjection.hpp" +#include "EquivalentNetwork.hpp" +#include "EquivalentShunt.hpp" +#include "ExcAC1A.hpp" +#include "ExcAC2A.hpp" +#include "ExcAC3A.hpp" +#include "ExcAC4A.hpp" +#include "ExcAC5A.hpp" +#include "ExcAC6A.hpp" +#include "ExcAC8B.hpp" +#include "ExcANS.hpp" +#include "ExcAVR1.hpp" +#include "ExcAVR2.hpp" +#include "ExcAVR3.hpp" +#include "ExcAVR4.hpp" +#include "ExcAVR5.hpp" +#include "ExcAVR7.hpp" +#include "ExcBBC.hpp" +#include "ExcCZ.hpp" +#include "ExcDC1A.hpp" +#include "ExcDC2A.hpp" +#include "ExcDC3A.hpp" +#include "ExcDC3A1.hpp" +#include "ExcELIN1.hpp" +#include "ExcELIN2.hpp" +#include "ExcHU.hpp" +#include "ExcIEEEAC1A.hpp" +#include "ExcIEEEAC2A.hpp" +#include "ExcIEEEAC3A.hpp" +#include "ExcIEEEAC4A.hpp" +#include "ExcIEEEAC5A.hpp" +#include "ExcIEEEAC6A.hpp" +#include "ExcIEEEAC7B.hpp" +#include "ExcIEEEAC8B.hpp" +#include "ExcIEEEDC1A.hpp" +#include "ExcIEEEDC2A.hpp" +#include "ExcIEEEDC3A.hpp" +#include "ExcIEEEDC4B.hpp" +#include "ExcIEEEST1A.hpp" +#include "ExcIEEEST2A.hpp" +#include "ExcIEEEST3A.hpp" +#include "ExcIEEEST4B.hpp" +#include "ExcIEEEST5B.hpp" +#include "ExcIEEEST6B.hpp" +#include "ExcIEEEST7B.hpp" +#include "ExcOEX3T.hpp" +#include "ExcPIC.hpp" +#include "ExcREXS.hpp" +#include "ExcSCRX.hpp" +#include "ExcSEXS.hpp" +#include "ExcSK.hpp" +#include "ExcST1A.hpp" +#include "ExcST2A.hpp" +#include "ExcST3A.hpp" +#include "ExcST4B.hpp" +#include "ExcST6B.hpp" +#include "ExcST7B.hpp" +#include "ExcitationSystemDynamics.hpp" +#include "ExcitationSystemUserDefined.hpp" +#include "ExternalNetworkInjection.hpp" +#include "FossilFuel.hpp" +#include "GenICompensationForGenJ.hpp" +#include "GeneratingUnit.hpp" +#include "GeographicalLocationVersion.hpp" +#include "GeographicalRegion.hpp" +#include "GovCT1.hpp" +#include "GovCT2.hpp" +#include "GovGAST.hpp" +#include "GovGAST1.hpp" +#include "GovGAST2.hpp" +#include "GovGAST3.hpp" +#include "GovGAST4.hpp" +#include "GovGASTWD.hpp" +#include "GovHydro1.hpp" +#include "GovHydro2.hpp" +#include "GovHydro3.hpp" +#include "GovHydro4.hpp" +#include "GovHydroDD.hpp" +#include "GovHydroFrancis.hpp" +#include "GovHydroIEEE0.hpp" +#include "GovHydroIEEE2.hpp" +#include "GovHydroPID.hpp" +#include "GovHydroPID2.hpp" +#include "GovHydroPelton.hpp" +#include "GovHydroR.hpp" +#include "GovHydroWEH.hpp" +#include "GovHydroWPID.hpp" +#include "GovSteam0.hpp" +#include "GovSteam1.hpp" +#include "GovSteam2.hpp" +#include "GovSteamCC.hpp" +#include "GovSteamEU.hpp" +#include "GovSteamFV2.hpp" +#include "GovSteamFV3.hpp" +#include "GovSteamFV4.hpp" +#include "GovSteamIEEE1.hpp" +#include "GovSteamSGO.hpp" +#include "GrossToNetActivePowerCurve.hpp" +#include "Ground.hpp" +#include "GroundDisconnector.hpp" +#include "GroundingImpedance.hpp" +#include "HydroGeneratingUnit.hpp" +#include "HydroPowerPlant.hpp" +#include "HydroPump.hpp" +#include "IdentifiedObject.hpp" +#include "Junction.hpp" +#include "Limit.hpp" +#include "LimitSet.hpp" +#include "Line.hpp" +#include "LinearShuntCompensator.hpp" +#include "LoadAggregate.hpp" +#include "LoadArea.hpp" +#include "LoadBreakSwitch.hpp" +#include "LoadComposite.hpp" +#include "LoadDynamics.hpp" +#include "LoadGenericNonLinear.hpp" +#include "LoadGroup.hpp" +#include "LoadMotor.hpp" +#include "LoadResponseCharacteristic.hpp" +#include "LoadStatic.hpp" +#include "LoadUserDefined.hpp" +#include "Location.hpp" +#include "Measurement.hpp" +#include "MeasurementValue.hpp" +#include "MeasurementValueQuality.hpp" +#include "MeasurementValueSource.hpp" +#include "MechLoad1.hpp" +#include "MechanicalLoadDynamics.hpp" +#include "MechanicalLoadUserDefined.hpp" +#include "MutualCoupling.hpp" +#include "NonConformLoad.hpp" +#include "NonConformLoadGroup.hpp" +#include "NonConformLoadSchedule.hpp" +#include "NonlinearShuntCompensator.hpp" +#include "NonlinearShuntCompensatorPoint.hpp" +#include "NuclearGeneratingUnit.hpp" +#include "OperationalLimit.hpp" +#include "OperationalLimitSet.hpp" +#include "OperationalLimitType.hpp" +#include "OverexcLim2.hpp" +#include "OverexcLimIEEE.hpp" +#include "OverexcLimX1.hpp" +#include "OverexcLimX2.hpp" +#include "OverexcitationLimiterDynamics.hpp" +#include "OverexcitationLimiterUserDefined.hpp" +#include "PFVArControllerType1Dynamics.hpp" +#include "PFVArControllerType1UserDefined.hpp" +#include "PFVArControllerType2Dynamics.hpp" +#include "PFVArControllerType2UserDefined.hpp" +#include "PFVArType1IEEEPFController.hpp" +#include "PFVArType1IEEEVArController.hpp" +#include "PFVArType2Common1.hpp" +#include "PFVArType2IEEEPFController.hpp" +#include "PFVArType2IEEEVArController.hpp" +#include "PerLengthDCLineParameter.hpp" +#include "PetersenCoil.hpp" +#include "PhaseTapChanger.hpp" +#include "PhaseTapChangerAsymmetrical.hpp" +#include "PhaseTapChangerLinear.hpp" +#include "PhaseTapChangerNonLinear.hpp" +#include "PhaseTapChangerSymmetrical.hpp" +#include "PhaseTapChangerTable.hpp" +#include "PhaseTapChangerTablePoint.hpp" +#include "PhaseTapChangerTabular.hpp" +#include "PositionPoint.hpp" +#include "PowerSystemResource.hpp" +#include "PowerSystemStabilizerDynamics.hpp" +#include "PowerSystemStabilizerUserDefined.hpp" +#include "PowerTransformer.hpp" +#include "PowerTransformerEnd.hpp" +#include "ProprietaryParameterDynamics.hpp" +#include "ProtectedSwitch.hpp" +#include "Pss1.hpp" +#include "Pss1A.hpp" +#include "Pss2B.hpp" +#include "Pss2ST.hpp" +#include "Pss5.hpp" +#include "PssELIN2.hpp" +#include "PssIEEE1A.hpp" +#include "PssIEEE2B.hpp" +#include "PssIEEE3B.hpp" +#include "PssIEEE4B.hpp" +#include "PssPTIST1.hpp" +#include "PssPTIST3.hpp" +#include "PssSB4.hpp" +#include "PssSH.hpp" +#include "PssSK.hpp" +#include "PssWECC.hpp" +#include "Quality61850.hpp" +#include "RaiseLowerCommand.hpp" +#include "RatioTapChanger.hpp" +#include "RatioTapChangerTable.hpp" +#include "RatioTapChangerTablePoint.hpp" +#include "ReactiveCapabilityCurve.hpp" +#include "RegularIntervalSchedule.hpp" +#include "RegularTimePoint.hpp" +#include "RegulatingCondEq.hpp" +#include "RegulatingControl.hpp" +#include "RegulationSchedule.hpp" +#include "RemoteInputSignal.hpp" +#include "ReportingGroup.hpp" +#include "RotatingMachine.hpp" +#include "RotatingMachineDynamics.hpp" +#include "Season.hpp" +#include "SeasonDayTypeSchedule.hpp" +#include "SeriesCompensator.hpp" +#include "SetPoint.hpp" +#include "ShuntCompensator.hpp" +#include "SolarGeneratingUnit.hpp" +#include "StateVariablesVersion.hpp" +#include "StaticVarCompensator.hpp" +#include "StationSupply.hpp" +#include "SteadyStateHypothesisVersion.hpp" +#include "StringMeasurement.hpp" +#include "StringMeasurementValue.hpp" +#include "SubGeographicalRegion.hpp" +#include "SubLoadArea.hpp" +#include "Substation.hpp" +#include "SvInjection.hpp" +#include "SvPowerFlow.hpp" +#include "SvShuntCompensatorSections.hpp" +#include "SvStatus.hpp" +#include "SvTapStep.hpp" +#include "SvVoltage.hpp" +#include "Switch.hpp" +#include "SwitchSchedule.hpp" +#include "SynchronousMachine.hpp" +#include "SynchronousMachineDetailed.hpp" +#include "SynchronousMachineDynamics.hpp" +#include "SynchronousMachineEquivalentCircuit.hpp" +#include "SynchronousMachineSimplified.hpp" +#include "SynchronousMachineTimeConstantReactance.hpp" +#include "SynchronousMachineUserDefined.hpp" +#include "TapChanger.hpp" +#include "TapChangerControl.hpp" +#include "TapChangerTablePoint.hpp" +#include "TapSchedule.hpp" +#include "Terminal.hpp" +#include "TextDiagramObject.hpp" +#include "ThermalGeneratingUnit.hpp" +#include "TieFlow.hpp" +#include "TopologicalIsland.hpp" +#include "TopologicalNode.hpp" +#include "TopologyBoundaryVersion.hpp" +#include "TopologyVersion.hpp" +#include "TransformerEnd.hpp" +#include "TurbLCFB1.hpp" +#include "TurbineGovernorDynamics.hpp" +#include "TurbineGovernorUserDefined.hpp" +#include "TurbineLoadControllerDynamics.hpp" +#include "TurbineLoadControllerUserDefined.hpp" +#include "UnderexcLim2Simplified.hpp" +#include "UnderexcLimIEEE1.hpp" +#include "UnderexcLimIEEE2.hpp" +#include "UnderexcLimX1.hpp" +#include "UnderexcLimX2.hpp" +#include "UnderexcitationLimiterDynamics.hpp" +#include "UnderexcitationLimiterUserDefined.hpp" +#include "VAdjIEEE.hpp" +#include "VCompIEEEType1.hpp" +#include "VCompIEEEType2.hpp" +#include "ValueAliasSet.hpp" +#include "ValueToAlias.hpp" +#include "VisibilityLayer.hpp" +#include "VoltageAdjusterDynamics.hpp" +#include "VoltageAdjusterUserDefined.hpp" +#include "VoltageCompensatorDynamics.hpp" +#include "VoltageCompensatorUserDefined.hpp" +#include "VoltageLevel.hpp" +#include "VoltageLimit.hpp" +#include "VsCapabilityCurve.hpp" +#include "VsConverter.hpp" +#include "WindAeroConstIEC.hpp" +#include "WindAeroLinearIEC.hpp" +#include "WindContCurrLimIEC.hpp" +#include "WindContPType3IEC.hpp" +#include "WindContPType4aIEC.hpp" +#include "WindContPType4bIEC.hpp" +#include "WindContPitchAngleIEC.hpp" +#include "WindContQIEC.hpp" +#include "WindContRotorRIEC.hpp" +#include "WindDynamicsLookupTable.hpp" +#include "WindGenTurbineType1IEC.hpp" +#include "WindGenTurbineType2IEC.hpp" +#include "WindGenTurbineType3IEC.hpp" +#include "WindGenTurbineType3aIEC.hpp" +#include "WindGenTurbineType3bIEC.hpp" +#include "WindGenType4IEC.hpp" +#include "WindGeneratingUnit.hpp" +#include "WindMechIEC.hpp" +#include "WindPitchContEmulIEC.hpp" +#include "WindPlantDynamics.hpp" +#include "WindPlantFreqPcontrolIEC.hpp" +#include "WindPlantIEC.hpp" +#include "WindPlantReactiveControlIEC.hpp" +#include "WindPlantUserDefined.hpp" +#include "WindProtectionIEC.hpp" +#include "WindTurbineType1or2Dynamics.hpp" +#include "WindTurbineType1or2IEC.hpp" +#include "WindTurbineType3or4Dynamics.hpp" +#include "WindTurbineType3or4IEC.hpp" +#include "WindTurbineType4aIEC.hpp" +#include "WindTurbineType4bIEC.hpp" +#include "WindType1or2UserDefined.hpp" +#include "WindType3or4UserDefined.hpp" +#include "UnknownType.hpp" +#endif \ No newline at end of file diff --git a/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp b/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp new file mode 100644 index 000000000..764198002 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "IdentifiedObject.hpp" + +#include +#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() {}; + + + +bool assign_IdentifiedObject_description(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->description = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->energyIdentCodeEic = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_mRID(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->mRID = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->name = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); +bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + +const char IdentifiedObject::debugName[] = "IdentifiedObject"; +const char* IdentifiedObject::debugString() const +{ + return IdentifiedObject::debugName; +} + +void IdentifiedObject::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void IdentifiedObject::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.DiagramObjects"), &assign_IdentifiedObject_DiagramObjects)); +} + +const BaseClassDefiner IdentifiedObject::declare() +{ + return BaseClassDefiner(IdentifiedObject::addConstructToMap, IdentifiedObject::addPrimitiveAssignFnsToMap, IdentifiedObject::addClassAssignFnsToMap, IdentifiedObject::debugName); +} + +namespace CIMPP +{ + BaseClass* IdentifiedObject_factory() + { + return new IdentifiedObject; + } +} diff --git a/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp b/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp new file mode 100644 index 000000000..b74ad9626 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp @@ -0,0 +1,47 @@ +#ifndef IdentifiedObject_H +#define IdentifiedObject_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class DiagramObject; + + /* + This is a root class to provide common identification for all classes needing identification and naming attributes. + */ + class IdentifiedObject : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* IdentifiedObject_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp b/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp new file mode 100644 index 000000000..06c6513c2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "IfdBaseKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +IfdBaseKind& IfdBaseKind::operator=(IfdBaseKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +IfdBaseKind::operator IfdBaseKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char IfdBaseKind::debugName[] = "IfdBaseKind"; +const char* IfdBaseKind::debugString() const +{ + return IfdBaseKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, IfdBaseKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "IfdBaseKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "ifag") + { + rop = IfdBaseKind::ifag; + return lop; + } + if(EnumSymbol == "ifnl") + { + rop = IfdBaseKind::ifnl; + return lop; + } + if(EnumSymbol == "iffl") + { + rop = IfdBaseKind::iffl; + return lop; + } + if(EnumSymbol == "other") + { + rop = IfdBaseKind::other; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const IfdBaseKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == IfdBaseKind::ifag) + { + EnumSymbol = "ifag"; + } + if (obj.value == IfdBaseKind::ifnl) + { + EnumSymbol = "ifnl"; + } + if (obj.value == IfdBaseKind::iffl) + { + EnumSymbol = "iffl"; + } + if (obj.value == IfdBaseKind::other) + { + EnumSymbol = "other"; + } + + if (!EnumSymbol.empty()) + { + os << "IfdBaseKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp b/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp new file mode 100644 index 000000000..6938195f3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp @@ -0,0 +1,54 @@ +#ifndef IfdBaseKind_H +#define IfdBaseKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + ifag, + /** + * 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. + */ + iffl, + /** + * Free mode. ifdBaseValue is defined by the user in this mode. + */ + other, + }; + + IfdBaseKind() : value(), initialized(false) {} + IfdBaseKind(IfdBaseKind_ENUM value) : value(value), initialized(true) {} + + IfdBaseKind& operator=(IfdBaseKind_ENUM rop); + operator IfdBaseKind_ENUM() const; + + IfdBaseKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, IfdBaseKind& rop); + friend std::ostream& operator<<(std::ostream& os, const IfdBaseKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Inductance.cpp b/CGMES_2.4.13_18DEC2013/Inductance.cpp new file mode 100644 index 000000000..8a13c71fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Inductance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Inductance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Inductance& Inductance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Inductance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Inductance::debugName[] = "Inductance"; +const char* Inductance::debugString() const +{ + return Inductance::debugName; +} + +Inductance& Inductance::operator+=(const Inductance& rhs) +{ + value += rhs.value; + return *this; +} + +Inductance& Inductance::operator-=(const Inductance& rhs) +{ + value -= rhs.value; + return *this; +} + +Inductance& Inductance::operator*=(const Inductance& rhs) +{ + value *= rhs.value; + return *this; +} + +Inductance& Inductance::operator/=(const Inductance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Inductance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Inductance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Inductance.hpp b/CGMES_2.4.13_18DEC2013/Inductance.hpp new file mode 100644 index 000000000..9d5005915 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Inductance.hpp @@ -0,0 +1,39 @@ +#ifndef Inductance_H +#define Inductance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Inductive part of reactance (imaginary part of impedance), at rated frequency. + */ + class Inductance + { + public: + Inductance() : value(0.0), initialized(false) {} + Inductance(long double value) : value(value), initialized(true) {} + + Inductance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Inductance& operator+=(const Inductance& rhs); + Inductance& operator-=(const Inductance& rhs); + Inductance& operator*=(const Inductance& rhs); + Inductance& operator/=(const Inductance& rhs); + + friend std::istream& operator>>(std::istream& lop, Inductance& rop); + friend std::ostream& operator<<(std::ostream& os, const Inductance& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/InductancePerLength.cpp b/CGMES_2.4.13_18DEC2013/InductancePerLength.cpp new file mode 100644 index 000000000..b655d1e70 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/InductancePerLength.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "InductancePerLength.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +InductancePerLength& InductancePerLength::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +InductancePerLength::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char InductancePerLength::debugName[] = "InductancePerLength"; +const char* InductancePerLength::debugString() const +{ + return InductancePerLength::debugName; +} + +InductancePerLength& InductancePerLength::operator+=(const InductancePerLength& rhs) +{ + value += rhs.value; + return *this; +} + +InductancePerLength& InductancePerLength::operator-=(const InductancePerLength& rhs) +{ + value -= rhs.value; + return *this; +} + +InductancePerLength& InductancePerLength::operator*=(const InductancePerLength& rhs) +{ + value *= rhs.value; + return *this; +} + +InductancePerLength& InductancePerLength::operator/=(const InductancePerLength& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, InductancePerLength& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const InductancePerLength& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp b/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp new file mode 100644 index 000000000..8ede31f20 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp @@ -0,0 +1,39 @@ +#ifndef InductancePerLength_H +#define InductancePerLength_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Inductance per unit of length. + */ + class InductancePerLength + { + public: + InductancePerLength() : value(0.0), initialized(false) {} + InductancePerLength(long double value) : value(value), initialized(true) {} + + InductancePerLength& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + InductancePerLength& operator+=(const InductancePerLength& rhs); + InductancePerLength& operator-=(const InductancePerLength& rhs); + InductancePerLength& operator*=(const InductancePerLength& rhs); + InductancePerLength& operator/=(const InductancePerLength& rhs); + + friend std::istream& operator>>(std::istream& lop, InductancePerLength& rop); + friend std::ostream& operator<<(std::ostream& os, const InductancePerLength& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp b/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp new file mode 100644 index 000000000..fc207f2f1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp @@ -0,0 +1,162 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "InputSignalKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +InputSignalKind& InputSignalKind::operator=(InputSignalKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +InputSignalKind::operator InputSignalKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char InputSignalKind::debugName[] = "InputSignalKind"; +const char* InputSignalKind::debugString() const +{ + return InputSignalKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, InputSignalKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "InputSignalKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "rotorSpeed") + { + rop = InputSignalKind::rotorSpeed; + return lop; + } + if(EnumSymbol == "rotorAngularFrequencyDeviation") + { + rop = InputSignalKind::rotorAngularFrequencyDeviation; + return lop; + } + if(EnumSymbol == "busFrequency") + { + rop = InputSignalKind::busFrequency; + return lop; + } + if(EnumSymbol == "busFrequencyDeviation") + { + rop = InputSignalKind::busFrequencyDeviation; + return lop; + } + if(EnumSymbol == "generatorElectricalPower") + { + rop = InputSignalKind::generatorElectricalPower; + return lop; + } + if(EnumSymbol == "generatorAcceleratingPower") + { + rop = InputSignalKind::generatorAcceleratingPower; + return lop; + } + if(EnumSymbol == "busVoltage") + { + rop = InputSignalKind::busVoltage; + return lop; + } + if(EnumSymbol == "busVoltageDerivative") + { + rop = InputSignalKind::busVoltageDerivative; + return lop; + } + if(EnumSymbol == "branchCurrent") + { + rop = InputSignalKind::branchCurrent; + return lop; + } + if(EnumSymbol == "fieldCurrent") + { + rop = InputSignalKind::fieldCurrent; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const InputSignalKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == InputSignalKind::rotorSpeed) + { + EnumSymbol = "rotorSpeed"; + } + if (obj.value == InputSignalKind::rotorAngularFrequencyDeviation) + { + EnumSymbol = "rotorAngularFrequencyDeviation"; + } + if (obj.value == InputSignalKind::busFrequency) + { + EnumSymbol = "busFrequency"; + } + if (obj.value == InputSignalKind::busFrequencyDeviation) + { + EnumSymbol = "busFrequencyDeviation"; + } + if (obj.value == InputSignalKind::generatorElectricalPower) + { + EnumSymbol = "generatorElectricalPower"; + } + if (obj.value == InputSignalKind::generatorAcceleratingPower) + { + EnumSymbol = "generatorAcceleratingPower"; + } + if (obj.value == InputSignalKind::busVoltage) + { + EnumSymbol = "busVoltage"; + } + if (obj.value == InputSignalKind::busVoltageDerivative) + { + EnumSymbol = "busVoltageDerivative"; + } + if (obj.value == InputSignalKind::branchCurrent) + { + EnumSymbol = "branchCurrent"; + } + if (obj.value == InputSignalKind::fieldCurrent) + { + EnumSymbol = "fieldCurrent"; + } + + if (!EnumSymbol.empty()) + { + os << "InputSignalKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp b/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp new file mode 100644 index 000000000..98b85d1f8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp @@ -0,0 +1,78 @@ +#ifndef InputSignalKind_H +#define InputSignalKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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). + */ + rotorSpeed, + /** + * Input signal is rotor or shaft angular frequency deviation. + */ + rotorAngularFrequencyDeviation, + /** + * Input signal is bus voltage fr + */ + busFrequency, + /** + * Input signal is deviation of bus voltage frequ + */ + busFrequencyDeviation, + /** + * Input signal is generator electrical power on rated S. + */ + generatorElectricalPower, + /** + * Input signal is generating accelerating power. + */ + generatorAcceleratingPower, + /** + * Input signal + */ + busVoltage, + /** + * Input signal is derivative of bus voltag + */ + busVoltageDerivative, + /** + * Input signal is amplitude of remote branch current. + */ + branchCurrent, + /** + * Input signal is generator field current. + */ + fieldCurrent, + }; + + InputSignalKind() : value(), initialized(false) {} + InputSignalKind(InputSignalKind_ENUM value) : value(value), initialized(true) {} + + InputSignalKind& operator=(InputSignalKind_ENUM rop); + operator InputSignalKind_ENUM() const; + + InputSignalKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, InputSignalKind& rop); + friend std::ostream& operator<<(std::ostream& os, const InputSignalKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Junction.cpp b/CGMES_2.4.13_18DEC2013/Junction.cpp new file mode 100644 index 000000000..0ffba7325 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Junction.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Junction.hpp" + +#include +#include + + +using namespace CIMPP; + +Junction::Junction() {}; +Junction::~Junction() {}; + + + +const char Junction::debugName[] = "Junction"; +const char* Junction::debugString() const +{ + return Junction::debugName; +} + +void Junction::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Junction"), &Junction_factory)); +} + +void Junction::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Junction::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Junction::declare() +{ + return BaseClassDefiner(Junction::addConstructToMap, Junction::addPrimitiveAssignFnsToMap, Junction::addClassAssignFnsToMap, Junction::debugName); +} + +namespace CIMPP +{ + BaseClass* Junction_factory() + { + return new Junction; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Junction.hpp b/CGMES_2.4.13_18DEC2013/Junction.hpp new file mode 100644 index 000000000..bf1c7f41e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Junction.hpp @@ -0,0 +1,39 @@ +#ifndef Junction_H +#define Junction_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Connector.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A point where one or more conducting equipments are connected with zero resistance. + */ + class Junction : public Connector + { + public: + /* constructor initialising all attributes to null */ + Junction(); + ~Junction() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Junction_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Length.cpp b/CGMES_2.4.13_18DEC2013/Length.cpp new file mode 100644 index 000000000..2c089f847 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Length.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Length.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Length& Length::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Length::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Length::debugName[] = "Length"; +const char* Length::debugString() const +{ + return Length::debugName; +} + +Length& Length::operator+=(const Length& rhs) +{ + value += rhs.value; + return *this; +} + +Length& Length::operator-=(const Length& rhs) +{ + value -= rhs.value; + return *this; +} + +Length& Length::operator*=(const Length& rhs) +{ + value *= rhs.value; + return *this; +} + +Length& Length::operator/=(const Length& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Length& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Length& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Length.hpp b/CGMES_2.4.13_18DEC2013/Length.hpp new file mode 100644 index 000000000..f3f5c9403 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Length.hpp @@ -0,0 +1,39 @@ +#ifndef Length_H +#define Length_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Unit of length. Never negative. + */ + class Length + { + public: + Length() : value(0.0), initialized(false) {} + Length(long double value) : value(value), initialized(true) {} + + Length& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Length& operator+=(const Length& rhs); + Length& operator-=(const Length& rhs); + Length& operator*=(const Length& rhs); + Length& operator/=(const Length& rhs); + + friend std::istream& operator>>(std::istream& lop, Length& rop); + friend std::ostream& operator<<(std::ostream& os, const Length& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Limit.cpp b/CGMES_2.4.13_18DEC2013/Limit.cpp new file mode 100644 index 000000000..487b4c6c8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Limit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Limit.hpp" + +#include +#include + + +using namespace CIMPP; + +Limit::Limit() {}; +Limit::~Limit() {}; + + + +const char Limit::debugName[] = "Limit"; +const char* Limit::debugString() const +{ + return Limit::debugName; +} + +void Limit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Limit"), &Limit_factory)); +} + +void Limit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Limit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Limit::declare() +{ + return BaseClassDefiner(Limit::addConstructToMap, Limit::addPrimitiveAssignFnsToMap, Limit::addClassAssignFnsToMap, Limit::debugName); +} + +namespace CIMPP +{ + BaseClass* Limit_factory() + { + return new Limit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Limit.hpp b/CGMES_2.4.13_18DEC2013/Limit.hpp new file mode 100644 index 000000000..47dda3684 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Limit.hpp @@ -0,0 +1,39 @@ +#ifndef Limit_H +#define Limit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Limit : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + Limit(); + ~Limit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Limit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LimitSet.cpp b/CGMES_2.4.13_18DEC2013/LimitSet.cpp new file mode 100644 index 000000000..7aaa47d29 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LimitSet.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LimitSet.hpp" + +#include +#include + + +using namespace CIMPP; + +LimitSet::LimitSet() {}; +LimitSet::~LimitSet() {}; + + + +const char LimitSet::debugName[] = "LimitSet"; +const char* LimitSet::debugString() const +{ + return LimitSet::debugName; +} + +void LimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LimitSet"), &LimitSet_factory)); +} + +void LimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LimitSet::declare() +{ + return BaseClassDefiner(LimitSet::addConstructToMap, LimitSet::addPrimitiveAssignFnsToMap, LimitSet::addClassAssignFnsToMap, LimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* LimitSet_factory() + { + return new LimitSet; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LimitSet.hpp b/CGMES_2.4.13_18DEC2013/LimitSet.hpp new file mode 100644 index 000000000..a69502880 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LimitSet.hpp @@ -0,0 +1,39 @@ +#ifndef LimitSet_H +#define LimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LimitSet : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + LimitSet(); + ~LimitSet() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LimitSet_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp b/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp new file mode 100644 index 000000000..d6bf93a42 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp @@ -0,0 +1,135 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LimitTypeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +LimitTypeKind& LimitTypeKind::operator=(LimitTypeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +LimitTypeKind::operator LimitTypeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char LimitTypeKind::debugName[] = "LimitTypeKind"; +const char* LimitTypeKind::debugString() const +{ + return LimitTypeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, LimitTypeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "LimitTypeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "patl") + { + rop = LimitTypeKind::patl; + return lop; + } + if(EnumSymbol == "patlt") + { + rop = LimitTypeKind::patlt; + return lop; + } + if(EnumSymbol == "tatl") + { + rop = LimitTypeKind::tatl; + return lop; + } + if(EnumSymbol == "tc") + { + rop = LimitTypeKind::tc; + return lop; + } + if(EnumSymbol == "tct") + { + rop = LimitTypeKind::tct; + return lop; + } + if(EnumSymbol == "highVoltage") + { + rop = LimitTypeKind::highVoltage; + return lop; + } + if(EnumSymbol == "lowVoltage") + { + rop = LimitTypeKind::lowVoltage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const LimitTypeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == LimitTypeKind::patl) + { + EnumSymbol = "patl"; + } + if (obj.value == LimitTypeKind::patlt) + { + EnumSymbol = "patlt"; + } + if (obj.value == LimitTypeKind::tatl) + { + EnumSymbol = "tatl"; + } + if (obj.value == LimitTypeKind::tc) + { + EnumSymbol = "tc"; + } + if (obj.value == LimitTypeKind::tct) + { + EnumSymbol = "tct"; + } + if (obj.value == LimitTypeKind::highVoltage) + { + EnumSymbol = "highVoltage"; + } + if (obj.value == LimitTypeKind::lowVoltage) + { + EnumSymbol = "lowVoltage"; + } + + if (!EnumSymbol.empty()) + { + os << "LimitTypeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp b/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp new file mode 100644 index 000000000..c39c34dc4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp @@ -0,0 +1,66 @@ +#ifndef LimitTypeKind_H +#define LimitTypeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + 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. + */ + tc, + /** + * 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. + */ + 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. + */ + lowVoltage, + }; + + LimitTypeKind() : value(), initialized(false) {} + LimitTypeKind(LimitTypeKind_ENUM value) : value(value), initialized(true) {} + + LimitTypeKind& operator=(LimitTypeKind_ENUM rop); + operator LimitTypeKind_ENUM() const; + + LimitTypeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, LimitTypeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const LimitTypeKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Line.cpp b/CGMES_2.4.13_18DEC2013/Line.cpp new file mode 100644 index 000000000..d115a5496 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Line.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Line.hpp" + +#include +#include + +#include "SubGeographicalRegion.hpp" + +using namespace CIMPP; + +Line::Line() : Region(nullptr) {}; +Line::~Line() {}; + + + + +bool assign_SubGeographicalRegion_Lines(BaseClass*, BaseClass*); +bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Line* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_SubGeographicalRegion_Lines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Line::debugName[] = "Line"; +const char* Line::debugString() const +{ + return Line::debugName; +} + +void Line::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Line"), &Line_factory)); +} + +void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Line::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Line.Region"), &assign_Line_Region)); +} + +const BaseClassDefiner Line::declare() +{ + return BaseClassDefiner(Line::addConstructToMap, Line::addPrimitiveAssignFnsToMap, Line::addClassAssignFnsToMap, Line::debugName); +} + +namespace CIMPP +{ + BaseClass* Line_factory() + { + return new Line; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Line.hpp b/CGMES_2.4.13_18DEC2013/Line.hpp new file mode 100644 index 000000000..1ebd15ab8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Line.hpp @@ -0,0 +1,41 @@ +#ifndef Line_H +#define Line_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SubGeographicalRegion; + + /* + Contains equipment beyond a substation belonging to a power transmission line. + */ + class Line : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + Line(); + ~Line() override; + + CIMPP::SubGeographicalRegion* Region; /* The lines within the sub-geographical region. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Line_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp new file mode 100644 index 000000000..06b73e6ad --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LinearShuntCompensator.hpp" + +#include +#include + +#include "Susceptance.hpp" +#include "Susceptance.hpp" +#include "Conductance.hpp" +#include "Conductance.hpp" + +using namespace CIMPP; + +LinearShuntCompensator::LinearShuntCompensator() {}; +LinearShuntCompensator::~LinearShuntCompensator() {}; + + +bool assign_LinearShuntCompensator_b0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0PerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LinearShuntCompensator_bPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bPerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LinearShuntCompensator_g0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0PerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LinearShuntCompensator_gPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gPerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char LinearShuntCompensator::debugName[] = "LinearShuntCompensator"; +const char* LinearShuntCompensator::debugString() const +{ + return LinearShuntCompensator::debugName; +} + +void LinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LinearShuntCompensator::declare() +{ + return BaseClassDefiner(LinearShuntCompensator::addConstructToMap, LinearShuntCompensator::addPrimitiveAssignFnsToMap, LinearShuntCompensator::addClassAssignFnsToMap, LinearShuntCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* LinearShuntCompensator_factory() + { + return new LinearShuntCompensator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp new file mode 100644 index 000000000..38c19002d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp @@ -0,0 +1,45 @@ +#ifndef LinearShuntCompensator_H +#define LinearShuntCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ShuntCompensator.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + + /* + A linear shunt compensator has banks or sections with equal admittance values. + */ + class LinearShuntCompensator : public ShuntCompensator + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LinearShuntCompensator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp b/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp new file mode 100644 index 000000000..d6a367b9d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadAggregate.hpp" + +#include +#include + +#include "LoadMotor.hpp" +#include "LoadStatic.hpp" + +using namespace CIMPP; + +LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {}; +LoadAggregate::~LoadAggregate() {}; + + + + + +bool assign_LoadMotor_LoadAggregate(BaseClass*, BaseClass*); +bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadAggregate* element = dynamic_cast(BaseClass_ptr1); + LoadMotor* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadMotor != element2) + { + element->LoadMotor = element2; + return assign_LoadMotor_LoadAggregate(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_LoadStatic_LoadAggregate(BaseClass*, BaseClass*); +bool assign_LoadAggregate_LoadStatic(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadAggregate* element = dynamic_cast(BaseClass_ptr1); + LoadStatic* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadStatic != element2) + { + element->LoadStatic = element2; + return assign_LoadStatic_LoadAggregate(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadAggregate::debugName[] = "LoadAggregate"; +const char* LoadAggregate::debugString() const +{ + return LoadAggregate::debugName; +} + +void LoadAggregate::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadAggregate"), &LoadAggregate_factory)); +} + +void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadAggregate::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner LoadAggregate::declare() +{ + return BaseClassDefiner(LoadAggregate::addConstructToMap, LoadAggregate::addPrimitiveAssignFnsToMap, LoadAggregate::addClassAssignFnsToMap, LoadAggregate::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadAggregate_factory() + { + return new LoadAggregate; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp b/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp new file mode 100644 index 000000000..86ba44d00 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp @@ -0,0 +1,43 @@ +#ifndef LoadAggregate_H +#define LoadAggregate_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadAggregate : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadAggregate_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadArea.cpp b/CGMES_2.4.13_18DEC2013/LoadArea.cpp new file mode 100644 index 000000000..ed24626bc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadArea.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadArea.hpp" + +#include +#include + +#include "SubLoadArea.hpp" + +using namespace CIMPP; + +LoadArea::LoadArea() {}; +LoadArea::~LoadArea() {}; + + + + +bool assign_SubLoadArea_LoadArea(BaseClass*, BaseClass*); +bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadArea* element = dynamic_cast(BaseClass_ptr1); + SubLoadArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->SubLoadAreas.begin(), element->SubLoadAreas.end(), element2) == element->SubLoadAreas.end()) + { + element->SubLoadAreas.push_back(element2); + return assign_SubLoadArea_LoadArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadArea::debugName[] = "LoadArea"; +const char* LoadArea::debugString() const +{ + return LoadArea::debugName; +} + +void LoadArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadArea"), &LoadArea_factory)); +} + +void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadArea::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadArea.SubLoadAreas"), &assign_LoadArea_SubLoadAreas)); +} + +const BaseClassDefiner LoadArea::declare() +{ + return BaseClassDefiner(LoadArea::addConstructToMap, LoadArea::addPrimitiveAssignFnsToMap, LoadArea::addClassAssignFnsToMap, LoadArea::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadArea_factory() + { + return new LoadArea; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadArea.hpp b/CGMES_2.4.13_18DEC2013/LoadArea.hpp new file mode 100644 index 000000000..c4bd5f831 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadArea.hpp @@ -0,0 +1,41 @@ +#ifndef LoadArea_H +#define LoadArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyArea.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadArea : public EnergyArea + { + public: + /* constructor initialising all attributes to null */ + LoadArea(); + ~LoadArea() override; + + std::list SubLoadAreas; /* The SubLoadAreas in the LoadArea. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadArea_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp new file mode 100644 index 000000000..bc2238810 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadBreakSwitch.hpp" + +#include +#include + + +using namespace CIMPP; + +LoadBreakSwitch::LoadBreakSwitch() {}; +LoadBreakSwitch::~LoadBreakSwitch() {}; + + + +const char LoadBreakSwitch::debugName[] = "LoadBreakSwitch"; +const char* LoadBreakSwitch::debugString() const +{ + return LoadBreakSwitch::debugName; +} + +void LoadBreakSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadBreakSwitch"), &LoadBreakSwitch_factory)); +} + +void LoadBreakSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadBreakSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LoadBreakSwitch::declare() +{ + return BaseClassDefiner(LoadBreakSwitch::addConstructToMap, LoadBreakSwitch::addPrimitiveAssignFnsToMap, LoadBreakSwitch::addClassAssignFnsToMap, LoadBreakSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadBreakSwitch_factory() + { + return new LoadBreakSwitch; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp new file mode 100644 index 000000000..843b54d07 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp @@ -0,0 +1,39 @@ +#ifndef LoadBreakSwitch_H +#define LoadBreakSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ProtectedSwitch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. + */ + class LoadBreakSwitch : public ProtectedSwitch + { + public: + /* constructor initialising all attributes to null */ + LoadBreakSwitch(); + ~LoadBreakSwitch() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadBreakSwitch_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadComposite.cpp b/CGMES_2.4.13_18DEC2013/LoadComposite.cpp new file mode 100644 index 000000000..5fe50b8fc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadComposite.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadComposite.hpp" + +#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() {}; + + +bool assign_LoadComposite_epfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_epfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epfs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_epvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_epvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqfs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_lfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lfrac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfrac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char LoadComposite::debugName[] = "LoadComposite"; +const char* LoadComposite::debugString() const +{ + return LoadComposite::debugName; +} + +void LoadComposite::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadComposite::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LoadComposite::declare() +{ + return BaseClassDefiner(LoadComposite::addConstructToMap, LoadComposite::addPrimitiveAssignFnsToMap, LoadComposite::addClassAssignFnsToMap, LoadComposite::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadComposite_factory() + { + return new LoadComposite; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadComposite.hpp b/CGMES_2.4.13_18DEC2013/LoadComposite.hpp new file mode 100644 index 000000000..389aaceae --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadComposite.hpp @@ -0,0 +1,52 @@ +#ifndef LoadComposite_H +#define LoadComposite_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class LoadComposite : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadComposite_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp b/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp new file mode 100644 index 000000000..2dc9c9f3e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadDynamics.hpp" + +#include +#include + +#include "EnergyConsumer.hpp" + +using namespace CIMPP; + +LoadDynamics::LoadDynamics() {}; +LoadDynamics::~LoadDynamics() {}; + + + + +bool assign_EnergyConsumer_LoadDynamics(BaseClass*, BaseClass*); +bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadDynamics* 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_LoadDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadDynamics::debugName[] = "LoadDynamics"; +const char* LoadDynamics::debugString() const +{ + return LoadDynamics::debugName; +} + +void LoadDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadDynamics"), &LoadDynamics_factory)); +} + +void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadDynamics.EnergyConsumer"), &assign_LoadDynamics_EnergyConsumer)); +} + +const BaseClassDefiner LoadDynamics::declare() +{ + return BaseClassDefiner(LoadDynamics::addConstructToMap, LoadDynamics::addPrimitiveAssignFnsToMap, LoadDynamics::addClassAssignFnsToMap, LoadDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadDynamics_factory() + { + return new LoadDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp b/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp new file mode 100644 index 000000000..d21cef390 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef LoadDynamics_H +#define LoadDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadDynamics : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + LoadDynamics(); + ~LoadDynamics() override; + + std::list EnergyConsumer; /* Energy consumer to which this dynamics load model applies. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp new file mode 100644 index 000000000..71b3161cc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadGenericNonLinear.hpp" + +#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() {}; + + +bool assign_LoadGenericNonLinear_bs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_bt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->genericNonLinearLoadModelType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ls; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_lt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_pt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_qt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_tq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + +const char LoadGenericNonLinear::debugName[] = "LoadGenericNonLinear"; +const char* LoadGenericNonLinear::debugString() const +{ + return LoadGenericNonLinear::debugName; +} + +void LoadGenericNonLinear::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadGenericNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LoadGenericNonLinear::declare() +{ + return BaseClassDefiner(LoadGenericNonLinear::addConstructToMap, LoadGenericNonLinear::addPrimitiveAssignFnsToMap, LoadGenericNonLinear::addClassAssignFnsToMap, LoadGenericNonLinear::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadGenericNonLinear_factory() + { + return new LoadGenericNonLinear; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp new file mode 100644 index 000000000..a5ffacb16 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp @@ -0,0 +1,51 @@ +#ifndef LoadGenericNonLinear_H +#define LoadGenericNonLinear_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "GenericNonLinearLoadModelKind.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class LoadGenericNonLinear : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadGenericNonLinear_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadGroup.cpp b/CGMES_2.4.13_18DEC2013/LoadGroup.cpp new file mode 100644 index 000000000..4dce2a407 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadGroup.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadGroup.hpp" + +#include +#include + +#include "SubLoadArea.hpp" + +using namespace CIMPP; + +LoadGroup::LoadGroup() : SubLoadArea(nullptr) {}; +LoadGroup::~LoadGroup() {}; + + + + +bool assign_SubLoadArea_LoadGroups(BaseClass*, BaseClass*); +bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadGroup* element = dynamic_cast(BaseClass_ptr1); + SubLoadArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SubLoadArea != element2) + { + element->SubLoadArea = element2; + return assign_SubLoadArea_LoadGroups(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadGroup::debugName[] = "LoadGroup"; +const char* LoadGroup::debugString() const +{ + return LoadGroup::debugName; +} + +void LoadGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadGroup"), &LoadGroup_factory)); +} + +void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadGroup::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadGroup.SubLoadArea"), &assign_LoadGroup_SubLoadArea)); +} + +const BaseClassDefiner LoadGroup::declare() +{ + return BaseClassDefiner(LoadGroup::addConstructToMap, LoadGroup::addPrimitiveAssignFnsToMap, LoadGroup::addClassAssignFnsToMap, LoadGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadGroup_factory() + { + return new LoadGroup; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadGroup.hpp b/CGMES_2.4.13_18DEC2013/LoadGroup.hpp new file mode 100644 index 000000000..768f27c0c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadGroup.hpp @@ -0,0 +1,41 @@ +#ifndef LoadGroup_H +#define LoadGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadGroup : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + LoadGroup(); + ~LoadGroup() override; + + CIMPP::SubLoadArea* SubLoadArea; /* The SubLoadArea where the Loadgroup belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadGroup_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadMotor.cpp b/CGMES_2.4.13_18DEC2013/LoadMotor.cpp new file mode 100644 index 000000000..b7fa7d89f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadMotor.cpp @@ -0,0 +1,275 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadMotor.hpp" + +#include +#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() {}; + + + +bool assign_LoadMotor_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lfac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_lpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ls; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfrac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_ra(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ra; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tbkr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tbkr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_vt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + +const char LoadMotor::debugName[] = "LoadMotor"; +const char* LoadMotor::debugString() const +{ + return LoadMotor::debugName; +} + +void LoadMotor::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadMotor::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadMotor.LoadAggregate"), &assign_LoadMotor_LoadAggregate)); +} + +const BaseClassDefiner LoadMotor::declare() +{ + return BaseClassDefiner(LoadMotor::addConstructToMap, LoadMotor::addPrimitiveAssignFnsToMap, LoadMotor::addClassAssignFnsToMap, LoadMotor::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadMotor_factory() + { + return new LoadMotor; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadMotor.hpp b/CGMES_2.4.13_18DEC2013/LoadMotor.hpp new file mode 100644 index 000000000..570ff0286 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadMotor.hpp @@ -0,0 +1,57 @@ +#ifndef LoadMotor_H +#define LoadMotor_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class LoadMotor : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadMotor_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp new file mode 100644 index 000000000..bca018da6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp @@ -0,0 +1,243 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadResponseCharacteristic.hpp" + +#include +#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() {}; + + + +bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exponentModel; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pConstantCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pConstantImpedance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pConstantPower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pFrequencyExponent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pVoltageExponent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qConstantCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qConstantImpedance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qConstantPower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + +const char LoadResponseCharacteristic::debugName[] = "LoadResponseCharacteristic"; +const char* LoadResponseCharacteristic::debugString() const +{ + return LoadResponseCharacteristic::debugName; +} + +void LoadResponseCharacteristic::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadResponseCharacteristic::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.EnergyConsumer"), &assign_LoadResponseCharacteristic_EnergyConsumer)); +} + +const BaseClassDefiner LoadResponseCharacteristic::declare() +{ + return BaseClassDefiner(LoadResponseCharacteristic::addConstructToMap, LoadResponseCharacteristic::addPrimitiveAssignFnsToMap, LoadResponseCharacteristic::addClassAssignFnsToMap, LoadResponseCharacteristic::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadResponseCharacteristic_factory() + { + return new LoadResponseCharacteristic; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp new file mode 100644 index 000000000..5a7e07e60 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp @@ -0,0 +1,54 @@ +#ifndef LoadResponseCharacteristic_H +#define LoadResponseCharacteristic_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Simple_Float.hpp" + +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". + */ + class LoadResponseCharacteristic : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadResponseCharacteristic_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadStatic.cpp b/CGMES_2.4.13_18DEC2013/LoadStatic.cpp new file mode 100644 index 000000000..f73a0f201 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadStatic.cpp @@ -0,0 +1,339 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadStatic.hpp" + +#include +#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() {}; + + + +bool assign_LoadStatic_ep1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ep1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_ep2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ep2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_ep3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ep3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_eq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eq1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_eq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eq2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_eq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eq3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kqf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_staticLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->staticLoadModelType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + + + + + +const char LoadStatic::debugName[] = "LoadStatic"; +const char* LoadStatic::debugString() const +{ + return LoadStatic::debugName; +} + +void LoadStatic::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadStatic::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadStatic.LoadAggregate"), &assign_LoadStatic_LoadAggregate)); +} + +const BaseClassDefiner LoadStatic::declare() +{ + return BaseClassDefiner(LoadStatic::addConstructToMap, LoadStatic::addPrimitiveAssignFnsToMap, LoadStatic::addClassAssignFnsToMap, LoadStatic::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadStatic_factory() + { + return new LoadStatic; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadStatic.hpp b/CGMES_2.4.13_18DEC2013/LoadStatic.hpp new file mode 100644 index 000000000..20d2f697c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadStatic.hpp @@ -0,0 +1,60 @@ +#ifndef LoadStatic_H +#define LoadStatic_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" +#include "StaticLoadModelKind.hpp" + +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. + */ + class LoadStatic : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadStatic_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp b/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp new file mode 100644 index 000000000..e183a2407 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +LoadUserDefined::LoadUserDefined() {}; +LoadUserDefined::~LoadUserDefined() {}; + + + +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) +{ + LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char LoadUserDefined::debugName[] = "LoadUserDefined"; +const char* LoadUserDefined::debugString() const +{ + return LoadUserDefined::debugName; +} + +void LoadUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.ProprietaryParameterDynamics"), &assign_LoadUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner LoadUserDefined::declare() +{ + return BaseClassDefiner(LoadUserDefined::addConstructToMap, LoadUserDefined::addPrimitiveAssignFnsToMap, LoadUserDefined::addClassAssignFnsToMap, LoadUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadUserDefined_factory() + { + return new LoadUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp b/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp new file mode 100644 index 000000000..552ad477f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef LoadUserDefined_H +#define LoadUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Load whose dynamic behaviour is described by a user-defined model. + */ + class LoadUserDefined : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Location.cpp b/CGMES_2.4.13_18DEC2013/Location.cpp new file mode 100644 index 000000000..324a13705 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Location.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Location.hpp" + +#include +#include + +#include "CoordinateSystem.hpp" +#include "PositionPoint.hpp" +#include "PowerSystemResource.hpp" + +using namespace CIMPP; + +Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {}; +Location::~Location() {}; + + + + + + +bool assign_CoordinateSystem_Location(BaseClass*, BaseClass*); +bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Location* element = dynamic_cast(BaseClass_ptr1); + CoordinateSystem* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CoordinateSystem != element2) + { + element->CoordinateSystem = element2; + return assign_CoordinateSystem_Location(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PositionPoint_Location(BaseClass*, BaseClass*); +bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Location* element = dynamic_cast(BaseClass_ptr1); + PositionPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->PositionPoints.begin(), element->PositionPoints.end(), element2) == element->PositionPoints.end()) + { + element->PositionPoints.push_back(element2); + return assign_PositionPoint_Location(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemResource_Location(BaseClass*, BaseClass*); +bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Location* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemResources != element2) + { + element->PowerSystemResources = element2; + return assign_PowerSystemResource_Location(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Location::debugName[] = "Location"; +const char* Location::debugString() const +{ + return Location::debugName; +} + +void Location::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Location"), &Location_factory)); +} + +void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Location::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Location::declare() +{ + return BaseClassDefiner(Location::addConstructToMap, Location::addPrimitiveAssignFnsToMap, Location::addClassAssignFnsToMap, Location::debugName); +} + +namespace CIMPP +{ + BaseClass* Location_factory() + { + return new Location; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Location.hpp b/CGMES_2.4.13_18DEC2013/Location.hpp new file mode 100644 index 000000000..717a070ff --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Location.hpp @@ -0,0 +1,45 @@ +#ifndef Location_H +#define Location_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class CoordinateSystem; + 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. + */ + class Location : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Location_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Measurement.cpp b/CGMES_2.4.13_18DEC2013/Measurement.cpp new file mode 100644 index 000000000..fb5a3137e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Measurement.cpp @@ -0,0 +1,151 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Measurement.hpp" + +#include +#include + +#include "PowerSystemResource.hpp" +#include "ACDCTerminal.hpp" +#include "String.hpp" +#include "PhaseCode.hpp" +#include "UnitMultiplier.hpp" +#include "UnitSymbol.hpp" + +using namespace CIMPP; + +Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {}; +Measurement::~Measurement() {}; + + + + +bool assign_Measurement_measurementType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + { + element->measurementType = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Measurement_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->phases; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Measurement_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->unitMultiplier; + if (buffer.fail()) + return false; + else + 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) +{ + Measurement* 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_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Measurement* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char Measurement::debugName[] = "Measurement"; +const char* Measurement::debugString() const +{ + return Measurement::debugName; +} + +void Measurement::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Measurement::declare() +{ + return BaseClassDefiner(Measurement::addConstructToMap, Measurement::addPrimitiveAssignFnsToMap, Measurement::addClassAssignFnsToMap, Measurement::debugName); +} + +namespace CIMPP +{ + BaseClass* Measurement_factory() + { + return new Measurement; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Measurement.hpp b/CGMES_2.4.13_18DEC2013/Measurement.hpp new file mode 100644 index 000000000..bd320f912 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Measurement.hpp @@ -0,0 +1,51 @@ +#ifndef Measurement_H +#define Measurement_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PhaseCode.hpp" +#include "String.hpp" +#include "UnitMultiplier.hpp" +#include "UnitSymbol.hpp" + +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. + */ + class Measurement : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Measurement_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp b/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp new file mode 100644 index 000000000..84231fa0a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MeasurementValue.hpp" + +#include +#include + +#include "MeasurementValueQuality.hpp" +#include "MeasurementValueSource.hpp" +#include "PerCent.hpp" +#include "DateTime.hpp" + +using namespace CIMPP; + +MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {}; +MeasurementValue::~MeasurementValue() {}; + + + + +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) +{ + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + MeasurementValueQuality* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MeasurementValueQuality != element2) + { + element->MeasurementValueQuality = element2; + return assign_MeasurementValueQuality_MeasurementValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MeasurementValueSource_MeasurementValues(BaseClass*, BaseClass*); +bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + MeasurementValueSource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MeasurementValueSource != element2) + { + element->MeasurementValueSource = element2; + return assign_MeasurementValueSource_MeasurementValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char MeasurementValue::debugName[] = "MeasurementValue"; +const char* MeasurementValue::debugString() const +{ + return MeasurementValue::debugName; +} + +void MeasurementValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner MeasurementValue::declare() +{ + return BaseClassDefiner(MeasurementValue::addConstructToMap, MeasurementValue::addPrimitiveAssignFnsToMap, MeasurementValue::addClassAssignFnsToMap, MeasurementValue::debugName); +} + +namespace CIMPP +{ + BaseClass* MeasurementValue_factory() + { + return new MeasurementValue; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp b/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp new file mode 100644 index 000000000..c24d7f7bd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp @@ -0,0 +1,47 @@ +#ifndef MeasurementValue_H +#define MeasurementValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "PerCent.hpp" + +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. + */ + class MeasurementValue : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MeasurementValue_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp new file mode 100644 index 000000000..4200ee1df --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MeasurementValueQuality.hpp" + +#include +#include + +#include "MeasurementValue.hpp" + +using namespace CIMPP; + +MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {}; +MeasurementValueQuality::~MeasurementValueQuality() {}; + + + + +bool assign_MeasurementValue_MeasurementValueQuality(BaseClass*, BaseClass*); +bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1); + MeasurementValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MeasurementValue != element2) + { + element->MeasurementValue = element2; + return assign_MeasurementValue_MeasurementValueQuality(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char MeasurementValueQuality::debugName[] = "MeasurementValueQuality"; +const char* MeasurementValueQuality::debugString() const +{ + return MeasurementValueQuality::debugName; +} + +void MeasurementValueQuality::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality"), &MeasurementValueQuality_factory)); +} + +void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void MeasurementValueQuality::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality.MeasurementValue"), &assign_MeasurementValueQuality_MeasurementValue)); +} + +const BaseClassDefiner MeasurementValueQuality::declare() +{ + return BaseClassDefiner(MeasurementValueQuality::addConstructToMap, MeasurementValueQuality::addPrimitiveAssignFnsToMap, MeasurementValueQuality::addClassAssignFnsToMap, MeasurementValueQuality::debugName); +} + +namespace CIMPP +{ + BaseClass* MeasurementValueQuality_factory() + { + return new MeasurementValueQuality; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp new file mode 100644 index 000000000..a03b9d52f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp @@ -0,0 +1,41 @@ +#ifndef MeasurementValueQuality_H +#define MeasurementValueQuality_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Quality61850.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class MeasurementValueQuality : public Quality61850 + { + public: + /* constructor initialising all attributes to null */ + MeasurementValueQuality(); + ~MeasurementValueQuality() override; + + CIMPP::MeasurementValue* MeasurementValue; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MeasurementValueQuality_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp new file mode 100644 index 000000000..6c8c10f30 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MeasurementValueSource.hpp" + +#include +#include + +#include "MeasurementValue.hpp" + +using namespace CIMPP; + +MeasurementValueSource::MeasurementValueSource() {}; +MeasurementValueSource::~MeasurementValueSource() {}; + + + + +bool assign_MeasurementValue_MeasurementValueSource(BaseClass*, BaseClass*); +bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MeasurementValueSource* element = dynamic_cast(BaseClass_ptr1); + MeasurementValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->MeasurementValues.begin(), element->MeasurementValues.end(), element2) == element->MeasurementValues.end()) + { + element->MeasurementValues.push_back(element2); + return assign_MeasurementValue_MeasurementValueSource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char MeasurementValueSource::debugName[] = "MeasurementValueSource"; +const char* MeasurementValueSource::debugString() const +{ + return MeasurementValueSource::debugName; +} + +void MeasurementValueSource::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:MeasurementValueSource"), &MeasurementValueSource_factory)); +} + +void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void MeasurementValueSource::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:MeasurementValueSource.MeasurementValues"), &assign_MeasurementValueSource_MeasurementValues)); +} + +const BaseClassDefiner MeasurementValueSource::declare() +{ + return BaseClassDefiner(MeasurementValueSource::addConstructToMap, MeasurementValueSource::addPrimitiveAssignFnsToMap, MeasurementValueSource::addClassAssignFnsToMap, MeasurementValueSource::debugName); +} + +namespace CIMPP +{ + BaseClass* MeasurementValueSource_factory() + { + return new MeasurementValueSource; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp new file mode 100644 index 000000000..2a591a510 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp @@ -0,0 +1,41 @@ +#ifndef MeasurementValueSource_H +#define MeasurementValueSource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class MeasurementValueSource : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MeasurementValueSource_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MechLoad1.cpp b/CGMES_2.4.13_18DEC2013/MechLoad1.cpp new file mode 100644 index 000000000..dcb3efe20 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MechLoad1.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MechLoad1.hpp" + +#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() {}; + + +bool assign_MechLoad1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MechLoad1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MechLoad1_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MechLoad1_e(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char MechLoad1::debugName[] = "MechLoad1"; +const char* MechLoad1::debugString() const +{ + return MechLoad1::debugName; +} + +void MechLoad1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void MechLoad1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner MechLoad1::declare() +{ + return BaseClassDefiner(MechLoad1::addConstructToMap, MechLoad1::addPrimitiveAssignFnsToMap, MechLoad1::addClassAssignFnsToMap, MechLoad1::debugName); +} + +namespace CIMPP +{ + BaseClass* MechLoad1_factory() + { + return new MechLoad1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MechLoad1.hpp b/CGMES_2.4.13_18DEC2013/MechLoad1.hpp new file mode 100644 index 000000000..92b49f819 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MechLoad1.hpp @@ -0,0 +1,44 @@ +#ifndef MechLoad1_H +#define MechLoad1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MechanicalLoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Mechanical load model type 1. + */ + class MechLoad1 : public MechanicalLoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MechLoad1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp new file mode 100644 index 000000000..1309e97f3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MechanicalLoadDynamics.hpp" + +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" + +using namespace CIMPP; + +MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {}; +MechanicalLoadDynamics::~MechanicalLoadDynamics() {}; + + + + + +bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); +bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MechanicalLoadDynamics* 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_MechanicalLoadDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); +bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MechanicalLoadDynamics* 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_MechanicalLoadDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char MechanicalLoadDynamics::debugName[] = "MechanicalLoadDynamics"; +const char* MechanicalLoadDynamics::debugString() const +{ + return MechanicalLoadDynamics::debugName; +} + +void MechanicalLoadDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics"), &MechanicalLoadDynamics_factory)); +} + +void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void MechanicalLoadDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner MechanicalLoadDynamics::declare() +{ + return BaseClassDefiner(MechanicalLoadDynamics::addConstructToMap, MechanicalLoadDynamics::addPrimitiveAssignFnsToMap, MechanicalLoadDynamics::addClassAssignFnsToMap, MechanicalLoadDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* MechanicalLoadDynamics_factory() + { + return new MechanicalLoadDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp new file mode 100644 index 000000000..a6b7f7952 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef MechanicalLoadDynamics_H +#define MechanicalLoadDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AsynchronousMachineDynamics; + class SynchronousMachineDynamics; + + /* + Mechanical load function block whose behavior is described by reference to a standard model + */ + class MechanicalLoadDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MechanicalLoadDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp new file mode 100644 index 000000000..64c23efdf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MechanicalLoadUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +MechanicalLoadUserDefined::MechanicalLoadUserDefined() {}; +MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {}; + + + +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) +{ + MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char MechanicalLoadUserDefined::debugName[] = "MechanicalLoadUserDefined"; +const char* MechanicalLoadUserDefined::debugString() const +{ + return MechanicalLoadUserDefined::debugName; +} + +void MechanicalLoadUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void MechanicalLoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics"), &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner MechanicalLoadUserDefined::declare() +{ + return BaseClassDefiner(MechanicalLoadUserDefined::addConstructToMap, MechanicalLoadUserDefined::addPrimitiveAssignFnsToMap, MechanicalLoadUserDefined::addClassAssignFnsToMap, MechanicalLoadUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* MechanicalLoadUserDefined_factory() + { + return new MechanicalLoadUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp new file mode 100644 index 000000000..5e61ad69b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef MechanicalLoadUserDefined_H +#define MechanicalLoadUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MechanicalLoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Mechanical load function block whose dynamic behaviour is described by + */ + class MechanicalLoadUserDefined : public MechanicalLoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MechanicalLoadUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Money.cpp b/CGMES_2.4.13_18DEC2013/Money.cpp new file mode 100644 index 000000000..89e8271c2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Money.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Money.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Money& Money::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Money::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Money::debugName[] = "Money"; +const char* Money::debugString() const +{ + return Money::debugName; +} + +Money& Money::operator+=(const Money& rhs) +{ + value += rhs.value; + return *this; +} + +Money& Money::operator-=(const Money& rhs) +{ + value -= rhs.value; + return *this; +} + +Money& Money::operator*=(const Money& rhs) +{ + value *= rhs.value; + return *this; +} + +Money& Money::operator/=(const Money& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Money& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Money& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Money.hpp b/CGMES_2.4.13_18DEC2013/Money.hpp new file mode 100644 index 000000000..b6c47f743 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Money.hpp @@ -0,0 +1,39 @@ +#ifndef Money_H +#define Money_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Amount of money. + */ + class Money + { + public: + Money() : value(0.0), initialized(false) {} + Money(long double value) : value(value), initialized(true) {} + + Money& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Money& operator+=(const Money& rhs); + Money& operator-=(const Money& rhs); + Money& operator*=(const Money& rhs); + Money& operator/=(const Money& rhs); + + friend std::istream& operator>>(std::istream& lop, Money& rop); + friend std::ostream& operator<<(std::ostream& os, const Money& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MonthDay.cpp b/CGMES_2.4.13_18DEC2013/MonthDay.cpp new file mode 100644 index 000000000..2ef4c8b7e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MonthDay.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MonthDay.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +MonthDay& MonthDay::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +MonthDay::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char MonthDay::debugName[] = "MonthDay"; +const char* MonthDay::debugString() const +{ + return MonthDay::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, MonthDay& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const MonthDay& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MonthDay.hpp b/CGMES_2.4.13_18DEC2013/MonthDay.hpp new file mode 100644 index 000000000..1669168fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MonthDay.hpp @@ -0,0 +1,35 @@ +#ifndef MonthDay_H +#define MonthDay_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +namespace CIMPP +{ + /* + 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); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, MonthDay& rop); + friend std::ostream& operator<<(std::ostream& os, const MonthDay& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp b/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp new file mode 100644 index 000000000..3d54c7cc1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp @@ -0,0 +1,215 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MutualCoupling.hpp" + +#include +#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() {}; + + + + +bool assign_MutualCoupling_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance22(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance22; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + +const char MutualCoupling::debugName[] = "MutualCoupling"; +const char* MutualCoupling::debugString() const +{ + return MutualCoupling::debugName; +} + +void MutualCoupling::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner MutualCoupling::declare() +{ + return BaseClassDefiner(MutualCoupling::addConstructToMap, MutualCoupling::addPrimitiveAssignFnsToMap, MutualCoupling::addClassAssignFnsToMap, MutualCoupling::debugName); +} + +namespace CIMPP +{ + BaseClass* MutualCoupling_factory() + { + return new MutualCoupling; + } +} diff --git a/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp b/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp new file mode 100644 index 000000000..7e9437378 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp @@ -0,0 +1,55 @@ +#ifndef MutualCoupling_H +#define MutualCoupling_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Length.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + class Terminal; + + /* + This class represents the zero sequence line mutual coupling. + */ + class MutualCoupling : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MutualCoupling_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp b/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp new file mode 100644 index 000000000..2ef76bf9b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonConformLoad.hpp" + +#include +#include + +#include "NonConformLoadGroup.hpp" + +using namespace CIMPP; + +NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {}; +NonConformLoad::~NonConformLoad() {}; + + + + +bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); +bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoad* element = dynamic_cast(BaseClass_ptr1); + NonConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadGroup != element2) + { + element->LoadGroup = element2; + return assign_NonConformLoadGroup_EnergyConsumers(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonConformLoad::debugName[] = "NonConformLoad"; +const char* NonConformLoad::debugString() const +{ + return NonConformLoad::debugName; +} + +void NonConformLoad::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonConformLoad"), &NonConformLoad_factory)); +} + +void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonConformLoad::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonConformLoad.LoadGroup"), &assign_NonConformLoad_LoadGroup)); +} + +const BaseClassDefiner NonConformLoad::declare() +{ + return BaseClassDefiner(NonConformLoad::addConstructToMap, NonConformLoad::addPrimitiveAssignFnsToMap, NonConformLoad::addClassAssignFnsToMap, NonConformLoad::debugName); +} + +namespace CIMPP +{ + BaseClass* NonConformLoad_factory() + { + return new NonConformLoad; + } +} diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp b/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp new file mode 100644 index 000000000..d7e4bd9ca --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp @@ -0,0 +1,41 @@ +#ifndef NonConformLoad_H +#define NonConformLoad_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConsumer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class NonConformLoad : public EnergyConsumer + { + public: + /* constructor initialising all attributes to null */ + NonConformLoad(); + ~NonConformLoad() override; + + CIMPP::NonConformLoadGroup* LoadGroup; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonConformLoad_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp new file mode 100644 index 000000000..6382d77c5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonConformLoadGroup.hpp" + +#include +#include + +#include "NonConformLoad.hpp" +#include "NonConformLoadSchedule.hpp" + +using namespace CIMPP; + +NonConformLoadGroup::NonConformLoadGroup() {}; +NonConformLoadGroup::~NonConformLoadGroup() {}; + + + + + +bool assign_NonConformLoad_LoadGroup(BaseClass*, BaseClass*); +bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + NonConformLoad* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumers.begin(), element->EnergyConsumers.end(), element2) == element->EnergyConsumers.end()) + { + element->EnergyConsumers.push_back(element2); + return assign_NonConformLoad_LoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass*, BaseClass*); +bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + NonConformLoadSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->NonConformLoadSchedules.begin(), element->NonConformLoadSchedules.end(), element2) == element->NonConformLoadSchedules.end()) + { + element->NonConformLoadSchedules.push_back(element2); + return assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonConformLoadGroup::debugName[] = "NonConformLoadGroup"; +const char* NonConformLoadGroup::debugString() const +{ + return NonConformLoadGroup::debugName; +} + +void NonConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup"), &NonConformLoadGroup_factory)); +} + +void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonConformLoadGroup::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner NonConformLoadGroup::declare() +{ + return BaseClassDefiner(NonConformLoadGroup::addConstructToMap, NonConformLoadGroup::addPrimitiveAssignFnsToMap, NonConformLoadGroup::addClassAssignFnsToMap, NonConformLoadGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* NonConformLoadGroup_factory() + { + return new NonConformLoadGroup; + } +} diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp new file mode 100644 index 000000000..86179d093 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp @@ -0,0 +1,43 @@ +#ifndef NonConformLoadGroup_H +#define NonConformLoadGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadGroup.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class NonConformLoad; + class NonConformLoadSchedule; + + /* + Loads that do not follow a daily and seasonal load variation pattern. + */ + class NonConformLoadGroup : public LoadGroup + { + public: + /* constructor initialising all attributes to null */ + NonConformLoadGroup(); + ~NonConformLoadGroup() override; + + std::list EnergyConsumers; /* Group of this ConformLoad. Default: 0 */ + std::list NonConformLoadSchedules; /* The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonConformLoadGroup_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp new file mode 100644 index 000000000..aaf9d0641 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonConformLoadSchedule.hpp" + +#include +#include + +#include "NonConformLoadGroup.hpp" + +using namespace CIMPP; + +NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {}; +NonConformLoadSchedule::~NonConformLoadSchedule() {}; + + + + +bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass*, BaseClass*); +bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + NonConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->NonConformLoadGroup != element2) + { + element->NonConformLoadGroup = element2; + return assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonConformLoadSchedule::debugName[] = "NonConformLoadSchedule"; +const char* NonConformLoadSchedule::debugString() const +{ + return NonConformLoadSchedule::debugName; +} + +void NonConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule"), &NonConformLoadSchedule_factory)); +} + +void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonConformLoadSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule.NonConformLoadGroup"), &assign_NonConformLoadSchedule_NonConformLoadGroup)); +} + +const BaseClassDefiner NonConformLoadSchedule::declare() +{ + return BaseClassDefiner(NonConformLoadSchedule::addConstructToMap, NonConformLoadSchedule::addPrimitiveAssignFnsToMap, NonConformLoadSchedule::addClassAssignFnsToMap, NonConformLoadSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* NonConformLoadSchedule_factory() + { + return new NonConformLoadSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp new file mode 100644 index 000000000..66e28f843 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef NonConformLoadSchedule_H +#define NonConformLoadSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +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). + */ + class NonConformLoadSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + NonConformLoadSchedule(); + ~NonConformLoadSchedule() override; + + CIMPP::NonConformLoadGroup* NonConformLoadGroup; /* The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonConformLoadSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp new file mode 100644 index 000000000..99a0ef8cc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonlinearShuntCompensator.hpp" + +#include +#include + +#include "NonlinearShuntCompensatorPoint.hpp" + +using namespace CIMPP; + +NonlinearShuntCompensator::NonlinearShuntCompensator() {}; +NonlinearShuntCompensator::~NonlinearShuntCompensator() {}; + + + + +bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass*, BaseClass*); +bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonlinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + NonlinearShuntCompensatorPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->NonlinearShuntCompensatorPoints.begin(), element->NonlinearShuntCompensatorPoints.end(), element2) == element->NonlinearShuntCompensatorPoints.end()) + { + element->NonlinearShuntCompensatorPoints.push_back(element2); + return assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonlinearShuntCompensator::debugName[] = "NonlinearShuntCompensator"; +const char* NonlinearShuntCompensator::debugString() const +{ + return NonlinearShuntCompensator::debugName; +} + +void NonlinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator"), &NonlinearShuntCompensator_factory)); +} + +void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonlinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints"), &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints)); +} + +const BaseClassDefiner NonlinearShuntCompensator::declare() +{ + return BaseClassDefiner(NonlinearShuntCompensator::addConstructToMap, NonlinearShuntCompensator::addPrimitiveAssignFnsToMap, NonlinearShuntCompensator::addClassAssignFnsToMap, NonlinearShuntCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* NonlinearShuntCompensator_factory() + { + return new NonlinearShuntCompensator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp new file mode 100644 index 000000000..a42b0d6c7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp @@ -0,0 +1,41 @@ +#ifndef NonlinearShuntCompensator_H +#define NonlinearShuntCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ShuntCompensator.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class NonlinearShuntCompensatorPoint; + + /* + A non linear shunt compensator has bank or section admittance values that differs. + */ + class NonlinearShuntCompensator : public ShuntCompensator + { + public: + /* constructor initialising all attributes to null */ + NonlinearShuntCompensator(); + ~NonlinearShuntCompensator() override; + + std::list NonlinearShuntCompensatorPoints; /* All points of the non-linear shunt compensator. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonlinearShuntCompensator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp new file mode 100644 index 000000000..41ee84d9c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonlinearShuntCompensatorPoint.hpp" + +#include +#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() {}; + + + +bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sectionNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + +const char NonlinearShuntCompensatorPoint::debugName[] = "NonlinearShuntCompensatorPoint"; +const char* NonlinearShuntCompensatorPoint::debugString() const +{ + return NonlinearShuntCompensatorPoint::debugName; +} + +void NonlinearShuntCompensatorPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void NonlinearShuntCompensatorPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator"), &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator)); +} + +const BaseClassDefiner NonlinearShuntCompensatorPoint::declare() +{ + return BaseClassDefiner(NonlinearShuntCompensatorPoint::addConstructToMap, NonlinearShuntCompensatorPoint::addPrimitiveAssignFnsToMap, NonlinearShuntCompensatorPoint::addClassAssignFnsToMap, NonlinearShuntCompensatorPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* NonlinearShuntCompensatorPoint_factory() + { + return new NonlinearShuntCompensatorPoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp new file mode 100644 index 000000000..73982a75e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp @@ -0,0 +1,49 @@ +#ifndef NonlinearShuntCompensatorPoint_H +#define NonlinearShuntCompensatorPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Integer.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + class NonlinearShuntCompensator; + + /* + A non linear shunt compensator bank or section admittance value. + */ + class NonlinearShuntCompensatorPoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonlinearShuntCompensatorPoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp new file mode 100644 index 000000000..98d7415bb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NuclearGeneratingUnit.hpp" + +#include +#include + + +using namespace CIMPP; + +NuclearGeneratingUnit::NuclearGeneratingUnit() {}; +NuclearGeneratingUnit::~NuclearGeneratingUnit() {}; + + + +const char NuclearGeneratingUnit::debugName[] = "NuclearGeneratingUnit"; +const char* NuclearGeneratingUnit::debugString() const +{ + return NuclearGeneratingUnit::debugName; +} + +void NuclearGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NuclearGeneratingUnit"), &NuclearGeneratingUnit_factory)); +} + +void NuclearGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NuclearGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner NuclearGeneratingUnit::declare() +{ + return BaseClassDefiner(NuclearGeneratingUnit::addConstructToMap, NuclearGeneratingUnit::addPrimitiveAssignFnsToMap, NuclearGeneratingUnit::addClassAssignFnsToMap, NuclearGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* NuclearGeneratingUnit_factory() + { + return new NuclearGeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp new file mode 100644 index 000000000..81f68a25f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp @@ -0,0 +1,39 @@ +#ifndef NuclearGeneratingUnit_H +#define NuclearGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A nuclear generating unit. + */ + class NuclearGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + NuclearGeneratingUnit(); + ~NuclearGeneratingUnit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NuclearGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp new file mode 100644 index 000000000..469d42fdc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimit.hpp" + +#include +#include + +#include "OperationalLimitSet.hpp" +#include "OperationalLimitType.hpp" + +using namespace CIMPP; + +OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {}; +OperationalLimit::~OperationalLimit() {}; + + + + + +bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass*, BaseClass*); +bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OperationalLimitSet != element2) + { + element->OperationalLimitSet = element2; + return assign_OperationalLimitSet_OperationalLimitValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimitType_OperationalLimit(BaseClass*, BaseClass*); +bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OperationalLimitType != element2) + { + element->OperationalLimitType = element2; + return assign_OperationalLimitType_OperationalLimit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char OperationalLimit::debugName[] = "OperationalLimit"; +const char* OperationalLimit::debugString() const +{ + return OperationalLimit::debugName; +} + +void OperationalLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:OperationalLimit"), &OperationalLimit_factory)); +} + +void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void OperationalLimit::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner OperationalLimit::declare() +{ + return BaseClassDefiner(OperationalLimit::addConstructToMap, OperationalLimit::addPrimitiveAssignFnsToMap, OperationalLimit::addClassAssignFnsToMap, OperationalLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* OperationalLimit_factory() + { + return new OperationalLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp new file mode 100644 index 000000000..42c59f9fc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp @@ -0,0 +1,43 @@ +#ifndef OperationalLimit_H +#define OperationalLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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". + */ + class OperationalLimit : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + OperationalLimit(); + ~OperationalLimit() override; + + CIMPP::OperationalLimitSet* OperationalLimitSet; /* Values of equipment limits. Default: 0 */ + CIMPP::OperationalLimitType* OperationalLimitType; /* The limit type associated with this limit. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OperationalLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp new file mode 100644 index 000000000..4aeb56e6d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimitDirectionKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +OperationalLimitDirectionKind& OperationalLimitDirectionKind::operator=(OperationalLimitDirectionKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +OperationalLimitDirectionKind::operator OperationalLimitDirectionKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char OperationalLimitDirectionKind::debugName[] = "OperationalLimitDirectionKind"; +const char* OperationalLimitDirectionKind::debugString() const +{ + return OperationalLimitDirectionKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, OperationalLimitDirectionKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "high") + { + rop = OperationalLimitDirectionKind::high; + return lop; + } + if(EnumSymbol == "low") + { + rop = OperationalLimitDirectionKind::low; + return lop; + } + if(EnumSymbol == "absoluteValue") + { + rop = OperationalLimitDirectionKind::absoluteValue; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const OperationalLimitDirectionKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == OperationalLimitDirectionKind::high) + { + EnumSymbol = "high"; + } + if (obj.value == OperationalLimitDirectionKind::low) + { + EnumSymbol = "low"; + } + if (obj.value == OperationalLimitDirectionKind::absoluteValue) + { + EnumSymbol = "absoluteValue"; + } + + if (!EnumSymbol.empty()) + { + os << "OperationalLimitDirectionKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp new file mode 100644 index 000000000..33d23f39a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp @@ -0,0 +1,50 @@ +#ifndef OperationalLimitDirectionKind_H +#define OperationalLimitDirectionKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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, + /** + * 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. + */ + absoluteValue, + }; + + OperationalLimitDirectionKind() : value(), initialized(false) {} + OperationalLimitDirectionKind(OperationalLimitDirectionKind_ENUM value) : value(value), initialized(true) {} + + OperationalLimitDirectionKind& operator=(OperationalLimitDirectionKind_ENUM rop); + operator OperationalLimitDirectionKind_ENUM() const; + + OperationalLimitDirectionKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, OperationalLimitDirectionKind& rop); + friend std::ostream& operator<<(std::ostream& os, const OperationalLimitDirectionKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp new file mode 100644 index 000000000..65fd3559f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimitSet.hpp" + +#include +#include + +#include "Equipment.hpp" +#include "OperationalLimit.hpp" +#include "ACDCTerminal.hpp" + +using namespace CIMPP; + +OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {}; +OperationalLimitSet::~OperationalLimitSet() {}; + + + + + + +bool assign_Equipment_OperationalLimitSet(BaseClass*, BaseClass*); +bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + Equipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Equipment != element2) + { + element->Equipment = element2; + return assign_Equipment_OperationalLimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimit_OperationalLimitSet(BaseClass*, BaseClass*); +bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->OperationalLimitValue.begin(), element->OperationalLimitValue.end(), element2) == element->OperationalLimitValue.end()) + { + element->OperationalLimitValue.push_back(element2); + return assign_OperationalLimit_OperationalLimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCTerminal_OperationalLimitSet(BaseClass*, BaseClass*); +bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_OperationalLimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char OperationalLimitSet::debugName[] = "OperationalLimitSet"; +const char* OperationalLimitSet::debugString() const +{ + return OperationalLimitSet::debugName; +} + +void OperationalLimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:OperationalLimitSet"), &OperationalLimitSet_factory)); +} + +void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void OperationalLimitSet::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner OperationalLimitSet::declare() +{ + return BaseClassDefiner(OperationalLimitSet::addConstructToMap, OperationalLimitSet::addPrimitiveAssignFnsToMap, OperationalLimitSet::addClassAssignFnsToMap, OperationalLimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* OperationalLimitSet_factory() + { + return new OperationalLimitSet; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp new file mode 100644 index 000000000..a6a94680b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp @@ -0,0 +1,45 @@ +#ifndef OperationalLimitSet_H +#define OperationalLimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ACDCTerminal; + 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. + */ + class OperationalLimitSet : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OperationalLimitSet_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp new file mode 100644 index 000000000..29ea706ae --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimitType.hpp" + +#include +#include + +#include "OperationalLimit.hpp" +#include "Seconds.hpp" +#include "OperationalLimitDirectionKind.hpp" +#include "LimitTypeKind.hpp" + +using namespace CIMPP; + +OperationalLimitType::OperationalLimitType() {}; +OperationalLimitType::~OperationalLimitType() {}; + + + +bool assign_OperationalLimitType_acceptableDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->acceptableDuration; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OperationalLimitType_direction(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->direction; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OperationalLimitType_limitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->limitType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); +bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + +const char OperationalLimitType::debugName[] = "OperationalLimitType"; +const char* OperationalLimitType::debugString() const +{ + return OperationalLimitType::debugName; +} + +void OperationalLimitType::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OperationalLimitType::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.OperationalLimit"), &assign_OperationalLimitType_OperationalLimit)); +} + +const BaseClassDefiner OperationalLimitType::declare() +{ + return BaseClassDefiner(OperationalLimitType::addConstructToMap, OperationalLimitType::addPrimitiveAssignFnsToMap, OperationalLimitType::addClassAssignFnsToMap, OperationalLimitType::debugName); +} + +namespace CIMPP +{ + BaseClass* OperationalLimitType_factory() + { + return new OperationalLimitType; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp new file mode 100644 index 000000000..6de5044fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp @@ -0,0 +1,47 @@ +#ifndef OperationalLimitType_H +#define OperationalLimitType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "LimitTypeKind.hpp" +#include "OperationalLimitDirectionKind.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class OperationalLimit; + + /* + The operational meaning of a category of limits. + */ + class OperationalLimitType : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OperationalLimitType_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OrientationKind.cpp b/CGMES_2.4.13_18DEC2013/OrientationKind.cpp new file mode 100644 index 000000000..e02a50057 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OrientationKind.cpp @@ -0,0 +1,81 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OrientationKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +OrientationKind& OrientationKind::operator=(OrientationKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +OrientationKind::operator OrientationKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char OrientationKind::debugName[] = "OrientationKind"; +const char* OrientationKind::debugString() const +{ + return OrientationKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, OrientationKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "OrientationKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "negative") + { + rop = OrientationKind::negative; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const OrientationKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == OrientationKind::negative) + { + EnumSymbol = "negative"; + } + + if (!EnumSymbol.empty()) + { + os << "OrientationKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OrientationKind.hpp b/CGMES_2.4.13_18DEC2013/OrientationKind.hpp new file mode 100644 index 000000000..0ab661444 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OrientationKind.hpp @@ -0,0 +1,42 @@ +#ifndef OrientationKind_H +#define OrientationKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + negative, + }; + + OrientationKind() : value(), initialized(false) {} + OrientationKind(OrientationKind_ENUM value) : value(value), initialized(true) {} + + OrientationKind& operator=(OrientationKind_ENUM rop); + operator OrientationKind_ENUM() const; + + OrientationKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, OrientationKind& rop); + friend std::ostream& operator<<(std::ostream& os, const OrientationKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp b/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp new file mode 100644 index 000000000..4b41edb94 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLim2.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +OverexcLim2::OverexcLim2() {}; +OverexcLim2::~OverexcLim2() {}; + + +bool assign_OverexcLim2_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLim2_koi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->koi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLim2_voimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLim2_voimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char OverexcLim2::debugName[] = "OverexcLim2"; +const char* OverexcLim2::debugString() const +{ + return OverexcLim2::debugName; +} + +void OverexcLim2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLim2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLim2::declare() +{ + return BaseClassDefiner(OverexcLim2::addConstructToMap, OverexcLim2::addPrimitiveAssignFnsToMap, OverexcLim2::addClassAssignFnsToMap, OverexcLim2::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLim2_factory() + { + return new OverexcLim2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp b/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp new file mode 100644 index 000000000..5ee4319c4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp @@ -0,0 +1,44 @@ +#ifndef OverexcLim2_H +#define OverexcLim2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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). + */ + class OverexcLim2 : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLim2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp new file mode 100644 index 000000000..10157d970 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLimIEEE.hpp" + +#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() {}; + + +bool assign_OverexcLimIEEE_hyst(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hyst; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_ifdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_itfpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->itfpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_kcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kcd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_kramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kramp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char OverexcLimIEEE::debugName[] = "OverexcLimIEEE"; +const char* OverexcLimIEEE::debugString() const +{ + return OverexcLimIEEE::debugName; +} + +void OverexcLimIEEE::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLimIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLimIEEE::declare() +{ + return BaseClassDefiner(OverexcLimIEEE::addConstructToMap, OverexcLimIEEE::addPrimitiveAssignFnsToMap, OverexcLimIEEE::addClassAssignFnsToMap, OverexcLimIEEE::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLimIEEE_factory() + { + return new OverexcLimIEEE; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp new file mode 100644 index 000000000..8c66e3475 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp @@ -0,0 +1,47 @@ +#ifndef OverexcLimIEEE_H +#define OverexcLimIEEE_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Simple_Float.hpp" + +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. + */ + class OverexcLimIEEE : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLimIEEE_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp b/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp new file mode 100644 index 000000000..ab18dfe51 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLimX1.hpp" + +#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() {}; + + +bool assign_OverexcLimX1_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efddes; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdrated; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlow; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char OverexcLimX1::debugName[] = "OverexcLimX1"; +const char* OverexcLimX1::debugString() const +{ + return OverexcLimX1::debugName; +} + +void OverexcLimX1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLimX1::declare() +{ + return BaseClassDefiner(OverexcLimX1::addConstructToMap, OverexcLimX1::addPrimitiveAssignFnsToMap, OverexcLimX1::addClassAssignFnsToMap, OverexcLimX1::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLimX1_factory() + { + return new OverexcLimX1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp b/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp new file mode 100644 index 000000000..02fe918e3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp @@ -0,0 +1,51 @@ +#ifndef OverexcLimX1_H +#define OverexcLimX1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Field voltage over excitation limiter. + */ + class OverexcLimX1 : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLimX1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp b/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp new file mode 100644 index 000000000..88677bf5f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLimX2.hpp" + +#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() {}; + + +bool assign_OverexcLimX2_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efddes; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdrated; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlow; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char OverexcLimX2::debugName[] = "OverexcLimX2"; +const char* OverexcLimX2::debugString() const +{ + return OverexcLimX2::debugName; +} + +void OverexcLimX2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLimX2::declare() +{ + return BaseClassDefiner(OverexcLimX2::addConstructToMap, OverexcLimX2::addPrimitiveAssignFnsToMap, OverexcLimX2::addClassAssignFnsToMap, OverexcLimX2::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLimX2_factory() + { + return new OverexcLimX2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp b/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp new file mode 100644 index 000000000..2b733c272 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp @@ -0,0 +1,53 @@ +#ifndef OverexcLimX2_H +#define OverexcLimX2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class OverexcLimX2 : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLimX2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp new file mode 100644 index 000000000..a1adf0088 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcitationLimiterDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" + +using namespace CIMPP; + +OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {}; +OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {}; + + + + +bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass*, BaseClass*); +bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char OverexcitationLimiterDynamics::debugName[] = "OverexcitationLimiterDynamics"; +const char* OverexcitationLimiterDynamics::debugString() const +{ + return OverexcitationLimiterDynamics::debugName; +} + +void OverexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics"), &OverexcitationLimiterDynamics_factory)); +} + +void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void OverexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics)); +} + +const BaseClassDefiner OverexcitationLimiterDynamics::declare() +{ + return BaseClassDefiner(OverexcitationLimiterDynamics::addConstructToMap, OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap, OverexcitationLimiterDynamics::addClassAssignFnsToMap, OverexcitationLimiterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcitationLimiterDynamics_factory() + { + return new OverexcitationLimiterDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp new file mode 100644 index 000000000..5fe95ae21 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef OverexcitationLimiterDynamics_H +#define OverexcitationLimiterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + + /* + Overexcitation limiter function block whose behaviour is described by reference to a standard model + */ + class OverexcitationLimiterDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + OverexcitationLimiterDynamics(); + ~OverexcitationLimiterDynamics() override; + + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcitationLimiterDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp new file mode 100644 index 000000000..bd8419785 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcitationLimiterUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {}; +OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {}; + + + +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) +{ + OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char OverexcitationLimiterUserDefined::debugName[] = "OverexcitationLimiterUserDefined"; +const char* OverexcitationLimiterUserDefined::debugString() const +{ + return OverexcitationLimiterUserDefined::debugName; +} + +void OverexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner OverexcitationLimiterUserDefined::declare() +{ + return BaseClassDefiner(OverexcitationLimiterUserDefined::addConstructToMap, OverexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap, OverexcitationLimiterUserDefined::addClassAssignFnsToMap, OverexcitationLimiterUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcitationLimiterUserDefined_factory() + { + return new OverexcitationLimiterUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp new file mode 100644 index 000000000..b86dd5aa0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef OverexcitationLimiterUserDefined_H +#define OverexcitationLimiterUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Overexcitation limiter system function block whose dynamic behaviour is described by + */ + class OverexcitationLimiterUserDefined : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcitationLimiterUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp new file mode 100644 index 000000000..72bd784f3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType1Dynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" +#include "VoltageAdjusterDynamics.hpp" + +using namespace CIMPP; + +PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {}; +PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {}; + + + + + + +bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageAdjusterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageAdjusterDynamics != element2) + { + element->VoltageAdjusterDynamics = element2; + return assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PFVArControllerType1Dynamics::debugName[] = "PFVArControllerType1Dynamics"; +const char* PFVArControllerType1Dynamics::debugString() const +{ + return PFVArControllerType1Dynamics::debugName; +} + +void PFVArControllerType1Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics"), &PFVArControllerType1Dynamics_factory)); +} + +void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner PFVArControllerType1Dynamics::declare() +{ + return BaseClassDefiner(PFVArControllerType1Dynamics::addConstructToMap, PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap, PFVArControllerType1Dynamics::addClassAssignFnsToMap, PFVArControllerType1Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType1Dynamics_factory() + { + return new PFVArControllerType1Dynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp new file mode 100644 index 000000000..2332e70d4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp @@ -0,0 +1,45 @@ +#ifndef PFVArControllerType1Dynamics_H +#define PFVArControllerType1Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + class RemoteInputSignal; + class VoltageAdjusterDynamics; + + /* + Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model + */ + class PFVArControllerType1Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType1Dynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp new file mode 100644 index 000000000..f58a6b228 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType1UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {}; +PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {}; + + + +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) +{ + PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PFVArControllerType1UserDefined::debugName[] = "PFVArControllerType1UserDefined"; +const char* PFVArControllerType1UserDefined::debugString() const +{ + return PFVArControllerType1UserDefined::debugName; +} + +void PFVArControllerType1UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArControllerType1UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner PFVArControllerType1UserDefined::declare() +{ + return BaseClassDefiner(PFVArControllerType1UserDefined::addConstructToMap, PFVArControllerType1UserDefined::addPrimitiveAssignFnsToMap, PFVArControllerType1UserDefined::addClassAssignFnsToMap, PFVArControllerType1UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType1UserDefined_factory() + { + return new PFVArControllerType1UserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp new file mode 100644 index 000000000..29fcc7aa6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef PFVArControllerType1UserDefined_H +#define PFVArControllerType1UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Power Factor or VAr controller Type I function block whose dynamic behaviour is described by + */ + class PFVArControllerType1UserDefined : public PFVArControllerType1Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType1UserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp new file mode 100644 index 000000000..2c2640a53 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType2Dynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" + +using namespace CIMPP; + +PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {}; +PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {}; + + + + +bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PFVArControllerType2Dynamics::debugName[] = "PFVArControllerType2Dynamics"; +const char* PFVArControllerType2Dynamics::debugString() const +{ + return PFVArControllerType2Dynamics::debugName; +} + +void PFVArControllerType2Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics"), &PFVArControllerType2Dynamics_factory)); +} + +void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PFVArControllerType2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics)); +} + +const BaseClassDefiner PFVArControllerType2Dynamics::declare() +{ + return BaseClassDefiner(PFVArControllerType2Dynamics::addConstructToMap, PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap, PFVArControllerType2Dynamics::addClassAssignFnsToMap, PFVArControllerType2Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType2Dynamics_factory() + { + return new PFVArControllerType2Dynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp new file mode 100644 index 000000000..9554f466d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp @@ -0,0 +1,41 @@ +#ifndef PFVArControllerType2Dynamics_H +#define PFVArControllerType2Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + + /* + Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model + */ + class PFVArControllerType2Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + PFVArControllerType2Dynamics(); + ~PFVArControllerType2Dynamics() override; + + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType2Dynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp new file mode 100644 index 000000000..527718fc6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType2UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {}; +PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {}; + + + +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) +{ + PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PFVArControllerType2UserDefined::debugName[] = "PFVArControllerType2UserDefined"; +const char* PFVArControllerType2UserDefined::debugString() const +{ + return PFVArControllerType2UserDefined::debugName; +} + +void PFVArControllerType2UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArControllerType2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner PFVArControllerType2UserDefined::declare() +{ + return BaseClassDefiner(PFVArControllerType2UserDefined::addConstructToMap, PFVArControllerType2UserDefined::addPrimitiveAssignFnsToMap, PFVArControllerType2UserDefined::addClassAssignFnsToMap, PFVArControllerType2UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType2UserDefined_factory() + { + return new PFVArControllerType2UserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp new file mode 100644 index 000000000..9069946a5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef PFVArControllerType2UserDefined_H +#define PFVArControllerType2UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Power Factor or VAr controller Type II function block whose dynamic behaviour is described by + */ + class PFVArControllerType2UserDefined : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType2UserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp new file mode 100644 index 000000000..99455cb7d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType1IEEEPFController.hpp" + +#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() {}; + + +bool assign_PFVArType1IEEEPFController_ovex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ovex; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vitmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpfcbw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpfref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char PFVArType1IEEEPFController::debugName[] = "PFVArType1IEEEPFController"; +const char* PFVArType1IEEEPFController::debugString() const +{ + return PFVArType1IEEEPFController::debugName; +} + +void PFVArType1IEEEPFController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType1IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType1IEEEPFController::declare() +{ + return BaseClassDefiner(PFVArType1IEEEPFController::addConstructToMap, PFVArType1IEEEPFController::addPrimitiveAssignFnsToMap, PFVArType1IEEEPFController::addClassAssignFnsToMap, PFVArType1IEEEPFController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType1IEEEPFController_factory() + { + return new PFVArType1IEEEPFController; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp new file mode 100644 index 000000000..20f16d338 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp @@ -0,0 +1,51 @@ +#ifndef PFVArType1IEEEPFController_H +#define PFVArType1IEEEPFController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class PFVArType1IEEEPFController : public PFVArControllerType1Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType1IEEEPFController_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp new file mode 100644 index 000000000..c45005674 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType1IEEEVArController.hpp" + +#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() {}; + + +bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvarc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvar(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvar; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvarcbw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvarref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char PFVArType1IEEEVArController::debugName[] = "PFVArType1IEEEVArController"; +const char* PFVArType1IEEEVArController::debugString() const +{ + return PFVArType1IEEEVArController::debugName; +} + +void PFVArType1IEEEVArController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType1IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType1IEEEVArController::declare() +{ + return BaseClassDefiner(PFVArType1IEEEVArController::addConstructToMap, PFVArType1IEEEVArController::addPrimitiveAssignFnsToMap, PFVArType1IEEEVArController::addClassAssignFnsToMap, PFVArType1IEEEVArController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType1IEEEVArController_factory() + { + return new PFVArType1IEEEVArController; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp new file mode 100644 index 000000000..9b7e852ff --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp @@ -0,0 +1,48 @@ +#ifndef PFVArType1IEEEVArController_H +#define PFVArType1IEEEVArController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class PFVArType1IEEEVArController : public PFVArControllerType1Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType1IEEEVArController_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp new file mode 100644 index 000000000..706c30675 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType2Common1.hpp" + +#include +#include + +#include "Boolean.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +PFVArType2Common1::PFVArType2Common1() {}; +PFVArType2Common1::~PFVArType2Common1() {}; + + +bool assign_PFVArType2Common1_j(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->j; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_ref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char PFVArType2Common1::debugName[] = "PFVArType2Common1"; +const char* PFVArType2Common1::debugString() const +{ + return PFVArType2Common1::debugName; +} + +void PFVArType2Common1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType2Common1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType2Common1::declare() +{ + return BaseClassDefiner(PFVArType2Common1::addConstructToMap, PFVArType2Common1::addPrimitiveAssignFnsToMap, PFVArType2Common1::addClassAssignFnsToMap, PFVArType2Common1::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType2Common1_factory() + { + return new PFVArType2Common1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp new file mode 100644 index 000000000..0f0520b9e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp @@ -0,0 +1,46 @@ +#ifndef PFVArType2Common1_H +#define PFVArType2Common1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" + +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. + */ + class PFVArType2Common1 : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType2Common1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp new file mode 100644 index 000000000..7310bf23c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType2IEEEPFController.hpp" + +#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() {}; + + +bool assign_PFVArType2IEEEPFController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exlon; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_pfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vclmt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char PFVArType2IEEEPFController::debugName[] = "PFVArType2IEEEPFController"; +const char* PFVArType2IEEEPFController::debugString() const +{ + return PFVArType2IEEEPFController::debugName; +} + +void PFVArType2IEEEPFController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType2IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType2IEEEPFController::declare() +{ + return BaseClassDefiner(PFVArType2IEEEPFController::addConstructToMap, PFVArType2IEEEPFController::addPrimitiveAssignFnsToMap, PFVArType2IEEEPFController::addClassAssignFnsToMap, PFVArType2IEEEPFController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType2IEEEPFController_factory() + { + return new PFVArType2IEEEPFController; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp new file mode 100644 index 000000000..515a7648c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp @@ -0,0 +1,49 @@ +#ifndef PFVArType2IEEEPFController_H +#define PFVArType2IEEEPFController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Simple_Float.hpp" + +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. + */ + class PFVArType2IEEEPFController : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType2IEEEPFController_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp new file mode 100644 index 000000000..eaf3b23a8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType2IEEEVArController.hpp" + +#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() {}; + + +bool assign_PFVArType2IEEEVArController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exlon; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_qref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vclmt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char PFVArType2IEEEVArController::debugName[] = "PFVArType2IEEEVArController"; +const char* PFVArType2IEEEVArController::debugString() const +{ + return PFVArType2IEEEVArController::debugName; +} + +void PFVArType2IEEEVArController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType2IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType2IEEEVArController::declare() +{ + return BaseClassDefiner(PFVArType2IEEEVArController::addConstructToMap, PFVArType2IEEEVArController::addPrimitiveAssignFnsToMap, PFVArType2IEEEVArController::addClassAssignFnsToMap, PFVArType2IEEEVArController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType2IEEEVArController_factory() + { + return new PFVArType2IEEEVArController; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp new file mode 100644 index 000000000..2a1d21455 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp @@ -0,0 +1,49 @@ +#ifndef PFVArType2IEEEVArController_H +#define PFVArType2IEEEVArController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Simple_Float.hpp" + +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. + */ + class PFVArType2IEEEVArController : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType2IEEEVArController_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PU.cpp b/CGMES_2.4.13_18DEC2013/PU.cpp new file mode 100644 index 000000000..2c17173ca --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PU.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PU.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PU& PU::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +PU::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PU::debugName[] = "PU"; +const char* PU::debugString() const +{ + return PU::debugName; +} + +PU& PU::operator+=(const PU& rhs) +{ + value += rhs.value; + return *this; +} + +PU& PU::operator-=(const PU& rhs) +{ + value -= rhs.value; + return *this; +} + +PU& PU::operator*=(const PU& rhs) +{ + value *= rhs.value; + return *this; +} + +PU& PU::operator/=(const PU& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PU& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PU& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PU.hpp b/CGMES_2.4.13_18DEC2013/PU.hpp new file mode 100644 index 000000000..51a1d1117 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PU.hpp @@ -0,0 +1,39 @@ +#ifndef PU_H +#define PU_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. + */ + class PU + { + public: + PU() : value(0.0), initialized(false) {} + PU(long double value) : value(value), initialized(true) {} + + PU& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + PU& operator+=(const PU& rhs); + PU& operator-=(const PU& rhs); + PU& operator*=(const PU& rhs); + PU& operator/=(const PU& rhs); + + friend std::istream& operator>>(std::istream& lop, PU& rop); + friend std::ostream& operator<<(std::ostream& os, const PU& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PerCent.cpp b/CGMES_2.4.13_18DEC2013/PerCent.cpp new file mode 100644 index 000000000..34fe37067 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PerCent.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PerCent.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PerCent& PerCent::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +PerCent::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PerCent::debugName[] = "PerCent"; +const char* PerCent::debugString() const +{ + return PerCent::debugName; +} + +PerCent& PerCent::operator+=(const PerCent& rhs) +{ + value += rhs.value; + return *this; +} + +PerCent& PerCent::operator-=(const PerCent& rhs) +{ + value -= rhs.value; + return *this; +} + +PerCent& PerCent::operator*=(const PerCent& rhs) +{ + value *= rhs.value; + return *this; +} + +PerCent& PerCent::operator/=(const PerCent& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PerCent& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PerCent& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PerCent.hpp b/CGMES_2.4.13_18DEC2013/PerCent.hpp new file mode 100644 index 000000000..67bb36e78 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PerCent.hpp @@ -0,0 +1,39 @@ +#ifndef PerCent_H +#define PerCent_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Percentage on a defined base. For example, specify as 100 to indicate at the defined base. + */ + class PerCent + { + public: + PerCent() : value(0.0), initialized(false) {} + PerCent(long double value) : value(value), initialized(true) {} + + PerCent& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + PerCent& operator+=(const PerCent& rhs); + PerCent& operator-=(const PerCent& rhs); + PerCent& operator*=(const PerCent& rhs); + PerCent& operator/=(const PerCent& rhs); + + friend std::istream& operator>>(std::istream& lop, PerCent& rop); + friend std::ostream& operator<<(std::ostream& os, const PerCent& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp new file mode 100644 index 000000000..f9a4b4015 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PerLengthDCLineParameter.hpp" + +#include +#include + +#include "DCLineSegment.hpp" +#include "CapacitancePerLength.hpp" +#include "InductancePerLength.hpp" +#include "ResistancePerLength.hpp" + +using namespace CIMPP; + +PerLengthDCLineParameter::PerLengthDCLineParameter() {}; +PerLengthDCLineParameter::~PerLengthDCLineParameter() {}; + + + +bool assign_PerLengthDCLineParameter_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PerLengthDCLineParameter_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PerLengthDCLineParameter_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + +const char PerLengthDCLineParameter::debugName[] = "PerLengthDCLineParameter"; +const char* PerLengthDCLineParameter::debugString() const +{ + return PerLengthDCLineParameter::debugName; +} + +void PerLengthDCLineParameter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PerLengthDCLineParameter::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.DCLineSegments"), &assign_PerLengthDCLineParameter_DCLineSegments)); +} + +const BaseClassDefiner PerLengthDCLineParameter::declare() +{ + return BaseClassDefiner(PerLengthDCLineParameter::addConstructToMap, PerLengthDCLineParameter::addPrimitiveAssignFnsToMap, PerLengthDCLineParameter::addClassAssignFnsToMap, PerLengthDCLineParameter::debugName); +} + +namespace CIMPP +{ + BaseClass* PerLengthDCLineParameter_factory() + { + return new PerLengthDCLineParameter; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp new file mode 100644 index 000000000..4f194a716 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp @@ -0,0 +1,44 @@ +#ifndef PerLengthDCLineParameter_H +#define PerLengthDCLineParameter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "CapacitancePerLength.hpp" +#include "InductancePerLength.hpp" +#include "ResistancePerLength.hpp" + +namespace CIMPP +{ + class DCLineSegment; + + class PerLengthDCLineParameter : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PerLengthDCLineParameter_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp b/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp new file mode 100644 index 000000000..d0ab8eb1d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PetersenCoil.hpp" + +#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() {}; + + +bool assign_PetersenCoil_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_nominalU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_offsetCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->offsetCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_positionCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positionCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_xGroundMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xGroundMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_xGroundMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xGroundMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_xGroundNominal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xGroundNominal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char PetersenCoil::debugName[] = "PetersenCoil"; +const char* PetersenCoil::debugString() const +{ + return PetersenCoil::debugName; +} + +void PetersenCoil::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PetersenCoil::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PetersenCoil::declare() +{ + return BaseClassDefiner(PetersenCoil::addConstructToMap, PetersenCoil::addPrimitiveAssignFnsToMap, PetersenCoil::addClassAssignFnsToMap, PetersenCoil::debugName); +} + +namespace CIMPP +{ + BaseClass* PetersenCoil_factory() + { + return new PetersenCoil; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp b/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp new file mode 100644 index 000000000..e4a3b7040 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp @@ -0,0 +1,50 @@ +#ifndef PetersenCoil_H +#define PetersenCoil_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EarthFaultCompensator.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" +#include "PetersenCoilModeKind.hpp" +#include "Reactance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PetersenCoil_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp new file mode 100644 index 000000000..a2e6dcbf7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PetersenCoilModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PetersenCoilModeKind& PetersenCoilModeKind::operator=(PetersenCoilModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +PetersenCoilModeKind::operator PetersenCoilModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PetersenCoilModeKind::debugName[] = "PetersenCoilModeKind"; +const char* PetersenCoilModeKind::debugString() const +{ + return PetersenCoilModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PetersenCoilModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "fixed") + { + rop = PetersenCoilModeKind::fixed; + return lop; + } + if(EnumSymbol == "manual") + { + rop = PetersenCoilModeKind::manual; + return lop; + } + if(EnumSymbol == "automaticPositioning") + { + rop = PetersenCoilModeKind::automaticPositioning; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PetersenCoilModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == PetersenCoilModeKind::fixed) + { + EnumSymbol = "fixed"; + } + if (obj.value == PetersenCoilModeKind::manual) + { + EnumSymbol = "manual"; + } + if (obj.value == PetersenCoilModeKind::automaticPositioning) + { + EnumSymbol = "automaticPositioning"; + } + + if (!EnumSymbol.empty()) + { + os << "PetersenCoilModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp new file mode 100644 index 000000000..6bfff0ea0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp @@ -0,0 +1,50 @@ +#ifndef PetersenCoilModeKind_H +#define PetersenCoilModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The mode of operation for a Petersen coil. + */ + class PetersenCoilModeKind + { + public: + enum PetersenCoilModeKind_ENUM + { + /** + * Fixed position. + */ + fixed, + /** + * Manual positioning. + */ + manual, + /** + * Automatic positioning. + */ + automaticPositioning, + }; + + PetersenCoilModeKind() : value(), initialized(false) {} + PetersenCoilModeKind(PetersenCoilModeKind_ENUM value) : value(value), initialized(true) {} + + PetersenCoilModeKind& operator=(PetersenCoilModeKind_ENUM rop); + operator PetersenCoilModeKind_ENUM() const; + + PetersenCoilModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, PetersenCoilModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const PetersenCoilModeKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseCode.cpp b/CGMES_2.4.13_18DEC2013/PhaseCode.cpp new file mode 100644 index 000000000..49aa040c7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseCode.cpp @@ -0,0 +1,261 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseCode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PhaseCode& PhaseCode::operator=(PhaseCode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +PhaseCode::operator PhaseCode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PhaseCode::debugName[] = "PhaseCode"; +const char* PhaseCode::debugString() const +{ + return PhaseCode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PhaseCode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "PhaseCode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "ABCN") + { + rop = PhaseCode::ABCN; + return lop; + } + if(EnumSymbol == "ABC") + { + rop = PhaseCode::ABC; + return lop; + } + if(EnumSymbol == "ABN") + { + rop = PhaseCode::ABN; + return lop; + } + if(EnumSymbol == "ACN") + { + rop = PhaseCode::ACN; + return lop; + } + if(EnumSymbol == "BCN") + { + rop = PhaseCode::BCN; + return lop; + } + if(EnumSymbol == "AB") + { + rop = PhaseCode::AB; + return lop; + } + if(EnumSymbol == "AC") + { + rop = PhaseCode::AC; + return lop; + } + if(EnumSymbol == "BC") + { + rop = PhaseCode::BC; + return lop; + } + if(EnumSymbol == "AN") + { + rop = PhaseCode::AN; + return lop; + } + if(EnumSymbol == "BN") + { + rop = PhaseCode::BN; + return lop; + } + if(EnumSymbol == "CN") + { + rop = PhaseCode::CN; + return lop; + } + if(EnumSymbol == "A") + { + rop = PhaseCode::A; + return lop; + } + if(EnumSymbol == "B") + { + rop = PhaseCode::B; + return lop; + } + if(EnumSymbol == "C") + { + rop = PhaseCode::C; + return lop; + } + if(EnumSymbol == "N") + { + rop = PhaseCode::N; + return lop; + } + if(EnumSymbol == "s1N") + { + rop = PhaseCode::s1N; + return lop; + } + if(EnumSymbol == "s2N") + { + rop = PhaseCode::s2N; + return lop; + } + if(EnumSymbol == "s12N") + { + rop = PhaseCode::s12N; + return lop; + } + if(EnumSymbol == "s1") + { + rop = PhaseCode::s1; + return lop; + } + if(EnumSymbol == "s2") + { + rop = PhaseCode::s2; + return lop; + } + if(EnumSymbol == "s12") + { + rop = PhaseCode::s12; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PhaseCode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == PhaseCode::ABCN) + { + EnumSymbol = "ABCN"; + } + if (obj.value == PhaseCode::ABC) + { + EnumSymbol = "ABC"; + } + if (obj.value == PhaseCode::ABN) + { + EnumSymbol = "ABN"; + } + if (obj.value == PhaseCode::ACN) + { + EnumSymbol = "ACN"; + } + if (obj.value == PhaseCode::BCN) + { + EnumSymbol = "BCN"; + } + if (obj.value == PhaseCode::AB) + { + EnumSymbol = "AB"; + } + if (obj.value == PhaseCode::AC) + { + EnumSymbol = "AC"; + } + if (obj.value == PhaseCode::BC) + { + EnumSymbol = "BC"; + } + if (obj.value == PhaseCode::AN) + { + EnumSymbol = "AN"; + } + if (obj.value == PhaseCode::BN) + { + EnumSymbol = "BN"; + } + if (obj.value == PhaseCode::CN) + { + EnumSymbol = "CN"; + } + if (obj.value == PhaseCode::A) + { + EnumSymbol = "A"; + } + if (obj.value == PhaseCode::B) + { + EnumSymbol = "B"; + } + if (obj.value == PhaseCode::C) + { + EnumSymbol = "C"; + } + if (obj.value == PhaseCode::N) + { + EnumSymbol = "N"; + } + if (obj.value == PhaseCode::s1N) + { + EnumSymbol = "s1N"; + } + if (obj.value == PhaseCode::s2N) + { + EnumSymbol = "s2N"; + } + if (obj.value == PhaseCode::s12N) + { + EnumSymbol = "s12N"; + } + if (obj.value == PhaseCode::s1) + { + EnumSymbol = "s1"; + } + if (obj.value == PhaseCode::s2) + { + EnumSymbol = "s2"; + } + if (obj.value == PhaseCode::s12) + { + EnumSymbol = "s12"; + } + + if (!EnumSymbol.empty()) + { + os << "PhaseCode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseCode.hpp b/CGMES_2.4.13_18DEC2013/PhaseCode.hpp new file mode 100644 index 000000000..37a523ed2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseCode.hpp @@ -0,0 +1,122 @@ +#ifndef PhaseCode_H +#define PhaseCode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +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. + */ + class PhaseCode + { + public: + enum PhaseCode_ENUM + { + /** + * Phases A, B, C, and N. + */ + ABCN, + /** + * Phases A, B, and C. + */ + ABC, + /** + * Phases A, B, and neutral. + */ + ABN, + /** + * Phases A, C and neutral. + */ + ACN, + /** + * Phases B, C, and neutral. + */ + BCN, + /** + * Phases A and B. + */ + AB, + /** + * Phases A and C. + */ + AC, + /** + * Phases B and C. + */ + BC, + /** + * Phases A and neutral. + */ + AN, + /** + * Phases B and neutral. + */ + BN, + /** + * Phases C and neutral. + */ + CN, + /** + * Phase A. + */ + A, + /** + * Phase B. + */ + B, + /** + * Phase C. + */ + C, + /** + * Neutral phase. + */ + N, + /** + * Secondary phase 1 and neutral. + */ + s1N, + /** + * Secondary phase 2 and neutral. + */ + s2N, + /** + * Secondary phases 1, 2, and neutral. + */ + s12N, + /** + * Secondary phase 1. + */ + s1, + /** + * Secondary phase 2. + */ + s2, + /** + * Secondary phase 1 and 2. + */ + s12, + }; + + PhaseCode() : value(), initialized(false) {} + PhaseCode(PhaseCode_ENUM value) : value(value), initialized(true) {} + + PhaseCode& operator=(PhaseCode_ENUM rop); + operator PhaseCode_ENUM() const; + + PhaseCode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, PhaseCode& rop); + friend std::ostream& operator<<(std::ostream& os, const PhaseCode& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp new file mode 100644 index 000000000..709d1c4c2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChanger.hpp" + +#include +#include + +#include "TransformerEnd.hpp" + +using namespace CIMPP; + +PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {}; +PhaseTapChanger::~PhaseTapChanger() {}; + + + + +bool assign_TransformerEnd_PhaseTapChanger(BaseClass*, BaseClass*); +bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TransformerEnd != element2) + { + element->TransformerEnd = element2; + return assign_TransformerEnd_PhaseTapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PhaseTapChanger::debugName[] = "PhaseTapChanger"; +const char* PhaseTapChanger::debugString() const +{ + return PhaseTapChanger::debugName; +} + +void PhaseTapChanger::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChanger"), &PhaseTapChanger_factory)); +} + +void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PhaseTapChanger.TransformerEnd"), &assign_PhaseTapChanger_TransformerEnd)); +} + +const BaseClassDefiner PhaseTapChanger::declare() +{ + return BaseClassDefiner(PhaseTapChanger::addConstructToMap, PhaseTapChanger::addPrimitiveAssignFnsToMap, PhaseTapChanger::addClassAssignFnsToMap, PhaseTapChanger::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChanger_factory() + { + return new PhaseTapChanger; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp new file mode 100644 index 000000000..0fef3584e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp @@ -0,0 +1,41 @@ +#ifndef PhaseTapChanger_H +#define PhaseTapChanger_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChanger.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PhaseTapChanger : public TapChanger + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChanger(); + ~PhaseTapChanger() override; + + CIMPP::TransformerEnd* TransformerEnd; /* Phase tap changer associated with this transformer end. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChanger_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp new file mode 100644 index 000000000..d56507fe1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerAsymmetrical.hpp" + +#include +#include + +#include "AngleDegrees.hpp" + +using namespace CIMPP; + +PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {}; +PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {}; + + +bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->windingConnectionAngle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char PhaseTapChangerAsymmetrical::debugName[] = "PhaseTapChangerAsymmetrical"; +const char* PhaseTapChangerAsymmetrical::debugString() const +{ + return PhaseTapChangerAsymmetrical::debugName; +} + +void PhaseTapChangerAsymmetrical::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerAsymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerAsymmetrical::declare() +{ + return BaseClassDefiner(PhaseTapChangerAsymmetrical::addConstructToMap, PhaseTapChangerAsymmetrical::addPrimitiveAssignFnsToMap, PhaseTapChangerAsymmetrical::addClassAssignFnsToMap, PhaseTapChangerAsymmetrical::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerAsymmetrical_factory() + { + return new PhaseTapChangerAsymmetrical; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp new file mode 100644 index 000000000..1b341e379 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp @@ -0,0 +1,41 @@ +#ifndef PhaseTapChangerAsymmetrical_H +#define PhaseTapChangerAsymmetrical_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChangerNonLinear.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" + +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. + */ + class PhaseTapChangerAsymmetrical : public PhaseTapChangerNonLinear + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerAsymmetrical_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp new file mode 100644 index 000000000..aebc14b4b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerLinear.hpp" + +#include +#include + +#include "AngleDegrees.hpp" +#include "Reactance.hpp" +#include "Reactance.hpp" + +using namespace CIMPP; + +PhaseTapChangerLinear::PhaseTapChangerLinear() {}; +PhaseTapChangerLinear::~PhaseTapChangerLinear() {}; + + +bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->stepPhaseShiftIncrement; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char PhaseTapChangerLinear::debugName[] = "PhaseTapChangerLinear"; +const char* PhaseTapChangerLinear::debugString() const +{ + return PhaseTapChangerLinear::debugName; +} + +void PhaseTapChangerLinear::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerLinear::declare() +{ + return BaseClassDefiner(PhaseTapChangerLinear::addConstructToMap, PhaseTapChangerLinear::addPrimitiveAssignFnsToMap, PhaseTapChangerLinear::addClassAssignFnsToMap, PhaseTapChangerLinear::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerLinear_factory() + { + return new PhaseTapChangerLinear; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp new file mode 100644 index 000000000..8efa03f19 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp @@ -0,0 +1,44 @@ +#ifndef PhaseTapChangerLinear_H +#define PhaseTapChangerLinear_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChanger.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Reactance.hpp" + +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. + */ + class PhaseTapChangerLinear : public PhaseTapChanger + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerLinear_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp new file mode 100644 index 000000000..10a2c21f0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerNonLinear.hpp" + +#include +#include + +#include "PerCent.hpp" +#include "Reactance.hpp" +#include "Reactance.hpp" + +using namespace CIMPP; + +PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {}; +PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {}; + + +bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageStepIncrement; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char PhaseTapChangerNonLinear::debugName[] = "PhaseTapChangerNonLinear"; +const char* PhaseTapChangerNonLinear::debugString() const +{ + return PhaseTapChangerNonLinear::debugName; +} + +void PhaseTapChangerNonLinear::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerNonLinear::declare() +{ + return BaseClassDefiner(PhaseTapChangerNonLinear::addConstructToMap, PhaseTapChangerNonLinear::addPrimitiveAssignFnsToMap, PhaseTapChangerNonLinear::addClassAssignFnsToMap, PhaseTapChangerNonLinear::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerNonLinear_factory() + { + return new PhaseTapChangerNonLinear; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp new file mode 100644 index 000000000..6b220652b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp @@ -0,0 +1,44 @@ +#ifndef PhaseTapChangerNonLinear_H +#define PhaseTapChangerNonLinear_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChanger.hpp" +#include "BaseClassDefiner.hpp" +#include "PerCent.hpp" +#include "Reactance.hpp" + +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. + */ + class PhaseTapChangerNonLinear : public PhaseTapChanger + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerNonLinear_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp new file mode 100644 index 000000000..349239582 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerSymmetrical.hpp" + +#include +#include + + +using namespace CIMPP; + +PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {}; +PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {}; + + + +const char PhaseTapChangerSymmetrical::debugName[] = "PhaseTapChangerSymmetrical"; +const char* PhaseTapChangerSymmetrical::debugString() const +{ + return PhaseTapChangerSymmetrical::debugName; +} + +void PhaseTapChangerSymmetrical::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerSymmetrical"), &PhaseTapChangerSymmetrical_factory)); +} + +void PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChangerSymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerSymmetrical::declare() +{ + return BaseClassDefiner(PhaseTapChangerSymmetrical::addConstructToMap, PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap, PhaseTapChangerSymmetrical::addClassAssignFnsToMap, PhaseTapChangerSymmetrical::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerSymmetrical_factory() + { + return new PhaseTapChangerSymmetrical; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp new file mode 100644 index 000000000..613a8040d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp @@ -0,0 +1,39 @@ +#ifndef PhaseTapChangerSymmetrical_H +#define PhaseTapChangerSymmetrical_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChangerNonLinear.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PhaseTapChangerSymmetrical : public PhaseTapChangerNonLinear + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChangerSymmetrical(); + ~PhaseTapChangerSymmetrical() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerSymmetrical_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp new file mode 100644 index 000000000..e47a0b148 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerTable.hpp" + +#include +#include + +#include "PhaseTapChangerTablePoint.hpp" +#include "PhaseTapChangerTabular.hpp" + +using namespace CIMPP; + +PhaseTapChangerTable::PhaseTapChangerTable() {}; +PhaseTapChangerTable::~PhaseTapChangerTable() {}; + + + + + +bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass*, BaseClass*); +bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTablePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->PhaseTapChangerTablePoint.begin(), element->PhaseTapChangerTablePoint.end(), element2) == element->PhaseTapChangerTablePoint.end()) + { + element->PhaseTapChangerTablePoint.push_back(element2); + return assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass*, BaseClass*); +bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTabular* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->PhaseTapChangerTabular.begin(), element->PhaseTapChangerTabular.end(), element2) == element->PhaseTapChangerTabular.end()) + { + element->PhaseTapChangerTabular.push_back(element2); + return assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PhaseTapChangerTable::debugName[] = "PhaseTapChangerTable"; +const char* PhaseTapChangerTable::debugString() const +{ + return PhaseTapChangerTable::debugName; +} + +void PhaseTapChangerTable::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable"), &PhaseTapChangerTable_factory)); +} + +void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChangerTable::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner PhaseTapChangerTable::declare() +{ + return BaseClassDefiner(PhaseTapChangerTable::addConstructToMap, PhaseTapChangerTable::addPrimitiveAssignFnsToMap, PhaseTapChangerTable::addClassAssignFnsToMap, PhaseTapChangerTable::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerTable_factory() + { + return new PhaseTapChangerTable; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp new file mode 100644 index 000000000..7db6e7ccd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp @@ -0,0 +1,43 @@ +#ifndef PhaseTapChangerTable_H +#define PhaseTapChangerTable_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class PhaseTapChangerTablePoint; + class PhaseTapChangerTabular; + + /* + Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. + */ + class PhaseTapChangerTable : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerTable_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp new file mode 100644 index 000000000..ac94e617a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerTablePoint.hpp" + +#include +#include + +#include "PhaseTapChangerTable.hpp" +#include "AngleDegrees.hpp" + +using namespace CIMPP; + +PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {}; +PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {}; + + + +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) +{ + PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PhaseTapChangerTable != element2) + { + element->PhaseTapChangerTable = element2; + return assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PhaseTapChangerTablePoint::debugName[] = "PhaseTapChangerTablePoint"; +const char* PhaseTapChangerTablePoint::debugString() const +{ + return PhaseTapChangerTablePoint::debugName; +} + +void PhaseTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable"), &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable)); +} + +const BaseClassDefiner PhaseTapChangerTablePoint::declare() +{ + return BaseClassDefiner(PhaseTapChangerTablePoint::addConstructToMap, PhaseTapChangerTablePoint::addPrimitiveAssignFnsToMap, PhaseTapChangerTablePoint::addClassAssignFnsToMap, PhaseTapChangerTablePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerTablePoint_factory() + { + return new PhaseTapChangerTablePoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp new file mode 100644 index 000000000..1b17e183c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp @@ -0,0 +1,43 @@ +#ifndef PhaseTapChangerTablePoint_H +#define PhaseTapChangerTablePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChangerTablePoint.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" + +namespace CIMPP +{ + class PhaseTapChangerTable; + + /* + Describes each tap step in the phase tap changer tabular curve. + */ + class PhaseTapChangerTablePoint : public TapChangerTablePoint + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChangerTablePoint(); + ~PhaseTapChangerTablePoint() override; + + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The table of this point. Default: 0 */ + CIMPP::AngleDegrees angle; /* The angle difference in degrees. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerTablePoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp new file mode 100644 index 000000000..a270307cc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerTabular.hpp" + +#include +#include + +#include "PhaseTapChangerTable.hpp" + +using namespace CIMPP; + +PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {}; +PhaseTapChangerTabular::~PhaseTapChangerTabular() {}; + + + + +bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass*, BaseClass*); +bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PhaseTapChangerTable != element2) + { + element->PhaseTapChangerTable = element2; + return assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PhaseTapChangerTabular::debugName[] = "PhaseTapChangerTabular"; +const char* PhaseTapChangerTabular::debugString() const +{ + return PhaseTapChangerTabular::debugName; +} + +void PhaseTapChangerTabular::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular"), &PhaseTapChangerTabular_factory)); +} + +void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChangerTabular::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular.PhaseTapChangerTable"), &assign_PhaseTapChangerTabular_PhaseTapChangerTable)); +} + +const BaseClassDefiner PhaseTapChangerTabular::declare() +{ + return BaseClassDefiner(PhaseTapChangerTabular::addConstructToMap, PhaseTapChangerTabular::addPrimitiveAssignFnsToMap, PhaseTapChangerTabular::addClassAssignFnsToMap, PhaseTapChangerTabular::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerTabular_factory() + { + return new PhaseTapChangerTabular; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp new file mode 100644 index 000000000..cbcc23f91 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp @@ -0,0 +1,38 @@ +#ifndef PhaseTapChangerTabular_H +#define PhaseTapChangerTabular_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChanger.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class PhaseTapChangerTable; + + class PhaseTapChangerTabular : public PhaseTapChanger + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChangerTabular(); + ~PhaseTapChangerTabular() override; + + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The phase tap changer table for this phase tap changer. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerTabular_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PositionPoint.cpp b/CGMES_2.4.13_18DEC2013/PositionPoint.cpp new file mode 100644 index 000000000..541093398 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PositionPoint.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PositionPoint.hpp" + +#include +#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() {}; + + + +bool assign_PositionPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sequenceNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PositionPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->xPosition = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PositionPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->yPosition = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PositionPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->zPosition = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + +const char PositionPoint::debugName[] = "PositionPoint"; +const char* PositionPoint::debugString() const +{ + return PositionPoint::debugName; +} + +void PositionPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PositionPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PositionPoint.Location"), &assign_PositionPoint_Location)); +} + +const BaseClassDefiner PositionPoint::declare() +{ + return BaseClassDefiner(PositionPoint::addConstructToMap, PositionPoint::addPrimitiveAssignFnsToMap, PositionPoint::addClassAssignFnsToMap, PositionPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* PositionPoint_factory() + { + return new PositionPoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PositionPoint.hpp b/CGMES_2.4.13_18DEC2013/PositionPoint.hpp new file mode 100644 index 000000000..47dcc5897 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PositionPoint.hpp @@ -0,0 +1,47 @@ +#ifndef PositionPoint_H +#define PositionPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "String.hpp" + +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). + */ + class PositionPoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PositionPoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp b/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp new file mode 100644 index 000000000..26147d3d1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerSystemResource.hpp" + +#include +#include + +#include "Control.hpp" +#include "Location.hpp" +#include "Measurement.hpp" + +using namespace CIMPP; + +PowerSystemResource::PowerSystemResource() : Location(nullptr) {}; +PowerSystemResource::~PowerSystemResource() {}; + + + + + + +bool assign_Control_PowerSystemResource(BaseClass*, BaseClass*); +bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemResource* element = dynamic_cast(BaseClass_ptr1); + Control* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Controls.begin(), element->Controls.end(), element2) == element->Controls.end()) + { + element->Controls.push_back(element2); + return assign_Control_PowerSystemResource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Location_PowerSystemResources(BaseClass*, BaseClass*); +bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemResource* 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_PowerSystemResources(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Measurement_PowerSystemResource(BaseClass*, BaseClass*); +bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemResource* element = dynamic_cast(BaseClass_ptr1); + Measurement* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Measurement_PowerSystemResource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PowerSystemResource::debugName[] = "PowerSystemResource"; +const char* PowerSystemResource::debugString() const +{ + return PowerSystemResource::debugName; +} + +void PowerSystemResource::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PowerSystemResource"), &PowerSystemResource_factory)); +} + +void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PowerSystemResource::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner PowerSystemResource::declare() +{ + return BaseClassDefiner(PowerSystemResource::addConstructToMap, PowerSystemResource::addPrimitiveAssignFnsToMap, PowerSystemResource::addClassAssignFnsToMap, PowerSystemResource::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerSystemResource_factory() + { + return new PowerSystemResource; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp b/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp new file mode 100644 index 000000000..2982f8905 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp @@ -0,0 +1,45 @@ +#ifndef PowerSystemResource_H +#define PowerSystemResource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Control; + 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. + */ + class PowerSystemResource : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerSystemResource_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp new file mode 100644 index 000000000..11444bd4f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerSystemStabilizerDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {}; +PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); +bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); +bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RemoteInputSignal.begin(), element->RemoteInputSignal.end(), element2) == element->RemoteInputSignal.end()) + { + element->RemoteInputSignal.push_back(element2); + return assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PowerSystemStabilizerDynamics::debugName[] = "PowerSystemStabilizerDynamics"; +const char* PowerSystemStabilizerDynamics::debugString() const +{ + return PowerSystemStabilizerDynamics::debugName; +} + +void PowerSystemStabilizerDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics"), &PowerSystemStabilizerDynamics_factory)); +} + +void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner PowerSystemStabilizerDynamics::declare() +{ + return BaseClassDefiner(PowerSystemStabilizerDynamics::addConstructToMap, PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap, PowerSystemStabilizerDynamics::addClassAssignFnsToMap, PowerSystemStabilizerDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerSystemStabilizerDynamics_factory() + { + return new PowerSystemStabilizerDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp new file mode 100644 index 000000000..c337743ac --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef PowerSystemStabilizerDynamics_H +#define PowerSystemStabilizerDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + class RemoteInputSignal; + + /* + Power system stabilizer function block whose behaviour is described by reference to a standard model + */ + class PowerSystemStabilizerDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerSystemStabilizerDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp new file mode 100644 index 000000000..06d039cf4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerSystemStabilizerUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {}; +PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {}; + + + +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) +{ + PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PowerSystemStabilizerUserDefined::debugName[] = "PowerSystemStabilizerUserDefined"; +const char* PowerSystemStabilizerUserDefined::debugString() const +{ + return PowerSystemStabilizerUserDefined::debugName; +} + +void PowerSystemStabilizerUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerSystemStabilizerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics"), &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner PowerSystemStabilizerUserDefined::declare() +{ + return BaseClassDefiner(PowerSystemStabilizerUserDefined::addConstructToMap, PowerSystemStabilizerUserDefined::addPrimitiveAssignFnsToMap, PowerSystemStabilizerUserDefined::addClassAssignFnsToMap, PowerSystemStabilizerUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerSystemStabilizerUserDefined_factory() + { + return new PowerSystemStabilizerUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp new file mode 100644 index 000000000..2eec1b070 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef PowerSystemStabilizerUserDefined_H +#define PowerSystemStabilizerUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + function block whose dynamic behaviour is described by + */ + class PowerSystemStabilizerUserDefined : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerSystemStabilizerUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp b/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp new file mode 100644 index 000000000..1eda73bf1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp @@ -0,0 +1,163 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerTransformer.hpp" + +#include +#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() {}; + + + +bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->beforeShCircuitHighestOperatingCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->beforeShCircuitHighestOperatingVoltage; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->beforeShortCircuitAnglePf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->highSideMinOperatingU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isPartOfGeneratorUnit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operationalValuesConsidered; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + + +const char PowerTransformer::debugName[] = "PowerTransformer"; +const char* PowerTransformer::debugString() const +{ + return PowerTransformer::debugName; +} + +void PowerTransformer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.PowerTransformerEnd"), &assign_PowerTransformer_PowerTransformerEnd)); +} + +const BaseClassDefiner PowerTransformer::declare() +{ + return BaseClassDefiner(PowerTransformer::addConstructToMap, PowerTransformer::addPrimitiveAssignFnsToMap, PowerTransformer::addClassAssignFnsToMap, PowerTransformer::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerTransformer_factory() + { + return new PowerTransformer; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp b/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp new file mode 100644 index 000000000..56bc0318e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp @@ -0,0 +1,51 @@ +#ifndef PowerTransformer_H +#define PowerTransformer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Voltage.hpp" + +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. + */ + class PowerTransformer : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerTransformer_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp new file mode 100644 index 000000000..e103ba044 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp @@ -0,0 +1,259 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerTransformerEnd.hpp" + +#include +#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() {}; + + + +bool assign_PowerTransformerEnd_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_connectionKind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->connectionKind; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->phaseAngleClock; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + +const char PowerTransformerEnd::debugName[] = "PowerTransformerEnd"; +const char* PowerTransformerEnd::debugString() const +{ + return PowerTransformerEnd::debugName; +} + +void PowerTransformerEnd::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerTransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.PowerTransformer"), &assign_PowerTransformerEnd_PowerTransformer)); +} + +const BaseClassDefiner PowerTransformerEnd::declare() +{ + return BaseClassDefiner(PowerTransformerEnd::addConstructToMap, PowerTransformerEnd::addPrimitiveAssignFnsToMap, PowerTransformerEnd::addClassAssignFnsToMap, PowerTransformerEnd::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerTransformerEnd_factory() + { + return new PowerTransformerEnd; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp new file mode 100644 index 000000000..916101b87 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp @@ -0,0 +1,61 @@ +#ifndef PowerTransformerEnd_H +#define PowerTransformerEnd_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TransformerEnd.hpp" +#include "BaseClassDefiner.hpp" +#include "ApparentPower.hpp" +#include "Conductance.hpp" +#include "Integer.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Susceptance.hpp" +#include "Voltage.hpp" +#include "WindingConnection.hpp" + +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. + */ + class PowerTransformerEnd : public TransformerEnd + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerTransformerEnd_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp new file mode 100644 index 000000000..26aa16fbd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp @@ -0,0 +1,471 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ProprietaryParameterDynamics.hpp" + +#include +#include + +#include "AsynchronousMachineUserDefined.hpp" +#include "DiscontinuousExcitationControlUserDefined.hpp" +#include "ExcitationSystemUserDefined.hpp" +#include "LoadUserDefined.hpp" +#include "MechanicalLoadUserDefined.hpp" +#include "OverexcitationLimiterUserDefined.hpp" +#include "PFVArControllerType1UserDefined.hpp" +#include "PFVArControllerType2UserDefined.hpp" +#include "PowerSystemStabilizerUserDefined.hpp" +#include "SynchronousMachineUserDefined.hpp" +#include "TurbineGovernorUserDefined.hpp" +#include "TurbineLoadControllerUserDefined.hpp" +#include "UnderexcitationLimiterUserDefined.hpp" +#include "VoltageAdjusterUserDefined.hpp" +#include "VoltageCompensatorUserDefined.hpp" +#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() {}; + + + + + + + + + + + + + + + + + + + + +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) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachineUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachineUserDefined != element2) + { + element->AsynchronousMachineUserDefined = element2; + return assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + DiscontinuousExcitationControlUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscontinuousExcitationControlUserDefined != element2) + { + element->DiscontinuousExcitationControlUserDefined = element2; + return assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemUserDefined != element2) + { + element->ExcitationSystemUserDefined = element2; + return assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + LoadUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadUserDefined != element2) + { + element->LoadUserDefined = element2; + return assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + MechanicalLoadUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MechanicalLoadUserDefined != element2) + { + element->MechanicalLoadUserDefined = element2; + return assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + OverexcitationLimiterUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OverexcitationLimiterUserDefined != element2) + { + element->OverexcitationLimiterUserDefined = element2; + return assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1UserDefined != element2) + { + element->PFVArControllerType1UserDefined = element2; + return assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType2UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType2UserDefined != element2) + { + element->PFVArControllerType2UserDefined = element2; + return assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + PowerSystemStabilizerUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemStabilizerUserDefined != element2) + { + element->PowerSystemStabilizerUserDefined = element2; + return assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachineUserDefined != element2) + { + element->SynchronousMachineUserDefined = element2; + return assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineGovernorUserDefined != element2) + { + element->TurbineGovernorUserDefined = element2; + return assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineLoadControllerUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineLoadControllerUserDefined != element2) + { + element->TurbineLoadControllerUserDefined = element2; + return assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + UnderexcitationLimiterUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->UnderexcitationLimiterUserDefined != element2) + { + element->UnderexcitationLimiterUserDefined = element2; + return assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageAdjusterUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageAdjusterUserDefined != element2) + { + element->VoltageAdjusterUserDefined = element2; + return assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageCompensatorUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageCompensatorUserDefined != element2) + { + element->VoltageCompensatorUserDefined = element2; + return assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + WindPlantUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantUserDefined != element2) + { + element->WindPlantUserDefined = element2; + return assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + WindType1or2UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindType1or2UserDefined != element2) + { + element->WindType1or2UserDefined = element2; + return assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + WindType3or4UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindType3or4UserDefined != element2) + { + element->WindType3or4UserDefined = element2; + return assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char ProprietaryParameterDynamics::debugName[] = "ProprietaryParameterDynamics"; +const char* ProprietaryParameterDynamics::debugString() const +{ + return ProprietaryParameterDynamics::debugName; +} + +void ProprietaryParameterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ProprietaryParameterDynamics::declare() +{ + return BaseClassDefiner(ProprietaryParameterDynamics::addConstructToMap, ProprietaryParameterDynamics::addPrimitiveAssignFnsToMap, ProprietaryParameterDynamics::addClassAssignFnsToMap, ProprietaryParameterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* ProprietaryParameterDynamics_factory() + { + return new ProprietaryParameterDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp new file mode 100644 index 000000000..658832137 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp @@ -0,0 +1,82 @@ +#ifndef ProprietaryParameterDynamics_H +#define ProprietaryParameterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class AsynchronousMachineUserDefined; + class DiscontinuousExcitationControlUserDefined; + class ExcitationSystemUserDefined; + class LoadUserDefined; + class MechanicalLoadUserDefined; + class OverexcitationLimiterUserDefined; + class PFVArControllerType1UserDefined; + class PFVArControllerType2UserDefined; + class PowerSystemStabilizerUserDefined; + class SynchronousMachineUserDefined; + class TurbineGovernorUserDefined; + class TurbineLoadControllerUserDefined; + class UnderexcitationLimiterUserDefined; + class VoltageAdjusterUserDefined; + class VoltageCompensatorUserDefined; + class WindPlantUserDefined; + 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. + */ + class ProprietaryParameterDynamics : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ProprietaryParameterDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp new file mode 100644 index 000000000..f95614e29 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ProtectedSwitch.hpp" + +#include +#include + + +using namespace CIMPP; + +ProtectedSwitch::ProtectedSwitch() {}; +ProtectedSwitch::~ProtectedSwitch() {}; + + + +const char ProtectedSwitch::debugName[] = "ProtectedSwitch"; +const char* ProtectedSwitch::debugString() const +{ + return ProtectedSwitch::debugName; +} + +void ProtectedSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ProtectedSwitch"), &ProtectedSwitch_factory)); +} + +void ProtectedSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ProtectedSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ProtectedSwitch::declare() +{ + return BaseClassDefiner(ProtectedSwitch::addConstructToMap, ProtectedSwitch::addPrimitiveAssignFnsToMap, ProtectedSwitch::addClassAssignFnsToMap, ProtectedSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* ProtectedSwitch_factory() + { + return new ProtectedSwitch; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp new file mode 100644 index 000000000..8d2eaa266 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp @@ -0,0 +1,39 @@ +#ifndef ProtectedSwitch_H +#define ProtectedSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. + */ + class ProtectedSwitch : public Switch + { + public: + /* constructor initialising all attributes to null */ + ProtectedSwitch(); + ~ProtectedSwitch() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ProtectedSwitch_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Pss1.cpp b/CGMES_2.4.13_18DEC2013/Pss1.cpp new file mode 100644 index 000000000..fa673e0a4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss1.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss1.hpp" + +#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() {}; + + +bool assign_Pss1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_kw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadat; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char Pss1::debugName[] = "Pss1"; +const char* Pss1::debugString() const +{ + return Pss1::debugName; +} + +void Pss1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss1::declare() +{ + return BaseClassDefiner(Pss1::addConstructToMap, Pss1::addPrimitiveAssignFnsToMap, Pss1::addClassAssignFnsToMap, Pss1::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss1_factory() + { + return new Pss1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Pss1.hpp b/CGMES_2.4.13_18DEC2013/Pss1.hpp new file mode 100644 index 000000000..a9ee1a7a2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss1.hpp @@ -0,0 +1,58 @@ +#ifndef Pss1_H +#define Pss1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Italian PSS - three input PSS (speed, frequency, power). + */ + class Pss1 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Pss1A.cpp b/CGMES_2.4.13_18DEC2013/Pss1A.cpp new file mode 100644 index 000000000..ee79e3569 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss1A.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss1A.hpp" + +#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() {}; + + +bool assign_Pss1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignalType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_tdelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdelay; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char Pss1A::debugName[] = "Pss1A"; +const char* Pss1A::debugString() const +{ + return Pss1A::debugName; +} + +void Pss1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss1A::declare() +{ + return BaseClassDefiner(Pss1A::addConstructToMap, Pss1A::addPrimitiveAssignFnsToMap, Pss1A::addClassAssignFnsToMap, Pss1A::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss1A_factory() + { + return new Pss1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Pss1A.hpp b/CGMES_2.4.13_18DEC2013/Pss1A.hpp new file mode 100644 index 000000000..721f252b4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss1A.hpp @@ -0,0 +1,65 @@ +#ifndef Pss1A_H +#define Pss1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class Pss1A : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Pss2B.cpp b/CGMES_2.4.13_18DEC2013/Pss2B.cpp new file mode 100644 index 000000000..33695f70a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss2B.cpp @@ -0,0 +1,543 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss2B.hpp" + +#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() {}; + + +bool assign_Pss2B_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->n; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char Pss2B::debugName[] = "Pss2B"; +const char* Pss2B::debugString() const +{ + return Pss2B::debugName; +} + +void Pss2B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss2B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss2B::declare() +{ + return BaseClassDefiner(Pss2B::addConstructToMap, Pss2B::addPrimitiveAssignFnsToMap, Pss2B::addClassAssignFnsToMap, Pss2B::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss2B_factory() + { + return new Pss2B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Pss2B.hpp b/CGMES_2.4.13_18DEC2013/Pss2B.hpp new file mode 100644 index 000000000..f2ee1801e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss2B.hpp @@ -0,0 +1,75 @@ +#ifndef Pss2B_H +#define Pss2B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). + */ + class Pss2B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss2B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Pss2ST.cpp b/CGMES_2.4.13_18DEC2013/Pss2ST.cpp new file mode 100644 index 000000000..b29e480e2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss2ST.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss2ST.hpp" + +#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() {}; + + +bool assign_Pss2ST_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_lsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_lsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char Pss2ST::debugName[] = "Pss2ST"; +const char* Pss2ST::debugString() const +{ + return Pss2ST::debugName; +} + +void Pss2ST::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss2ST::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss2ST::declare() +{ + return BaseClassDefiner(Pss2ST::addConstructToMap, Pss2ST::addPrimitiveAssignFnsToMap, Pss2ST::addClassAssignFnsToMap, Pss2ST::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss2ST_factory() + { + return new Pss2ST; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Pss2ST.hpp b/CGMES_2.4.13_18DEC2013/Pss2ST.hpp new file mode 100644 index 000000000..56559ab5b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss2ST.hpp @@ -0,0 +1,60 @@ +#ifndef Pss2ST_H +#define Pss2ST_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PTI Microprocessor-Based Stabilizer type 1. + */ + class Pss2ST : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss2ST_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Pss5.cpp b/CGMES_2.4.13_18DEC2013/Pss5.cpp new file mode 100644 index 000000000..370b2014f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss5.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss5.hpp" + +#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() {}; + + +bool assign_Pss5_ctw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ctw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_deadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->deadband; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_isfreq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isfreq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_kpss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_pmm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadat; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char Pss5::debugName[] = "Pss5"; +const char* Pss5::debugString() const +{ + return Pss5::debugName; +} + +void Pss5::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss5::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss5::declare() +{ + return BaseClassDefiner(Pss5::addConstructToMap, Pss5::addPrimitiveAssignFnsToMap, Pss5::addClassAssignFnsToMap, Pss5::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss5_factory() + { + return new Pss5; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Pss5.hpp b/CGMES_2.4.13_18DEC2013/Pss5.hpp new file mode 100644 index 000000000..e5bd96947 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Pss5.hpp @@ -0,0 +1,60 @@ +#ifndef Pss5_H +#define Pss5_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Italian PSS - Detailed PSS. + */ + class Pss5 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss5_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssELIN2.cpp b/CGMES_2.4.13_18DEC2013/PssELIN2.cpp new file mode 100644 index 000000000..0aa111da9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssELIN2.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssELIN2.hpp" + +#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() {}; + + +bool assign_PssELIN2_apss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->apss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ppss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ppss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_psslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->psslim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssELIN2::debugName[] = "PssELIN2"; +const char* PssELIN2::debugString() const +{ + return PssELIN2::debugName; +} + +void PssELIN2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssELIN2::declare() +{ + return BaseClassDefiner(PssELIN2::addConstructToMap, PssELIN2::addPrimitiveAssignFnsToMap, PssELIN2::addClassAssignFnsToMap, PssELIN2::debugName); +} + +namespace CIMPP +{ + BaseClass* PssELIN2_factory() + { + return new PssELIN2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssELIN2.hpp b/CGMES_2.4.13_18DEC2013/PssELIN2.hpp new file mode 100644 index 000000000..7335abe02 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssELIN2.hpp @@ -0,0 +1,52 @@ +#ifndef PssELIN2_H +#define PssELIN2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). + */ + class PssELIN2 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssELIN2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp new file mode 100644 index 000000000..7613a5c13 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE1A.hpp" + +#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() {}; + + +bool assign_PssIEEE1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignalType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char PssIEEE1A::debugName[] = "PssIEEE1A"; +const char* PssIEEE1A::debugString() const +{ + return PssIEEE1A::debugName; +} + +void PssIEEE1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE1A::declare() +{ + return BaseClassDefiner(PssIEEE1A::addConstructToMap, PssIEEE1A::addPrimitiveAssignFnsToMap, PssIEEE1A::addClassAssignFnsToMap, PssIEEE1A::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE1A_factory() + { + return new PssIEEE1A; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp new file mode 100644 index 000000000..0d4b1471d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp @@ -0,0 +1,54 @@ +#ifndef PssIEEE1A_H +#define PssIEEE1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE1A : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE1A_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp new file mode 100644 index 000000000..c896be757 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE2B.hpp" + +#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() {}; + + +bool assign_PssIEEE2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->n; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char PssIEEE2B::debugName[] = "PssIEEE2B"; +const char* PssIEEE2B::debugString() const +{ + return PssIEEE2B::debugName; +} + +void PssIEEE2B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE2B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE2B::declare() +{ + return BaseClassDefiner(PssIEEE2B::addConstructToMap, PssIEEE2B::addPrimitiveAssignFnsToMap, PssIEEE2B::addClassAssignFnsToMap, PssIEEE2B::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE2B_factory() + { + return new PssIEEE2B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp new file mode 100644 index 000000000..d08edd8fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp @@ -0,0 +1,70 @@ +#ifndef PssIEEE2B_H +#define PssIEEE2B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE2B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE2B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp new file mode 100644 index 000000000..30e610d2a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE3B.hpp" + +#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() {}; + + +bool assign_PssIEEE3B_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char PssIEEE3B::debugName[] = "PssIEEE3B"; +const char* PssIEEE3B::debugString() const +{ + return PssIEEE3B::debugName; +} + +void PssIEEE3B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE3B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE3B::declare() +{ + return BaseClassDefiner(PssIEEE3B::addConstructToMap, PssIEEE3B::addPrimitiveAssignFnsToMap, PssIEEE3B::addClassAssignFnsToMap, PssIEEE3B::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE3B_factory() + { + return new PssIEEE3B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp new file mode 100644 index 000000000..80ca94ed5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp @@ -0,0 +1,61 @@ +#ifndef PssIEEE3B_H +#define PssIEEE3B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE3B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE3B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp new file mode 100644 index 000000000..09000137e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp @@ -0,0 +1,1023 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE4B.hpp" + +#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() {}; + + +bool assign_PssIEEE4B_bwi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bwi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh17; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki17; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl17; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_omegani(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegani; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vhmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vlmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vlmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char PssIEEE4B::debugName[] = "PssIEEE4B"; +const char* PssIEEE4B::debugString() const +{ + return PssIEEE4B::debugName; +} + +void PssIEEE4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE4B::declare() +{ + return BaseClassDefiner(PssIEEE4B::addConstructToMap, PssIEEE4B::addPrimitiveAssignFnsToMap, PssIEEE4B::addClassAssignFnsToMap, PssIEEE4B::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE4B_factory() + { + return new PssIEEE4B; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp new file mode 100644 index 000000000..d0a721a9b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp @@ -0,0 +1,103 @@ +#ifndef PssIEEE4B_H +#define PssIEEE4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class PssIEEE4B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE4B_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp b/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp new file mode 100644 index 000000000..c7bd7baeb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssPTIST1.hpp" + +#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() {}; + + +bool assign_PssPTIST1_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssPTIST1::debugName[] = "PssPTIST1"; +const char* PssPTIST1::debugString() const +{ + return PssPTIST1::debugName; +} + +void PssPTIST1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssPTIST1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssPTIST1::declare() +{ + return BaseClassDefiner(PssPTIST1::addConstructToMap, PssPTIST1::addPrimitiveAssignFnsToMap, PssPTIST1::addClassAssignFnsToMap, PssPTIST1::debugName); +} + +namespace CIMPP +{ + BaseClass* PssPTIST1_factory() + { + return new PssPTIST1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp b/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp new file mode 100644 index 000000000..40174cc49 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp @@ -0,0 +1,52 @@ +#ifndef PssPTIST1_H +#define PssPTIST1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PTI Microprocessor-Based Stabilizer type 1. + */ + class PssPTIST1 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssPTIST1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp b/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp new file mode 100644 index 000000000..bdb5b8ad3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp @@ -0,0 +1,591 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssPTIST3.hpp" + +#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() {}; + + +bool assign_PssPTIST3_a0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_al(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->al; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_athres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->athres; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_isw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_lthres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lthres; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_nav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nav; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_ncl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ncl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_ncr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ncr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char PssPTIST3::debugName[] = "PssPTIST3"; +const char* PssPTIST3::debugString() const +{ + return PssPTIST3::debugName; +} + +void PssPTIST3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssPTIST3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssPTIST3::declare() +{ + return BaseClassDefiner(PssPTIST3::addConstructToMap, PssPTIST3::addPrimitiveAssignFnsToMap, PssPTIST3::addClassAssignFnsToMap, PssPTIST3::debugName); +} + +namespace CIMPP +{ + BaseClass* PssPTIST3_factory() + { + return new PssPTIST3; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp b/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp new file mode 100644 index 000000000..72f604647 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp @@ -0,0 +1,77 @@ +#ifndef PssPTIST3_H +#define PssPTIST3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + PTI Microprocessor-Based Stabilizer type 3. + */ + class PssPTIST3 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssPTIST3_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssSB4.cpp b/CGMES_2.4.13_18DEC2013/PssSB4.cpp new file mode 100644 index 000000000..f6dca8bb3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssSB4.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSB4.hpp" + +#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() {}; + + +bool assign_PssSB4_kx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tx1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tx2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssSB4::debugName[] = "PssSB4"; +const char* PssSB4::debugString() const +{ + return PssSB4::debugName; +} + +void PssSB4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSB4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSB4::declare() +{ + return BaseClassDefiner(PssSB4::addConstructToMap, PssSB4::addPrimitiveAssignFnsToMap, PssSB4::addClassAssignFnsToMap, PssSB4::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSB4_factory() + { + return new PssSB4; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssSB4.hpp b/CGMES_2.4.13_18DEC2013/PssSB4.hpp new file mode 100644 index 000000000..a18083e3c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssSB4.hpp @@ -0,0 +1,52 @@ +#ifndef PssSB4_H +#define PssSB4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Power sensitive stabilizer model. + */ + class PssSB4 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSB4_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssSH.cpp b/CGMES_2.4.13_18DEC2013/PssSH.cpp new file mode 100644 index 000000000..e8b98edbd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssSH.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSH.hpp" + +#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() {}; + + +bool assign_PssSH_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char PssSH::debugName[] = "PssSH"; +const char* PssSH::debugString() const +{ + return PssSH::debugName; +} + +void PssSH::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSH::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSH::declare() +{ + return BaseClassDefiner(PssSH::addConstructToMap, PssSH::addPrimitiveAssignFnsToMap, PssSH::addClassAssignFnsToMap, PssSH::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSH_factory() + { + return new PssSH; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssSH.hpp b/CGMES_2.4.13_18DEC2013/PssSH.hpp new file mode 100644 index 000000000..72614d6c4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssSH.hpp @@ -0,0 +1,54 @@ +#ifndef PssSH_H +#define PssSH_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Model for Siemens "H infinity" power system stabilizer with generator electrical power input. + */ + class PssSH : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSH_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssSK.cpp b/CGMES_2.4.13_18DEC2013/PssSK.cpp new file mode 100644 index 000000000..cff220b90 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssSK.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSK.hpp" + +#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() {}; + + +bool assign_PssSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssSK::debugName[] = "PssSK"; +const char* PssSK::debugString() const +{ + return PssSK::debugName; +} + +void PssSK::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSK::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSK::declare() +{ + return BaseClassDefiner(PssSK::addConstructToMap, PssSK::addPrimitiveAssignFnsToMap, PssSK::addClassAssignFnsToMap, PssSK::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSK_factory() + { + return new PssSK; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssSK.hpp b/CGMES_2.4.13_18DEC2013/PssSK.hpp new file mode 100644 index 000000000..767897b2b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssSK.hpp @@ -0,0 +1,52 @@ +#ifndef PssSK_H +#define PssSK_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PSS Slovakian type - three inputs. + */ + class PssSK : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSK_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/PssWECC.cpp b/CGMES_2.4.13_18DEC2013/PssWECC.cpp new file mode 100644 index 000000000..92f2fc3c1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssWECC.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssWECC.hpp" + +#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() {}; + + +bool assign_PssWECC_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char PssWECC::debugName[] = "PssWECC"; +const char* PssWECC::debugString() const +{ + return PssWECC::debugName; +} + +void PssWECC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssWECC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssWECC::declare() +{ + return BaseClassDefiner(PssWECC::addConstructToMap, PssWECC::addPrimitiveAssignFnsToMap, PssWECC::addClassAssignFnsToMap, PssWECC::debugName); +} + +namespace CIMPP +{ + BaseClass* PssWECC_factory() + { + return new PssWECC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/PssWECC.hpp b/CGMES_2.4.13_18DEC2013/PssWECC.hpp new file mode 100644 index 000000000..f1e2066e4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/PssWECC.hpp @@ -0,0 +1,60 @@ +#ifndef PssWECC_H +#define PssWECC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssWECC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Quality61850.cpp b/CGMES_2.4.13_18DEC2013/Quality61850.cpp new file mode 100644 index 000000000..ac78a9b84 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Quality61850.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Quality61850.hpp" + +#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() {}; + + +bool assign_Quality61850_badReference(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->badReference; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_estimatorReplaced(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->estimatorReplaced; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_failure(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->failure; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_oldData(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oldData; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_operatorBlocked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operatorBlocked; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_oscillatory(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oscillatory; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_outOfRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->outOfRange; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_overFlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->overFlow; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_source(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->source; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_suspect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->suspect; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_test(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->test; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_validity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->validity; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char Quality61850::debugName[] = "Quality61850"; +const char* Quality61850::debugString() const +{ + return Quality61850::debugName; +} + +void Quality61850::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Quality61850::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Quality61850::declare() +{ + return BaseClassDefiner(Quality61850::addConstructToMap, Quality61850::addPrimitiveAssignFnsToMap, Quality61850::addClassAssignFnsToMap, Quality61850::debugName); +} + +namespace CIMPP +{ + BaseClass* Quality61850_factory() + { + return new Quality61850; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Quality61850.hpp b/CGMES_2.4.13_18DEC2013/Quality61850.hpp new file mode 100644 index 000000000..fb8336676 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Quality61850.hpp @@ -0,0 +1,54 @@ +#ifndef Quality61850_H +#define Quality61850_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Source.hpp" +#include "Validity.hpp" + +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. + */ + class Quality61850 : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Quality61850_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp new file mode 100644 index 000000000..066aa79a7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RaiseLowerCommand.hpp" + +#include +#include + +#include "ValueAliasSet.hpp" + +using namespace CIMPP; + +RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {}; +RaiseLowerCommand::~RaiseLowerCommand() {}; + + + + +bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass*, BaseClass*); +bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_RaiseLowerCommands(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RaiseLowerCommand::debugName[] = "RaiseLowerCommand"; +const char* RaiseLowerCommand::debugString() const +{ + return RaiseLowerCommand::debugName; +} + +void RaiseLowerCommand::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand"), &RaiseLowerCommand_factory)); +} + +void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RaiseLowerCommand::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand.ValueAliasSet"), &assign_RaiseLowerCommand_ValueAliasSet)); +} + +const BaseClassDefiner RaiseLowerCommand::declare() +{ + return BaseClassDefiner(RaiseLowerCommand::addConstructToMap, RaiseLowerCommand::addPrimitiveAssignFnsToMap, RaiseLowerCommand::addClassAssignFnsToMap, RaiseLowerCommand::debugName); +} + +namespace CIMPP +{ + BaseClass* RaiseLowerCommand_factory() + { + return new RaiseLowerCommand; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp new file mode 100644 index 000000000..a64ed8aa0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp @@ -0,0 +1,41 @@ +#ifndef RaiseLowerCommand_H +#define RaiseLowerCommand_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AnalogControl.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ValueAliasSet; + + /* + An analog control that increase or decrease a set point value with pulses. + */ + class RaiseLowerCommand : public AnalogControl + { + public: + /* constructor initialising all attributes to null */ + RaiseLowerCommand(); + ~RaiseLowerCommand() override; + + CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RaiseLowerCommand_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp b/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp new file mode 100644 index 000000000..a6b71a322 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RatioTapChanger.hpp" + +#include +#include + +#include "RatioTapChangerTable.hpp" +#include "TransformerEnd.hpp" +#include "PerCent.hpp" +#include "TransformerControlMode.hpp" + +using namespace CIMPP; + +RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {}; +RatioTapChanger::~RatioTapChanger() {}; + + + + +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) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + RatioTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RatioTapChangerTable != element2) + { + element->RatioTapChangerTable = element2; + return assign_RatioTapChangerTable_RatioTapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TransformerEnd_RatioTapChanger(BaseClass*, BaseClass*); +bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TransformerEnd != element2) + { + element->TransformerEnd = element2; + return assign_TransformerEnd_RatioTapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char RatioTapChanger::debugName[] = "RatioTapChanger"; +const char* RatioTapChanger::debugString() const +{ + return RatioTapChanger::debugName; +} + +void RatioTapChanger::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RatioTapChanger::declare() +{ + return BaseClassDefiner(RatioTapChanger::addConstructToMap, RatioTapChanger::addPrimitiveAssignFnsToMap, RatioTapChanger::addClassAssignFnsToMap, RatioTapChanger::debugName); +} + +namespace CIMPP +{ + BaseClass* RatioTapChanger_factory() + { + return new RatioTapChanger; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp b/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp new file mode 100644 index 000000000..522680ece --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp @@ -0,0 +1,47 @@ +#ifndef RatioTapChanger_H +#define RatioTapChanger_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChanger.hpp" +#include "BaseClassDefiner.hpp" +#include "PerCent.hpp" +#include "TransformerControlMode.hpp" + +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. + */ + class RatioTapChanger : public TapChanger + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RatioTapChanger_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp new file mode 100644 index 000000000..ee5dac524 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RatioTapChangerTable.hpp" + +#include +#include + +#include "RatioTapChanger.hpp" +#include "RatioTapChangerTablePoint.hpp" + +using namespace CIMPP; + +RatioTapChangerTable::RatioTapChangerTable() {}; +RatioTapChangerTable::~RatioTapChangerTable() {}; + + + + + +bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass*, BaseClass*); +bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + RatioTapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RatioTapChanger.begin(), element->RatioTapChanger.end(), element2) == element->RatioTapChanger.end()) + { + element->RatioTapChanger.push_back(element2); + return assign_RatioTapChanger_RatioTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass*, BaseClass*); +bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + RatioTapChangerTablePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RatioTapChangerTablePoint.begin(), element->RatioTapChangerTablePoint.end(), element2) == element->RatioTapChangerTablePoint.end()) + { + element->RatioTapChangerTablePoint.push_back(element2); + return assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RatioTapChangerTable::debugName[] = "RatioTapChangerTable"; +const char* RatioTapChangerTable::debugString() const +{ + return RatioTapChangerTable::debugName; +} + +void RatioTapChangerTable::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable"), &RatioTapChangerTable_factory)); +} + +void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RatioTapChangerTable::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner RatioTapChangerTable::declare() +{ + return BaseClassDefiner(RatioTapChangerTable::addConstructToMap, RatioTapChangerTable::addPrimitiveAssignFnsToMap, RatioTapChangerTable::addClassAssignFnsToMap, RatioTapChangerTable::debugName); +} + +namespace CIMPP +{ + BaseClass* RatioTapChangerTable_factory() + { + return new RatioTapChangerTable; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp new file mode 100644 index 000000000..e3677c982 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp @@ -0,0 +1,43 @@ +#ifndef RatioTapChangerTable_H +#define RatioTapChangerTable_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class RatioTapChanger; + class RatioTapChangerTablePoint; + + /* + Describes a curve for how the voltage magnitude and impedance varies with the tap step. + */ + class RatioTapChangerTable : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RatioTapChangerTable_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp new file mode 100644 index 000000000..4253a4d8b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RatioTapChangerTablePoint.hpp" + +#include +#include + +#include "RatioTapChangerTable.hpp" + +using namespace CIMPP; + +RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {}; +RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {}; + + + + +bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass*, BaseClass*); +bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + RatioTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RatioTapChangerTable != element2) + { + element->RatioTapChangerTable = element2; + return assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RatioTapChangerTablePoint::debugName[] = "RatioTapChangerTablePoint"; +const char* RatioTapChangerTablePoint::debugString() const +{ + return RatioTapChangerTablePoint::debugName; +} + +void RatioTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint"), &RatioTapChangerTablePoint_factory)); +} + +void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RatioTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint.RatioTapChangerTable"), &assign_RatioTapChangerTablePoint_RatioTapChangerTable)); +} + +const BaseClassDefiner RatioTapChangerTablePoint::declare() +{ + return BaseClassDefiner(RatioTapChangerTablePoint::addConstructToMap, RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap, RatioTapChangerTablePoint::addClassAssignFnsToMap, RatioTapChangerTablePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* RatioTapChangerTablePoint_factory() + { + return new RatioTapChangerTablePoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp new file mode 100644 index 000000000..07c7889db --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp @@ -0,0 +1,41 @@ +#ifndef RatioTapChangerTablePoint_H +#define RatioTapChangerTablePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChangerTablePoint.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class RatioTapChangerTable; + + /* + Describes each tap step in the ratio tap changer tabular curve. + */ + class RatioTapChangerTablePoint : public TapChangerTablePoint + { + public: + /* constructor initialising all attributes to null */ + RatioTapChangerTablePoint(); + ~RatioTapChangerTablePoint() override; + + CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* Points of this table. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RatioTapChangerTablePoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Reactance.cpp b/CGMES_2.4.13_18DEC2013/Reactance.cpp new file mode 100644 index 000000000..6b2d635d6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Reactance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Reactance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Reactance& Reactance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Reactance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Reactance::debugName[] = "Reactance"; +const char* Reactance::debugString() const +{ + return Reactance::debugName; +} + +Reactance& Reactance::operator+=(const Reactance& rhs) +{ + value += rhs.value; + return *this; +} + +Reactance& Reactance::operator-=(const Reactance& rhs) +{ + value -= rhs.value; + return *this; +} + +Reactance& Reactance::operator*=(const Reactance& rhs) +{ + value *= rhs.value; + return *this; +} + +Reactance& Reactance::operator/=(const Reactance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Reactance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Reactance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Reactance.hpp b/CGMES_2.4.13_18DEC2013/Reactance.hpp new file mode 100644 index 000000000..a811d499a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Reactance.hpp @@ -0,0 +1,39 @@ +#ifndef Reactance_H +#define Reactance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Reactance (imaginary part of impedance), at rated frequency. + */ + class Reactance + { + public: + Reactance() : value(0.0), initialized(false) {} + Reactance(long double value) : value(value), initialized(true) {} + + Reactance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Reactance& operator+=(const Reactance& rhs); + Reactance& operator-=(const Reactance& rhs); + Reactance& operator*=(const Reactance& rhs); + Reactance& operator/=(const Reactance& rhs); + + friend std::istream& operator>>(std::istream& lop, Reactance& rop); + friend std::ostream& operator<<(std::ostream& os, const Reactance& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp new file mode 100644 index 000000000..493bd8bf5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ReactiveCapabilityCurve.hpp" + +#include +#include + +#include "EquivalentInjection.hpp" +#include "SynchronousMachine.hpp" + +using namespace CIMPP; + +ReactiveCapabilityCurve::ReactiveCapabilityCurve() {}; +ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {}; + + + + + +bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass*, BaseClass*); +bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReactiveCapabilityCurve* element = dynamic_cast(BaseClass_ptr1); + EquivalentInjection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EquivalentInjection.begin(), element->EquivalentInjection.end(), element2) == element->EquivalentInjection.end()) + { + element->EquivalentInjection.push_back(element2); + return assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass*, BaseClass*); +bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReactiveCapabilityCurve* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->InitiallyUsedBySynchronousMachines.begin(), element->InitiallyUsedBySynchronousMachines.end(), element2) == element->InitiallyUsedBySynchronousMachines.end()) + { + element->InitiallyUsedBySynchronousMachines.push_back(element2); + return assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ReactiveCapabilityCurve::debugName[] = "ReactiveCapabilityCurve"; +const char* ReactiveCapabilityCurve::debugString() const +{ + return ReactiveCapabilityCurve::debugName; +} + +void ReactiveCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve"), &ReactiveCapabilityCurve_factory)); +} + +void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ReactiveCapabilityCurve::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ReactiveCapabilityCurve::declare() +{ + return BaseClassDefiner(ReactiveCapabilityCurve::addConstructToMap, ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap, ReactiveCapabilityCurve::addClassAssignFnsToMap, ReactiveCapabilityCurve::debugName); +} + +namespace CIMPP +{ + BaseClass* ReactiveCapabilityCurve_factory() + { + return new ReactiveCapabilityCurve; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp new file mode 100644 index 000000000..95cefa865 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp @@ -0,0 +1,43 @@ +#ifndef ReactiveCapabilityCurve_H +#define ReactiveCapabilityCurve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Curve.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ReactiveCapabilityCurve : public Curve + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ReactiveCapabilityCurve_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ReactivePower.cpp b/CGMES_2.4.13_18DEC2013/ReactivePower.cpp new file mode 100644 index 000000000..568f514f7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ReactivePower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ReactivePower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ReactivePower& ReactivePower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ReactivePower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ReactivePower::debugName[] = "ReactivePower"; +const char* ReactivePower::debugString() const +{ + return ReactivePower::debugName; +} + +ReactivePower& ReactivePower::operator+=(const ReactivePower& rhs) +{ + value += rhs.value; + return *this; +} + +ReactivePower& ReactivePower::operator-=(const ReactivePower& rhs) +{ + value -= rhs.value; + return *this; +} + +ReactivePower& ReactivePower::operator*=(const ReactivePower& rhs) +{ + value *= rhs.value; + return *this; +} + +ReactivePower& ReactivePower::operator/=(const ReactivePower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ReactivePower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ReactivePower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ReactivePower.hpp b/CGMES_2.4.13_18DEC2013/ReactivePower.hpp new file mode 100644 index 000000000..e80659b92 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ReactivePower.hpp @@ -0,0 +1,39 @@ +#ifndef ReactivePower_H +#define ReactivePower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Product of RMS value of the voltage and the RMS value of the quadrature component of the current. + */ + class ReactivePower + { + public: + ReactivePower() : value(0.0), initialized(false) {} + ReactivePower(long double value) : value(value), initialized(true) {} + + ReactivePower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ReactivePower& operator+=(const ReactivePower& rhs); + ReactivePower& operator-=(const ReactivePower& rhs); + ReactivePower& operator*=(const ReactivePower& rhs); + ReactivePower& operator/=(const ReactivePower& rhs); + + friend std::istream& operator>>(std::istream& lop, ReactivePower& rop); + friend std::ostream& operator<<(std::ostream& os, const ReactivePower& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp new file mode 100644 index 000000000..b6a466799 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegularIntervalSchedule.hpp" + +#include +#include + +#include "RegularTimePoint.hpp" +#include "DateTime.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +RegularIntervalSchedule::RegularIntervalSchedule() {}; +RegularIntervalSchedule::~RegularIntervalSchedule() {}; + + + +bool assign_RegularIntervalSchedule_endTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + element->endTime = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegularIntervalSchedule_timeStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->timeStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); +bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + +const char RegularIntervalSchedule::debugName[] = "RegularIntervalSchedule"; +const char* RegularIntervalSchedule::debugString() const +{ + return RegularIntervalSchedule::debugName; +} + +void RegularIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RegularIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.TimePoints"), &assign_RegularIntervalSchedule_TimePoints)); +} + +const BaseClassDefiner RegularIntervalSchedule::declare() +{ + return BaseClassDefiner(RegularIntervalSchedule::addConstructToMap, RegularIntervalSchedule::addPrimitiveAssignFnsToMap, RegularIntervalSchedule::addClassAssignFnsToMap, RegularIntervalSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* RegularIntervalSchedule_factory() + { + return new RegularIntervalSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp new file mode 100644 index 000000000..6b57324c8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp @@ -0,0 +1,45 @@ +#ifndef RegularIntervalSchedule_H +#define RegularIntervalSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BasicIntervalSchedule.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class RegularTimePoint; + + /* + The schedule has time points where the time between them is constant. + */ + class RegularIntervalSchedule : public BasicIntervalSchedule + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegularIntervalSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp b/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp new file mode 100644 index 000000000..e5733a393 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegularTimePoint.hpp" + +#include +#include + +#include "RegularIntervalSchedule.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {}; +RegularTimePoint::~RegularTimePoint() {}; + + + +bool assign_RegularTimePoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sequenceNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegularTimePoint_value1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegularTimePoint_value2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + +const char RegularTimePoint::debugName[] = "RegularTimePoint"; +const char* RegularTimePoint::debugString() const +{ + return RegularTimePoint::debugName; +} + +void RegularTimePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RegularTimePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.IntervalSchedule"), &assign_RegularTimePoint_IntervalSchedule)); +} + +const BaseClassDefiner RegularTimePoint::declare() +{ + return BaseClassDefiner(RegularTimePoint::addConstructToMap, RegularTimePoint::addPrimitiveAssignFnsToMap, RegularTimePoint::addClassAssignFnsToMap, RegularTimePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* RegularTimePoint_factory() + { + return new RegularTimePoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp b/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp new file mode 100644 index 000000000..3d8667b37 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp @@ -0,0 +1,46 @@ +#ifndef RegularTimePoint_H +#define RegularTimePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class RegularIntervalSchedule; + + /* + Time point for a schedule where the time between the consecutive points is constant. + */ + class RegularTimePoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegularTimePoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp new file mode 100644 index 000000000..19bb9d5eb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulatingCondEq.hpp" + +#include +#include + +#include "RegulatingControl.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {}; +RegulatingCondEq::~RegulatingCondEq() {}; + + + +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) +{ + RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + RegulatingControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RegulatingControl != element2) + { + element->RegulatingControl = element2; + return assign_RegulatingControl_RegulatingCondEq(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char RegulatingCondEq::debugName[] = "RegulatingCondEq"; +const char* RegulatingCondEq::debugString() const +{ + return RegulatingCondEq::debugName; +} + +void RegulatingCondEq::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RegulatingCondEq::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.RegulatingControl"), &assign_RegulatingCondEq_RegulatingControl)); +} + +const BaseClassDefiner RegulatingCondEq::declare() +{ + return BaseClassDefiner(RegulatingCondEq::addConstructToMap, RegulatingCondEq::addPrimitiveAssignFnsToMap, RegulatingCondEq::addClassAssignFnsToMap, RegulatingCondEq::debugName); +} + +namespace CIMPP +{ + BaseClass* RegulatingCondEq_factory() + { + return new RegulatingCondEq; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp new file mode 100644 index 000000000..4540114e0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp @@ -0,0 +1,43 @@ +#ifndef RegulatingCondEq_H +#define RegulatingCondEq_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +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. + */ + class RegulatingCondEq : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegulatingCondEq_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp b/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp new file mode 100644 index 000000000..8516c962f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp @@ -0,0 +1,203 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulatingControl.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_RegulatingControl_discrete(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->discrete; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->enabled; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_targetDeadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetDeadband; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_targetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetValueUnitMultiplier; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_Terminal_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + +const char RegulatingControl::debugName[] = "RegulatingControl"; +const char* RegulatingControl::debugString() const +{ + return RegulatingControl::debugName; +} + +void RegulatingControl::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RegulatingControl::declare() +{ + return BaseClassDefiner(RegulatingControl::addConstructToMap, RegulatingControl::addPrimitiveAssignFnsToMap, RegulatingControl::addClassAssignFnsToMap, RegulatingControl::debugName); +} + +namespace CIMPP +{ + BaseClass* RegulatingControl_factory() + { + return new RegulatingControl; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp b/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp new file mode 100644 index 000000000..6053d20d9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp @@ -0,0 +1,55 @@ +#ifndef RegulatingControl_H +#define RegulatingControl_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "RegulatingControlModeKind.hpp" +#include "Simple_Float.hpp" +#include "UnitMultiplier.hpp" + +namespace CIMPP +{ + class RegulatingCondEq; + 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. + */ + class RegulatingControl : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegulatingControl_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp new file mode 100644 index 000000000..7ac923d24 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp @@ -0,0 +1,144 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulatingControlModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RegulatingControlModeKind& RegulatingControlModeKind::operator=(RegulatingControlModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +RegulatingControlModeKind::operator RegulatingControlModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RegulatingControlModeKind::debugName[] = "RegulatingControlModeKind"; +const char* RegulatingControlModeKind::debugString() const +{ + return RegulatingControlModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RegulatingControlModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "voltage") + { + rop = RegulatingControlModeKind::voltage; + return lop; + } + if(EnumSymbol == "activePower") + { + rop = RegulatingControlModeKind::activePower; + return lop; + } + if(EnumSymbol == "reactivePower") + { + rop = RegulatingControlModeKind::reactivePower; + return lop; + } + if(EnumSymbol == "currentFlow") + { + rop = RegulatingControlModeKind::currentFlow; + return lop; + } + if(EnumSymbol == "admittance") + { + rop = RegulatingControlModeKind::admittance; + return lop; + } + if(EnumSymbol == "timeScheduled") + { + rop = RegulatingControlModeKind::timeScheduled; + return lop; + } + if(EnumSymbol == "temperature") + { + rop = RegulatingControlModeKind::temperature; + return lop; + } + if(EnumSymbol == "powerFactor") + { + rop = RegulatingControlModeKind::powerFactor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RegulatingControlModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == RegulatingControlModeKind::voltage) + { + EnumSymbol = "voltage"; + } + if (obj.value == RegulatingControlModeKind::activePower) + { + EnumSymbol = "activePower"; + } + if (obj.value == RegulatingControlModeKind::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == RegulatingControlModeKind::currentFlow) + { + EnumSymbol = "currentFlow"; + } + if (obj.value == RegulatingControlModeKind::admittance) + { + EnumSymbol = "admittance"; + } + if (obj.value == RegulatingControlModeKind::timeScheduled) + { + EnumSymbol = "timeScheduled"; + } + if (obj.value == RegulatingControlModeKind::temperature) + { + EnumSymbol = "temperature"; + } + if (obj.value == RegulatingControlModeKind::powerFactor) + { + EnumSymbol = "powerFactor"; + } + + if (!EnumSymbol.empty()) + { + os << "RegulatingControlModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp new file mode 100644 index 000000000..ed5351e3e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp @@ -0,0 +1,70 @@ +#ifndef RegulatingControlModeKind_H +#define RegulatingControlModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The kind of regulation model. For example regulating voltage, reactive power, active power, etc. + */ + class RegulatingControlModeKind + { + public: + enum RegulatingControlModeKind_ENUM + { + /** + * Voltage is specified. + */ + voltage, + /** + * Active power is specified. + */ + activePower, + /** + * Reactive power is specified. + */ + reactivePower, + /** + * Current flow is specified. + */ + currentFlow, + /** + * Admittance is specified. + */ + admittance, + /** + * 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). + */ + temperature, + /** + * Power factor is specified. + */ + powerFactor, + }; + + RegulatingControlModeKind() : value(), initialized(false) {} + RegulatingControlModeKind(RegulatingControlModeKind_ENUM value) : value(value), initialized(true) {} + + RegulatingControlModeKind& operator=(RegulatingControlModeKind_ENUM rop); + operator RegulatingControlModeKind_ENUM() const; + + RegulatingControlModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, RegulatingControlModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const RegulatingControlModeKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp b/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp new file mode 100644 index 000000000..71c2e0c89 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulationSchedule.hpp" + +#include +#include + +#include "RegulatingControl.hpp" + +using namespace CIMPP; + +RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {}; +RegulationSchedule::~RegulationSchedule() {}; + + + + +bool assign_RegulatingControl_RegulationSchedule(BaseClass*, BaseClass*); +bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulationSchedule* element = dynamic_cast(BaseClass_ptr1); + RegulatingControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RegulatingControl != element2) + { + element->RegulatingControl = element2; + return assign_RegulatingControl_RegulationSchedule(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RegulationSchedule::debugName[] = "RegulationSchedule"; +const char* RegulationSchedule::debugString() const +{ + return RegulationSchedule::debugName; +} + +void RegulationSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RegulationSchedule"), &RegulationSchedule_factory)); +} + +void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RegulationSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegulationSchedule.RegulatingControl"), &assign_RegulationSchedule_RegulatingControl)); +} + +const BaseClassDefiner RegulationSchedule::declare() +{ + return BaseClassDefiner(RegulationSchedule::addConstructToMap, RegulationSchedule::addPrimitiveAssignFnsToMap, RegulationSchedule::addClassAssignFnsToMap, RegulationSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* RegulationSchedule_factory() + { + return new RegulationSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp b/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp new file mode 100644 index 000000000..5b8a56428 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef RegulationSchedule_H +#define RegulationSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class RegulatingControl; + + /* + A pre-established pattern over time for a controlled variable, e.g., busbar voltage. + */ + class RegulationSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + RegulationSchedule(); + ~RegulationSchedule() override; + + CIMPP::RegulatingControl* RegulatingControl; /* Regulating controls that have this Schedule. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegulationSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp new file mode 100644 index 000000000..30f558ba0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp @@ -0,0 +1,243 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RemoteInputSignal.hpp" + +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "PFVArControllerType1Dynamics.hpp" +#include "PowerSystemStabilizerDynamics.hpp" +#include "Terminal.hpp" +#include "UnderexcitationLimiterDynamics.hpp" +#include "VoltageCompensatorDynamics.hpp" +#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() {}; + + + + + + + + + + + +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) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + DiscontinuousExcitationControlDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscontinuousExcitationControlDynamics != element2) + { + element->DiscontinuousExcitationControlDynamics = element2; + return assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1Dynamics != element2) + { + element->PFVArControllerType1Dynamics = element2; + return assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + PowerSystemStabilizerDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemStabilizerDynamics != element2) + { + element->PowerSystemStabilizerDynamics = element2; + return assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + UnderexcitationLimiterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->UnderexcitationLimiterDynamics != element2) + { + element->UnderexcitationLimiterDynamics = element2; + return assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + VoltageCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageCompensatorDynamics != element2) + { + element->VoltageCompensatorDynamics = element2; + return assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + WindPlantDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantDynamics != element2) + { + element->WindPlantDynamics = element2; + return assign_WindPlantDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2Dynamics != element2) + { + element->WindTurbineType1or2Dynamics = element2; + return assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* 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_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char RemoteInputSignal::debugName[] = "RemoteInputSignal"; +const char* RemoteInputSignal::debugString() const +{ + return RemoteInputSignal::debugName; +} + +void RemoteInputSignal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RemoteInputSignal::declare() +{ + return BaseClassDefiner(RemoteInputSignal::addConstructToMap, RemoteInputSignal::addPrimitiveAssignFnsToMap, RemoteInputSignal::addClassAssignFnsToMap, RemoteInputSignal::debugName); +} + +namespace CIMPP +{ + BaseClass* RemoteInputSignal_factory() + { + return new RemoteInputSignal; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp new file mode 100644 index 000000000..6f856860e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp @@ -0,0 +1,59 @@ +#ifndef RemoteInputSignal_H +#define RemoteInputSignal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "RemoteSignalKind.hpp" + +namespace CIMPP +{ + class DiscontinuousExcitationControlDynamics; + class PFVArControllerType1Dynamics; + class PowerSystemStabilizerDynamics; + class Terminal; + class UnderexcitationLimiterDynamics; + class VoltageCompensatorDynamics; + class WindPlantDynamics; + 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. + */ + class RemoteInputSignal : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RemoteInputSignal_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp new file mode 100644 index 000000000..e1cd4d2e7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp @@ -0,0 +1,153 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RemoteSignalKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RemoteSignalKind& RemoteSignalKind::operator=(RemoteSignalKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +RemoteSignalKind::operator RemoteSignalKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RemoteSignalKind::debugName[] = "RemoteSignalKind"; +const char* RemoteSignalKind::debugString() const +{ + return RemoteSignalKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RemoteSignalKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "RemoteSignalKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "remoteBusVoltageFrequency") + { + rop = RemoteSignalKind::remoteBusVoltageFrequency; + return lop; + } + if(EnumSymbol == "remoteBusVoltageFrequencyDeviation") + { + rop = RemoteSignalKind::remoteBusVoltageFrequencyDeviation; + return lop; + } + if(EnumSymbol == "remoteBusFrequency") + { + rop = RemoteSignalKind::remoteBusFrequency; + return lop; + } + if(EnumSymbol == "remoteBusFrequencyDeviation") + { + rop = RemoteSignalKind::remoteBusFrequencyDeviation; + return lop; + } + if(EnumSymbol == "remoteBusVoltageAmplitude") + { + rop = RemoteSignalKind::remoteBusVoltageAmplitude; + return lop; + } + if(EnumSymbol == "remoteBusVoltage") + { + rop = RemoteSignalKind::remoteBusVoltage; + return lop; + } + if(EnumSymbol == "remoteBranchCurrentAmplitude") + { + rop = RemoteSignalKind::remoteBranchCurrentAmplitude; + return lop; + } + if(EnumSymbol == "remoteBusVoltageAmplitudeDerivative") + { + rop = RemoteSignalKind::remoteBusVoltageAmplitudeDerivative; + return lop; + } + if(EnumSymbol == "remotePuBusVoltageDerivative") + { + rop = RemoteSignalKind::remotePuBusVoltageDerivative; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RemoteSignalKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == RemoteSignalKind::remoteBusVoltageFrequency) + { + EnumSymbol = "remoteBusVoltageFrequency"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltageFrequencyDeviation) + { + EnumSymbol = "remoteBusVoltageFrequencyDeviation"; + } + if (obj.value == RemoteSignalKind::remoteBusFrequency) + { + EnumSymbol = "remoteBusFrequency"; + } + if (obj.value == RemoteSignalKind::remoteBusFrequencyDeviation) + { + EnumSymbol = "remoteBusFrequencyDeviation"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltageAmplitude) + { + EnumSymbol = "remoteBusVoltageAmplitude"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltage) + { + EnumSymbol = "remoteBusVoltage"; + } + if (obj.value == RemoteSignalKind::remoteBranchCurrentAmplitude) + { + EnumSymbol = "remoteBranchCurrentAmplitude"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltageAmplitudeDerivative) + { + EnumSymbol = "remoteBusVoltageAmplitudeDerivative"; + } + if (obj.value == RemoteSignalKind::remotePuBusVoltageDerivative) + { + EnumSymbol = "remotePuBusVoltageDerivative"; + } + + if (!EnumSymbol.empty()) + { + os << "RemoteSignalKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp new file mode 100644 index 000000000..17a1358d3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp @@ -0,0 +1,74 @@ +#ifndef RemoteSignalKind_H +#define RemoteSignalKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of input signal coming from remote bus. + */ + class RemoteSignalKind + { + public: + enum RemoteSignalKind_ENUM + { + /** + * Input is voltage frequency from remote terminal bus. + */ + remoteBusVoltageFrequency, + /** + * Input is voltage frequency deviation from remote terminal bus. + */ + remoteBusVoltageFrequencyDeviation, + /** + * Input is frequency from remote terminal bus. + */ + remoteBusFrequency, + /** + * Input is frequency deviation from remote terminal bus. + */ + remoteBusFrequencyDeviation, + /** + * Input is voltage amplitude from remote terminal bus. + */ + remoteBusVoltageAmplitude, + /** + * Input is voltage from remote terminal bus. + */ + remoteBusVoltage, + /** + * Input is branch current amplitude from remote terminal bus. + */ + remoteBranchCurrentAmplitude, + /** + * Input is branch current amplitude derivative from remote terminal bus. + */ + remoteBusVoltageAmplitudeDerivative, + /** + * Input is PU voltage derivative from remote terminal bus. + */ + remotePuBusVoltageDerivative, + }; + + RemoteSignalKind() : value(), initialized(false) {} + RemoteSignalKind(RemoteSignalKind_ENUM value) : value(value), initialized(true) {} + + RemoteSignalKind& operator=(RemoteSignalKind_ENUM rop); + operator RemoteSignalKind_ENUM() const; + + RemoteSignalKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, RemoteSignalKind& rop); + friend std::ostream& operator<<(std::ostream& os, const RemoteSignalKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp b/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp new file mode 100644 index 000000000..c453a2c6f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ReportingGroup.hpp" + +#include +#include + +#include "BusNameMarker.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +ReportingGroup::ReportingGroup() {}; +ReportingGroup::~ReportingGroup() {}; + + + + + +bool assign_BusNameMarker_ReportingGroup(BaseClass*, BaseClass*); +bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReportingGroup* element = dynamic_cast(BaseClass_ptr1); + BusNameMarker* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->BusNameMarker.begin(), element->BusNameMarker.end(), element2) == element->BusNameMarker.end()) + { + element->BusNameMarker.push_back(element2); + return assign_BusNameMarker_ReportingGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_ReportingGroup(BaseClass*, BaseClass*); +bool assign_ReportingGroup_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReportingGroup* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNode.begin(), element->TopologicalNode.end(), element2) == element->TopologicalNode.end()) + { + element->TopologicalNode.push_back(element2); + return assign_TopologicalNode_ReportingGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ReportingGroup::debugName[] = "ReportingGroup"; +const char* ReportingGroup::debugString() const +{ + return ReportingGroup::debugName; +} + +void ReportingGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ReportingGroup"), &ReportingGroup_factory)); +} + +void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ReportingGroup::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ReportingGroup::declare() +{ + return BaseClassDefiner(ReportingGroup::addConstructToMap, ReportingGroup::addPrimitiveAssignFnsToMap, ReportingGroup::addClassAssignFnsToMap, ReportingGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* ReportingGroup_factory() + { + return new ReportingGroup; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp b/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp new file mode 100644 index 000000000..66fb1b9e2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp @@ -0,0 +1,43 @@ +#ifndef ReportingGroup_H +#define ReportingGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class BusNameMarker; + class TopologicalNode; + + /* + A reporting group is used for various ad-hoc groupings used for reporting. + */ + class ReportingGroup : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ReportingGroup_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Resistance.cpp b/CGMES_2.4.13_18DEC2013/Resistance.cpp new file mode 100644 index 000000000..4686fd861 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Resistance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Resistance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Resistance& Resistance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Resistance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Resistance::debugName[] = "Resistance"; +const char* Resistance::debugString() const +{ + return Resistance::debugName; +} + +Resistance& Resistance::operator+=(const Resistance& rhs) +{ + value += rhs.value; + return *this; +} + +Resistance& Resistance::operator-=(const Resistance& rhs) +{ + value -= rhs.value; + return *this; +} + +Resistance& Resistance::operator*=(const Resistance& rhs) +{ + value *= rhs.value; + return *this; +} + +Resistance& Resistance::operator/=(const Resistance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Resistance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Resistance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Resistance.hpp b/CGMES_2.4.13_18DEC2013/Resistance.hpp new file mode 100644 index 000000000..cd68a214f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Resistance.hpp @@ -0,0 +1,39 @@ +#ifndef Resistance_H +#define Resistance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Resistance (real part of impedance). + */ + class Resistance + { + public: + Resistance() : value(0.0), initialized(false) {} + Resistance(long double value) : value(value), initialized(true) {} + + Resistance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Resistance& operator+=(const Resistance& rhs); + Resistance& operator-=(const Resistance& rhs); + Resistance& operator*=(const Resistance& rhs); + Resistance& operator/=(const Resistance& rhs); + + friend std::istream& operator>>(std::istream& lop, Resistance& rop); + friend std::ostream& operator<<(std::ostream& os, const Resistance& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ResistancePerLength.cpp b/CGMES_2.4.13_18DEC2013/ResistancePerLength.cpp new file mode 100644 index 000000000..4fb05fd6b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ResistancePerLength.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ResistancePerLength.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ResistancePerLength& ResistancePerLength::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ResistancePerLength::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ResistancePerLength::debugName[] = "ResistancePerLength"; +const char* ResistancePerLength::debugString() const +{ + return ResistancePerLength::debugName; +} + +ResistancePerLength& ResistancePerLength::operator+=(const ResistancePerLength& rhs) +{ + value += rhs.value; + return *this; +} + +ResistancePerLength& ResistancePerLength::operator-=(const ResistancePerLength& rhs) +{ + value -= rhs.value; + return *this; +} + +ResistancePerLength& ResistancePerLength::operator*=(const ResistancePerLength& rhs) +{ + value *= rhs.value; + return *this; +} + +ResistancePerLength& ResistancePerLength::operator/=(const ResistancePerLength& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ResistancePerLength& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ResistancePerLength& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp b/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp new file mode 100644 index 000000000..dc8f5da8d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp @@ -0,0 +1,39 @@ +#ifndef ResistancePerLength_H +#define ResistancePerLength_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Resistance (real part of impedance) per unit of length. + */ + class ResistancePerLength + { + public: + ResistancePerLength() : value(0.0), initialized(false) {} + ResistancePerLength(long double value) : value(value), initialized(true) {} + + ResistancePerLength& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ResistancePerLength& operator+=(const ResistancePerLength& rhs); + ResistancePerLength& operator-=(const ResistancePerLength& rhs); + ResistancePerLength& operator*=(const ResistancePerLength& rhs); + ResistancePerLength& operator/=(const ResistancePerLength& rhs); + + friend std::istream& operator>>(std::istream& lop, ResistancePerLength& rop); + friend std::ostream& operator<<(std::ostream& os, const ResistancePerLength& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp b/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp new file mode 100644 index 000000000..8943d68a5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotatingMachine.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_RotatingMachine_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_ratedPowerFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedPowerFactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_HydroPump_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HydroPump != element2) + { + element->HydroPump = element2; + return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char RotatingMachine::debugName[] = "RotatingMachine"; +const char* RotatingMachine::debugString() const +{ + return RotatingMachine::debugName; +} + +void RotatingMachine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RotatingMachine::declare() +{ + return BaseClassDefiner(RotatingMachine::addConstructToMap, RotatingMachine::addPrimitiveAssignFnsToMap, RotatingMachine::addClassAssignFnsToMap, RotatingMachine::debugName); +} + +namespace CIMPP +{ + BaseClass* RotatingMachine_factory() + { + return new RotatingMachine; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp b/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp new file mode 100644 index 000000000..52b9d80da --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp @@ -0,0 +1,53 @@ +#ifndef RotatingMachine_H +#define RotatingMachine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ApparentPower.hpp" +#include "ReactivePower.hpp" +#include "Simple_Float.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class GeneratingUnit; + class HydroPump; + + /* + A rotating machine which may be used as a generator or motor. + */ + class RotatingMachine : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RotatingMachine_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp new file mode 100644 index 000000000..8714af2c3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotatingMachineDynamics.hpp" + +#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() {}; + + +bool assign_RotatingMachineDynamics_damping(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->damping; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_inertia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inertia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactor120; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->statorLeakageReactance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_statorResistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->statorResistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char RotatingMachineDynamics::debugName[] = "RotatingMachineDynamics"; +const char* RotatingMachineDynamics::debugString() const +{ + return RotatingMachineDynamics::debugName; +} + +void RotatingMachineDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RotatingMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner RotatingMachineDynamics::declare() +{ + return BaseClassDefiner(RotatingMachineDynamics::addConstructToMap, RotatingMachineDynamics::addPrimitiveAssignFnsToMap, RotatingMachineDynamics::addClassAssignFnsToMap, RotatingMachineDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* RotatingMachineDynamics_factory() + { + return new RotatingMachineDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp new file mode 100644 index 000000000..adebde499 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp @@ -0,0 +1,48 @@ +#ifndef RotatingMachineDynamics_H +#define RotatingMachineDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + Abstract parent class for all synchronous and asynchronous machine standard models. + */ + class RotatingMachineDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RotatingMachineDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RotationSpeed.cpp b/CGMES_2.4.13_18DEC2013/RotationSpeed.cpp new file mode 100644 index 000000000..a0e1b9953 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotationSpeed.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotationSpeed.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RotationSpeed& RotationSpeed::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +RotationSpeed::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RotationSpeed::debugName[] = "RotationSpeed"; +const char* RotationSpeed::debugString() const +{ + return RotationSpeed::debugName; +} + +RotationSpeed& RotationSpeed::operator+=(const RotationSpeed& rhs) +{ + value += rhs.value; + return *this; +} + +RotationSpeed& RotationSpeed::operator-=(const RotationSpeed& rhs) +{ + value -= rhs.value; + return *this; +} + +RotationSpeed& RotationSpeed::operator*=(const RotationSpeed& rhs) +{ + value *= rhs.value; + return *this; +} + +RotationSpeed& RotationSpeed::operator/=(const RotationSpeed& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RotationSpeed& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RotationSpeed& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp b/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp new file mode 100644 index 000000000..20dae4027 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp @@ -0,0 +1,39 @@ +#ifndef RotationSpeed_H +#define RotationSpeed_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Number of revolutions per second. + */ + class RotationSpeed + { + public: + RotationSpeed() : value(0.0), initialized(false) {} + RotationSpeed(long double value) : value(value), initialized(true) {} + + RotationSpeed& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + RotationSpeed& operator+=(const RotationSpeed& rhs); + RotationSpeed& operator-=(const RotationSpeed& rhs); + RotationSpeed& operator*=(const RotationSpeed& rhs); + RotationSpeed& operator/=(const RotationSpeed& rhs); + + friend std::istream& operator>>(std::istream& lop, RotationSpeed& rop); + friend std::ostream& operator<<(std::ostream& os, const RotationSpeed& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/RotorKind.cpp b/CGMES_2.4.13_18DEC2013/RotorKind.cpp new file mode 100644 index 000000000..155faceec --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotorKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RotorKind& RotorKind::operator=(RotorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +RotorKind::operator RotorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RotorKind::debugName[] = "RotorKind"; +const char* RotorKind::debugString() const +{ + return RotorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RotorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "RotorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "roundRotor") + { + rop = RotorKind::roundRotor; + return lop; + } + if(EnumSymbol == "salientPole") + { + rop = RotorKind::salientPole; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RotorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == RotorKind::roundRotor) + { + EnumSymbol = "roundRotor"; + } + if (obj.value == RotorKind::salientPole) + { + EnumSymbol = "salientPole"; + } + + if (!EnumSymbol.empty()) + { + os << "RotorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/RotorKind.hpp b/CGMES_2.4.13_18DEC2013/RotorKind.hpp new file mode 100644 index 000000000..d86eccaa1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/RotorKind.hpp @@ -0,0 +1,46 @@ +#ifndef RotorKind_H +#define RotorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of rotor on physical machine. + */ + class RotorKind + { + public: + enum RotorKind_ENUM + { + /** + * Round rotor type of synchronous machine. + */ + roundRotor, + /** + * Salient pole type of synchronous machine. + */ + salientPole, + }; + + RotorKind() : value(), initialized(false) {} + RotorKind(RotorKind_ENUM value) : value(value), initialized(true) {} + + RotorKind& operator=(RotorKind_ENUM rop); + operator RotorKind_ENUM() const; + + RotorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, RotorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const RotorKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp b/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp new file mode 100644 index 000000000..4ccad37d6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SVCControlMode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SVCControlMode& SVCControlMode::operator=(SVCControlMode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SVCControlMode::operator SVCControlMode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SVCControlMode::debugName[] = "SVCControlMode"; +const char* SVCControlMode::debugString() const +{ + return SVCControlMode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SVCControlMode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SVCControlMode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "reactivePower") + { + rop = SVCControlMode::reactivePower; + return lop; + } + if(EnumSymbol == "voltage") + { + rop = SVCControlMode::voltage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SVCControlMode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SVCControlMode::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == SVCControlMode::voltage) + { + EnumSymbol = "voltage"; + } + + if (!EnumSymbol.empty()) + { + os << "SVCControlMode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp b/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp new file mode 100644 index 000000000..52da28bad --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp @@ -0,0 +1,40 @@ +#ifndef SVCControlMode_H +#define SVCControlMode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Static VAr Compensator control mode. + */ + class SVCControlMode + { + public: + enum SVCControlMode_ENUM + { + reactivePower, + voltage, + }; + + SVCControlMode() : value(), initialized(false) {} + SVCControlMode(SVCControlMode_ENUM value) : value(value), initialized(true) {} + + SVCControlMode& operator=(SVCControlMode_ENUM rop); + operator SVCControlMode_ENUM() const; + + SVCControlMode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SVCControlMode& rop); + friend std::ostream& operator<<(std::ostream& os, const SVCControlMode& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Season.cpp b/CGMES_2.4.13_18DEC2013/Season.cpp new file mode 100644 index 000000000..aa28cae01 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Season.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Season.hpp" + +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "MonthDay.hpp" +#include "MonthDay.hpp" + +using namespace CIMPP; + +Season::Season() {}; +Season::~Season() {}; + + + +bool assign_Season_endDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Season* element = dynamic_cast(BaseClass_ptr1)) + { + element->endDate = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Season_startDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Season* element = dynamic_cast(BaseClass_ptr1)) + { + element->startDate = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); +bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Season* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + +const char Season::debugName[] = "Season"; +const char* Season::debugString() const +{ + return Season::debugName; +} + +void Season::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Season::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Season.SeasonDayTypeSchedules"), &assign_Season_SeasonDayTypeSchedules)); +} + +const BaseClassDefiner Season::declare() +{ + return BaseClassDefiner(Season::addConstructToMap, Season::addPrimitiveAssignFnsToMap, Season::addClassAssignFnsToMap, Season::debugName); +} + +namespace CIMPP +{ + BaseClass* Season_factory() + { + return new Season; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Season.hpp b/CGMES_2.4.13_18DEC2013/Season.hpp new file mode 100644 index 000000000..31957d835 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Season.hpp @@ -0,0 +1,44 @@ +#ifndef Season_H +#define Season_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "MonthDay.hpp" + +namespace CIMPP +{ + class SeasonDayTypeSchedule; + + /* + A specified time period of the year. + */ + class Season : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Season_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp new file mode 100644 index 000000000..0827e77ed --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SeasonDayTypeSchedule.hpp" + +#include +#include + +#include "DayType.hpp" +#include "Season.hpp" + +using namespace CIMPP; + +SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {}; +SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {}; + + + + + +bool assign_DayType_SeasonDayTypeSchedules(BaseClass*, BaseClass*); +bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + DayType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DayType != element2) + { + element->DayType = element2; + return assign_DayType_SeasonDayTypeSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Season_SeasonDayTypeSchedules(BaseClass*, BaseClass*); +bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + Season* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Season != element2) + { + element->Season = element2; + return assign_Season_SeasonDayTypeSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SeasonDayTypeSchedule::debugName[] = "SeasonDayTypeSchedule"; +const char* SeasonDayTypeSchedule::debugString() const +{ + return SeasonDayTypeSchedule::debugName; +} + +void SeasonDayTypeSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule"), &SeasonDayTypeSchedule_factory)); +} + +void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SeasonDayTypeSchedule::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SeasonDayTypeSchedule::declare() +{ + return BaseClassDefiner(SeasonDayTypeSchedule::addConstructToMap, SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap, SeasonDayTypeSchedule::addClassAssignFnsToMap, SeasonDayTypeSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* SeasonDayTypeSchedule_factory() + { + return new SeasonDayTypeSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp new file mode 100644 index 000000000..ee9830d7b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp @@ -0,0 +1,43 @@ +#ifndef SeasonDayTypeSchedule_H +#define SeasonDayTypeSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegularIntervalSchedule.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class SeasonDayTypeSchedule : public RegularIntervalSchedule + { + public: + /* constructor initialising all attributes to null */ + SeasonDayTypeSchedule(); + ~SeasonDayTypeSchedule() override; + + CIMPP::DayType* DayType; /* Schedules that use this DayType. Default: 0 */ + CIMPP::Season* Season; /* Schedules that use this Season. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SeasonDayTypeSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Seconds.cpp b/CGMES_2.4.13_18DEC2013/Seconds.cpp new file mode 100644 index 000000000..31ff76a12 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Seconds.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Seconds.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Seconds& Seconds::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Seconds::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Seconds::debugName[] = "Seconds"; +const char* Seconds::debugString() const +{ + return Seconds::debugName; +} + +Seconds& Seconds::operator+=(const Seconds& rhs) +{ + value += rhs.value; + return *this; +} + +Seconds& Seconds::operator-=(const Seconds& rhs) +{ + value -= rhs.value; + return *this; +} + +Seconds& Seconds::operator*=(const Seconds& rhs) +{ + value *= rhs.value; + return *this; +} + +Seconds& Seconds::operator/=(const Seconds& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Seconds& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Seconds& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Seconds.hpp b/CGMES_2.4.13_18DEC2013/Seconds.hpp new file mode 100644 index 000000000..60e9a668b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Seconds.hpp @@ -0,0 +1,39 @@ +#ifndef Seconds_H +#define Seconds_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Time, in seconds. + */ + class Seconds + { + public: + Seconds() : value(0.0), initialized(false) {} + Seconds(long double value) : value(value), initialized(true) {} + + Seconds& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Seconds& operator+=(const Seconds& rhs); + Seconds& operator-=(const Seconds& rhs); + Seconds& operator*=(const Seconds& rhs); + Seconds& operator/=(const Seconds& rhs); + + friend std::istream& operator>>(std::istream& lop, Seconds& rop); + friend std::ostream& operator<<(std::ostream& os, const Seconds& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp b/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp new file mode 100644 index 000000000..3c0a3d55b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SeriesCompensator.hpp" + +#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() {}; + + +bool assign_SeriesCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_varistorPresent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->varistorPresent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->varistorRatedCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->varistorVoltageThreshold; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char SeriesCompensator::debugName[] = "SeriesCompensator"; +const char* SeriesCompensator::debugString() const +{ + return SeriesCompensator::debugName; +} + +void SeriesCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SeriesCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SeriesCompensator::declare() +{ + return BaseClassDefiner(SeriesCompensator::addConstructToMap, SeriesCompensator::addPrimitiveAssignFnsToMap, SeriesCompensator::addClassAssignFnsToMap, SeriesCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* SeriesCompensator_factory() + { + return new SeriesCompensator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp b/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp new file mode 100644 index 000000000..513d29359 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp @@ -0,0 +1,51 @@ +#ifndef SeriesCompensator_H +#define SeriesCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +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. + */ + class SeriesCompensator : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SeriesCompensator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SetPoint.cpp b/CGMES_2.4.13_18DEC2013/SetPoint.cpp new file mode 100644 index 000000000..3a8c53288 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SetPoint.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SetPoint.hpp" + +#include +#include + +#include "Simple_Float.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +SetPoint::SetPoint() {}; +SetPoint::~SetPoint() {}; + + +bool assign_SetPoint_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SetPoint_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char SetPoint::debugName[] = "SetPoint"; +const char* SetPoint::debugString() const +{ + return SetPoint::debugName; +} + +void SetPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SetPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SetPoint::declare() +{ + return BaseClassDefiner(SetPoint::addConstructToMap, SetPoint::addPrimitiveAssignFnsToMap, SetPoint::addClassAssignFnsToMap, SetPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* SetPoint_factory() + { + return new SetPoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SetPoint.hpp b/CGMES_2.4.13_18DEC2013/SetPoint.hpp new file mode 100644 index 000000000..28ebed07c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SetPoint.hpp @@ -0,0 +1,42 @@ +#ifndef SetPoint_H +#define SetPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AnalogControl.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + An analog control that issue a set point value. + */ + class SetPoint : public AnalogControl + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SetPoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp new file mode 100644 index 000000000..9e7ea1852 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ShortCircuitRotorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ShortCircuitRotorKind& ShortCircuitRotorKind::operator=(ShortCircuitRotorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ShortCircuitRotorKind::operator ShortCircuitRotorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ShortCircuitRotorKind::debugName[] = "ShortCircuitRotorKind"; +const char* ShortCircuitRotorKind::debugString() const +{ + return ShortCircuitRotorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ShortCircuitRotorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "salientPole1") + { + rop = ShortCircuitRotorKind::salientPole1; + return lop; + } + if(EnumSymbol == "salientPole2") + { + rop = ShortCircuitRotorKind::salientPole2; + return lop; + } + if(EnumSymbol == "turboSeries1") + { + rop = ShortCircuitRotorKind::turboSeries1; + return lop; + } + if(EnumSymbol == "turboSeries2") + { + rop = ShortCircuitRotorKind::turboSeries2; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ShortCircuitRotorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ShortCircuitRotorKind::salientPole1) + { + EnumSymbol = "salientPole1"; + } + if (obj.value == ShortCircuitRotorKind::salientPole2) + { + EnumSymbol = "salientPole2"; + } + if (obj.value == ShortCircuitRotorKind::turboSeries1) + { + EnumSymbol = "turboSeries1"; + } + if (obj.value == ShortCircuitRotorKind::turboSeries2) + { + EnumSymbol = "turboSeries2"; + } + + if (!EnumSymbol.empty()) + { + os << "ShortCircuitRotorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp new file mode 100644 index 000000000..76f473214 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ShortCircuitRotorKind_H +#define ShortCircuitRotorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of rotor, used by short circuit applications. + */ + class ShortCircuitRotorKind + { + public: + enum ShortCircuitRotorKind_ENUM + { + /** + * Salient pole 1 in the IEC 60909 + */ + salientPole1, + /** + * Salient pole 2 in IEC 60909 + */ + salientPole2, + /** + * Turbo Series 1 in the IEC 60909 + */ + turboSeries1, + /** + * Turbo series 2 in IEC 60909 + */ + turboSeries2, + }; + + ShortCircuitRotorKind() : value(), initialized(false) {} + ShortCircuitRotorKind(ShortCircuitRotorKind_ENUM value) : value(value), initialized(true) {} + + ShortCircuitRotorKind& operator=(ShortCircuitRotorKind_ENUM rop); + operator ShortCircuitRotorKind_ENUM() const; + + ShortCircuitRotorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ShortCircuitRotorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ShortCircuitRotorKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp b/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp new file mode 100644 index 000000000..b205bfc3b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp @@ -0,0 +1,211 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ShuntCompensator.hpp" + +#include +#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() {}; + + + +bool assign_ShuntCompensator_aVRDelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aVRDelay; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->grounded; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_maximumSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maximumSections; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_nomU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nomU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_normalSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalSections; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sections; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_switchOnCount(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->switchOnCount; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_switchOnDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + +const char ShuntCompensator::debugName[] = "ShuntCompensator"; +const char* ShuntCompensator::debugString() const +{ + return ShuntCompensator::debugName; +} + +void ShuntCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.SvShuntCompensatorSections"), &assign_ShuntCompensator_SvShuntCompensatorSections)); +} + +const BaseClassDefiner ShuntCompensator::declare() +{ + return BaseClassDefiner(ShuntCompensator::addConstructToMap, ShuntCompensator::addPrimitiveAssignFnsToMap, ShuntCompensator::addClassAssignFnsToMap, ShuntCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* ShuntCompensator_factory() + { + return new ShuntCompensator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp b/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp new file mode 100644 index 000000000..9285b79ef --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp @@ -0,0 +1,57 @@ +#ifndef ShuntCompensator_H +#define ShuntCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "DateTime.hpp" +#include "Integer.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "Voltage.hpp" +#include "VoltagePerReactivePower.hpp" + +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. + */ + class ShuntCompensator : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ShuntCompensator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Simple_Float.cpp b/CGMES_2.4.13_18DEC2013/Simple_Float.cpp new file mode 100644 index 000000000..447282928 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Simple_Float.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Simple_Float.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Simple_Float& Simple_Float::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Simple_Float::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Simple_Float::debugName[] = "Simple_Float"; +const char* Simple_Float::debugString() const +{ + return Simple_Float::debugName; +} + +Simple_Float& Simple_Float::operator+=(const Simple_Float& rhs) +{ + value += rhs.value; + return *this; +} + +Simple_Float& Simple_Float::operator-=(const Simple_Float& rhs) +{ + value -= rhs.value; + return *this; +} + +Simple_Float& Simple_Float::operator*=(const Simple_Float& rhs) +{ + value *= rhs.value; + return *this; +} + +Simple_Float& Simple_Float::operator/=(const Simple_Float& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Simple_Float& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Simple_Float& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Simple_Float.hpp b/CGMES_2.4.13_18DEC2013/Simple_Float.hpp new file mode 100644 index 000000000..58d48ce8f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Simple_Float.hpp @@ -0,0 +1,39 @@ +#ifndef Simple_Float_H +#define Simple_Float_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + A floating point number. The range is unspecified and not limited. + */ + class Simple_Float + { + public: + Simple_Float() : value(0.0), initialized(false) {} + Simple_Float(long double value) : value(value), initialized(true) {} + + Simple_Float& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Simple_Float& operator+=(const Simple_Float& rhs); + Simple_Float& operator-=(const Simple_Float& rhs); + Simple_Float& operator*=(const Simple_Float& rhs); + Simple_Float& operator/=(const Simple_Float& rhs); + + friend std::istream& operator>>(std::istream& lop, Simple_Float& rop); + friend std::ostream& operator<<(std::ostream& os, const Simple_Float& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp new file mode 100644 index 000000000..729d7b8ce --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SolarGeneratingUnit.hpp" + +#include +#include + + +using namespace CIMPP; + +SolarGeneratingUnit::SolarGeneratingUnit() {}; +SolarGeneratingUnit::~SolarGeneratingUnit() {}; + + + +const char SolarGeneratingUnit::debugName[] = "SolarGeneratingUnit"; +const char* SolarGeneratingUnit::debugString() const +{ + return SolarGeneratingUnit::debugName; +} + +void SolarGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit"), &SolarGeneratingUnit_factory)); +} + +void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SolarGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SolarGeneratingUnit::declare() +{ + return BaseClassDefiner(SolarGeneratingUnit::addConstructToMap, SolarGeneratingUnit::addPrimitiveAssignFnsToMap, SolarGeneratingUnit::addClassAssignFnsToMap, SolarGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* SolarGeneratingUnit_factory() + { + return new SolarGeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp new file mode 100644 index 000000000..0fa75b7ac --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp @@ -0,0 +1,39 @@ +#ifndef SolarGeneratingUnit_H +#define SolarGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A solar thermal generating unit. + */ + class SolarGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + SolarGeneratingUnit(); + ~SolarGeneratingUnit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SolarGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Source.cpp b/CGMES_2.4.13_18DEC2013/Source.cpp new file mode 100644 index 000000000..54f9266b5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Source.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Source.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Source& Source::operator=(Source_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +Source::operator Source_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Source::debugName[] = "Source"; +const char* Source::debugString() const +{ + return Source::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Source& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "Source") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "PROCESS") + { + rop = Source::PROCESS; + return lop; + } + if(EnumSymbol == "DEFAULTED") + { + rop = Source::DEFAULTED; + return lop; + } + if(EnumSymbol == "SUBSTITUTED") + { + rop = Source::SUBSTITUTED; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Source& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == Source::PROCESS) + { + EnumSymbol = "PROCESS"; + } + if (obj.value == Source::DEFAULTED) + { + EnumSymbol = "DEFAULTED"; + } + if (obj.value == Source::SUBSTITUTED) + { + EnumSymbol = "SUBSTITUTED"; + } + + if (!EnumSymbol.empty()) + { + os << "Source." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Source.hpp b/CGMES_2.4.13_18DEC2013/Source.hpp new file mode 100644 index 000000000..0cbf17fb0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Source.hpp @@ -0,0 +1,50 @@ +#ifndef Source_H +#define Source_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + PROCESS, + /** + * The value contains a default value. + */ + DEFAULTED, + /** + * The value is provided by input of an operator or by an automatic source. + */ + SUBSTITUTED, + }; + + Source() : value(), initialized(false) {} + Source(Source_ENUM value) : value(value), initialized(true) {} + + Source& operator=(Source_ENUM rop); + operator Source_ENUM() const; + + Source_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Source& rop); + friend std::ostream& operator<<(std::ostream& os, const Source& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp new file mode 100644 index 000000000..4ec1e2cae --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StateVariablesVersion.hpp" + +#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() {}; + + +bool assign_StateVariablesVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StateVariablesVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char StateVariablesVersion::debugName[] = "StateVariablesVersion"; +const char* StateVariablesVersion::debugString() const +{ + return StateVariablesVersion::debugName; +} + +void StateVariablesVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void StateVariablesVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner StateVariablesVersion::declare() +{ + return BaseClassDefiner(StateVariablesVersion::addConstructToMap, StateVariablesVersion::addPrimitiveAssignFnsToMap, StateVariablesVersion::addClassAssignFnsToMap, StateVariablesVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* StateVariablesVersion_factory() + { + return new StateVariablesVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp new file mode 100644 index 000000000..adc7bfe6d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp @@ -0,0 +1,51 @@ +#ifndef StateVariablesVersion_H +#define StateVariablesVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class StateVariablesVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StateVariablesVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp new file mode 100644 index 000000000..e3d149299 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StaticLoadModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +StaticLoadModelKind& StaticLoadModelKind::operator=(StaticLoadModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +StaticLoadModelKind::operator StaticLoadModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char StaticLoadModelKind::debugName[] = "StaticLoadModelKind"; +const char* StaticLoadModelKind::debugString() const +{ + return StaticLoadModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, StaticLoadModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "StaticLoadModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "exponential") + { + rop = StaticLoadModelKind::exponential; + return lop; + } + if(EnumSymbol == "zIP1") + { + rop = StaticLoadModelKind::zIP1; + return lop; + } + if(EnumSymbol == "zIP2") + { + rop = StaticLoadModelKind::zIP2; + return lop; + } + if(EnumSymbol == "constantZ") + { + rop = StaticLoadModelKind::constantZ; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const StaticLoadModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == StaticLoadModelKind::exponential) + { + EnumSymbol = "exponential"; + } + if (obj.value == StaticLoadModelKind::zIP1) + { + EnumSymbol = "zIP1"; + } + if (obj.value == StaticLoadModelKind::zIP2) + { + EnumSymbol = "zIP2"; + } + if (obj.value == StaticLoadModelKind::constantZ) + { + EnumSymbol = "constantZ"; + } + + if (!EnumSymbol.empty()) + { + os << "StaticLoadModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp new file mode 100644 index 000000000..362cca7ea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp @@ -0,0 +1,54 @@ +#ifndef StaticLoadModelKind_H +#define StaticLoadModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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, + /** + * 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. + */ + zIP2, + /** + * The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. + */ + constantZ, + }; + + StaticLoadModelKind() : value(), initialized(false) {} + StaticLoadModelKind(StaticLoadModelKind_ENUM value) : value(value), initialized(true) {} + + StaticLoadModelKind& operator=(StaticLoadModelKind_ENUM rop); + operator StaticLoadModelKind_ENUM() const; + + StaticLoadModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, StaticLoadModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const StaticLoadModelKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp new file mode 100644 index 000000000..46d3ed25b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StaticVarCompensator.hpp" + +#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() {}; + + +bool assign_StaticVarCompensator_capacitiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitiveRating; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_inductiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductiveRating; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_sVCControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sVCControlMode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_slope(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->slope; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageSetPoint; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char StaticVarCompensator::debugName[] = "StaticVarCompensator"; +const char* StaticVarCompensator::debugString() const +{ + return StaticVarCompensator::debugName; +} + +void StaticVarCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void StaticVarCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner StaticVarCompensator::declare() +{ + return BaseClassDefiner(StaticVarCompensator::addConstructToMap, StaticVarCompensator::addPrimitiveAssignFnsToMap, StaticVarCompensator::addClassAssignFnsToMap, StaticVarCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* StaticVarCompensator_factory() + { + return new StaticVarCompensator; + } +} diff --git a/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp new file mode 100644 index 000000000..f42209f24 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp @@ -0,0 +1,50 @@ +#ifndef StaticVarCompensator_H +#define StaticVarCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "SVCControlMode.hpp" +#include "Voltage.hpp" +#include "VoltagePerReactivePower.hpp" + +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. + */ + class StaticVarCompensator : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StaticVarCompensator_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/StationSupply.cpp b/CGMES_2.4.13_18DEC2013/StationSupply.cpp new file mode 100644 index 000000000..ba3e084c7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StationSupply.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StationSupply.hpp" + +#include +#include + + +using namespace CIMPP; + +StationSupply::StationSupply() {}; +StationSupply::~StationSupply() {}; + + + +const char StationSupply::debugName[] = "StationSupply"; +const char* StationSupply::debugString() const +{ + return StationSupply::debugName; +} + +void StationSupply::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:StationSupply"), &StationSupply_factory)); +} + +void StationSupply::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void StationSupply::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner StationSupply::declare() +{ + return BaseClassDefiner(StationSupply::addConstructToMap, StationSupply::addPrimitiveAssignFnsToMap, StationSupply::addClassAssignFnsToMap, StationSupply::debugName); +} + +namespace CIMPP +{ + BaseClass* StationSupply_factory() + { + return new StationSupply; + } +} diff --git a/CGMES_2.4.13_18DEC2013/StationSupply.hpp b/CGMES_2.4.13_18DEC2013/StationSupply.hpp new file mode 100644 index 000000000..e8dad59fe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StationSupply.hpp @@ -0,0 +1,39 @@ +#ifndef StationSupply_H +#define StationSupply_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConsumer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + Station supply with load derived from the station output. + */ + class StationSupply : public EnergyConsumer + { + public: + /* constructor initialising all attributes to null */ + StationSupply(); + ~StationSupply() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StationSupply_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp new file mode 100644 index 000000000..2533eb481 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SteadyStateHypothesisVersion.hpp" + +#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() {}; + + +bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char SteadyStateHypothesisVersion::debugName[] = "SteadyStateHypothesisVersion"; +const char* SteadyStateHypothesisVersion::debugString() const +{ + return SteadyStateHypothesisVersion::debugName; +} + +void SteadyStateHypothesisVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SteadyStateHypothesisVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SteadyStateHypothesisVersion::declare() +{ + return BaseClassDefiner(SteadyStateHypothesisVersion::addConstructToMap, SteadyStateHypothesisVersion::addPrimitiveAssignFnsToMap, SteadyStateHypothesisVersion::addClassAssignFnsToMap, SteadyStateHypothesisVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* SteadyStateHypothesisVersion_factory() + { + return new SteadyStateHypothesisVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp new file mode 100644 index 000000000..7eeaa2af7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp @@ -0,0 +1,51 @@ +#ifndef SteadyStateHypothesisVersion_H +#define SteadyStateHypothesisVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class SteadyStateHypothesisVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SteadyStateHypothesisVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/String.cpp b/CGMES_2.4.13_18DEC2013/String.cpp new file mode 100644 index 000000000..e39ff2f00 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/String.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "String.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +String& String::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +String::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char String::debugName[] = "String"; +const char* String::debugString() const +{ + return String::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, String& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const String& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/String.hpp b/CGMES_2.4.13_18DEC2013/String.hpp new file mode 100644 index 000000000..60fcbbbc0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/String.hpp @@ -0,0 +1,35 @@ +#ifndef String_H +#define String_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#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. + */ + class String + { + public: + String() : initialized(false) {} + String(const std::string& value) : value(value), initialized(true) {} + + String& operator=(const std::string &rop); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, String& rop); + friend std::ostream& operator<<(std::ostream& os, const String& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp b/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp new file mode 100644 index 000000000..1eb7acf05 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StringMeasurement.hpp" + +#include +#include + +#include "StringMeasurementValue.hpp" + +using namespace CIMPP; + +StringMeasurement::StringMeasurement() {}; +StringMeasurement::~StringMeasurement() {}; + + + + +bool assign_StringMeasurementValue_StringMeasurement(BaseClass*, BaseClass*); +bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + StringMeasurement* element = dynamic_cast(BaseClass_ptr1); + StringMeasurementValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->StringMeasurementValues.begin(), element->StringMeasurementValues.end(), element2) == element->StringMeasurementValues.end()) + { + element->StringMeasurementValues.push_back(element2); + return assign_StringMeasurementValue_StringMeasurement(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char StringMeasurement::debugName[] = "StringMeasurement"; +const char* StringMeasurement::debugString() const +{ + return StringMeasurement::debugName; +} + +void StringMeasurement::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:StringMeasurement"), &StringMeasurement_factory)); +} + +void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void StringMeasurement::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:StringMeasurement.StringMeasurementValues"), &assign_StringMeasurement_StringMeasurementValues)); +} + +const BaseClassDefiner StringMeasurement::declare() +{ + return BaseClassDefiner(StringMeasurement::addConstructToMap, StringMeasurement::addPrimitiveAssignFnsToMap, StringMeasurement::addClassAssignFnsToMap, StringMeasurement::debugName); +} + +namespace CIMPP +{ + BaseClass* StringMeasurement_factory() + { + return new StringMeasurement; + } +} diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp b/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp new file mode 100644 index 000000000..dbe295067 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp @@ -0,0 +1,41 @@ +#ifndef StringMeasurement_H +#define StringMeasurement_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class StringMeasurementValue; + + /* + StringMeasurement represents a measurement with values of type string. + */ + class StringMeasurement : public Measurement + { + public: + /* constructor initialising all attributes to null */ + StringMeasurement(); + ~StringMeasurement() override; + + std::list StringMeasurementValues; /* The values connected to this measurement. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StringMeasurement_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp new file mode 100644 index 000000000..68102fc0e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StringMeasurementValue.hpp" + +#include +#include + +#include "StringMeasurement.hpp" +#include "String.hpp" + +using namespace CIMPP; + +StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {}; +StringMeasurementValue::~StringMeasurementValue() {}; + + + +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) +{ + StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + StringMeasurement* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->StringMeasurement != element2) + { + element->StringMeasurement = element2; + return assign_StringMeasurement_StringMeasurementValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char StringMeasurementValue::debugName[] = "StringMeasurementValue"; +const char* StringMeasurementValue::debugString() const +{ + return StringMeasurementValue::debugName; +} + +void StringMeasurementValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void StringMeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.StringMeasurement"), &assign_StringMeasurementValue_StringMeasurement)); +} + +const BaseClassDefiner StringMeasurementValue::declare() +{ + return BaseClassDefiner(StringMeasurementValue::addConstructToMap, StringMeasurementValue::addPrimitiveAssignFnsToMap, StringMeasurementValue::addClassAssignFnsToMap, StringMeasurementValue::debugName); +} + +namespace CIMPP +{ + BaseClass* StringMeasurementValue_factory() + { + return new StringMeasurementValue; + } +} diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp new file mode 100644 index 000000000..415428c41 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp @@ -0,0 +1,43 @@ +#ifndef StringMeasurementValue_H +#define StringMeasurementValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class StringMeasurement; + + /* + StringMeasurementValue represents a measurement value of type string. + */ + class StringMeasurementValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + StringMeasurementValue(); + ~StringMeasurementValue() override; + + CIMPP::StringMeasurement* StringMeasurement; /* Measurement to which this value is connected. Default: 0 */ + CIMPP::String value; /* The value to supervise. Default: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StringMeasurementValue_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp new file mode 100644 index 000000000..f16780fa0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SubGeographicalRegion.hpp" + +#include +#include + +#include "DCLine.hpp" +#include "Line.hpp" +#include "GeographicalRegion.hpp" +#include "Substation.hpp" + +using namespace CIMPP; + +SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {}; +SubGeographicalRegion::~SubGeographicalRegion() {}; + + + + + + + +bool assign_DCLine_Region(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + DCLine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCLines.begin(), element->DCLines.end(), element2) == element->DCLines.end()) + { + element->DCLines.push_back(element2); + return assign_DCLine_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Line_Region(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + Line* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Lines.begin(), element->Lines.end(), element2) == element->Lines.end()) + { + element->Lines.push_back(element2); + return assign_Line_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeographicalRegion_Regions(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + GeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_GeographicalRegion_Regions(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Substation_Region(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + Substation* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Substations.begin(), element->Substations.end(), element2) == element->Substations.end()) + { + element->Substations.push_back(element2); + return assign_Substation_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SubGeographicalRegion::debugName[] = "SubGeographicalRegion"; +const char* SubGeographicalRegion::debugString() const +{ + return SubGeographicalRegion::debugName; +} + +void SubGeographicalRegion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion"), &SubGeographicalRegion_factory)); +} + +void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SubGeographicalRegion::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SubGeographicalRegion::declare() +{ + return BaseClassDefiner(SubGeographicalRegion::addConstructToMap, SubGeographicalRegion::addPrimitiveAssignFnsToMap, SubGeographicalRegion::addClassAssignFnsToMap, SubGeographicalRegion::debugName); +} + +namespace CIMPP +{ + BaseClass* SubGeographicalRegion_factory() + { + return new SubGeographicalRegion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp new file mode 100644 index 000000000..99e296385 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp @@ -0,0 +1,47 @@ +#ifndef SubGeographicalRegion_H +#define SubGeographicalRegion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCLine; + class GeographicalRegion; + class Line; + class Substation; + + /* + A subset of a geographical region of a power system network model. + */ + class SubGeographicalRegion : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SubGeographicalRegion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp b/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp new file mode 100644 index 000000000..d52b226c0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SubLoadArea.hpp" + +#include +#include + +#include "LoadArea.hpp" +#include "LoadGroup.hpp" + +using namespace CIMPP; + +SubLoadArea::SubLoadArea() : LoadArea(nullptr) {}; +SubLoadArea::~SubLoadArea() {}; + + + + + +bool assign_LoadArea_SubLoadAreas(BaseClass*, BaseClass*); +bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + LoadArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadArea != element2) + { + element->LoadArea = element2; + return assign_LoadArea_SubLoadAreas(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_LoadGroup_SubLoadArea(BaseClass*, BaseClass*); +bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + LoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->LoadGroups.begin(), element->LoadGroups.end(), element2) == element->LoadGroups.end()) + { + element->LoadGroups.push_back(element2); + return assign_LoadGroup_SubLoadArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SubLoadArea::debugName[] = "SubLoadArea"; +const char* SubLoadArea::debugString() const +{ + return SubLoadArea::debugName; +} + +void SubLoadArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SubLoadArea"), &SubLoadArea_factory)); +} + +void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SubLoadArea::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SubLoadArea::declare() +{ + return BaseClassDefiner(SubLoadArea::addConstructToMap, SubLoadArea::addPrimitiveAssignFnsToMap, SubLoadArea::addClassAssignFnsToMap, SubLoadArea::debugName); +} + +namespace CIMPP +{ + BaseClass* SubLoadArea_factory() + { + return new SubLoadArea; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp b/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp new file mode 100644 index 000000000..344ee5c42 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp @@ -0,0 +1,43 @@ +#ifndef SubLoadArea_H +#define SubLoadArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyArea.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class SubLoadArea : public EnergyArea + { + public: + /* constructor initialising all attributes to null */ + SubLoadArea(); + ~SubLoadArea() override; + + CIMPP::LoadArea* LoadArea; /* The LoadArea where the SubLoadArea belongs. Default: 0 */ + std::list LoadGroups; /* The Loadgroups in the SubLoadArea. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SubLoadArea_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Substation.cpp b/CGMES_2.4.13_18DEC2013/Substation.cpp new file mode 100644 index 000000000..1184170ee --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Substation.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Substation.hpp" + +#include +#include + +#include "DCConverterUnit.hpp" +#include "SubGeographicalRegion.hpp" +#include "VoltageLevel.hpp" + +using namespace CIMPP; + +Substation::Substation() : Region(nullptr) {}; +Substation::~Substation() {}; + + + + + + +bool assign_DCConverterUnit_Substation(BaseClass*, BaseClass*); +bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Substation* element = dynamic_cast(BaseClass_ptr1); + DCConverterUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCConverterUnit.begin(), element->DCConverterUnit.end(), element2) == element->DCConverterUnit.end()) + { + element->DCConverterUnit.push_back(element2); + return assign_DCConverterUnit_Substation(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SubGeographicalRegion_Substations(BaseClass*, BaseClass*); +bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Substation* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_SubGeographicalRegion_Substations(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageLevel_Substation(BaseClass*, BaseClass*); +bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Substation* element = dynamic_cast(BaseClass_ptr1); + VoltageLevel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VoltageLevels.begin(), element->VoltageLevels.end(), element2) == element->VoltageLevels.end()) + { + element->VoltageLevels.push_back(element2); + return assign_VoltageLevel_Substation(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Substation::debugName[] = "Substation"; +const char* Substation::debugString() const +{ + return Substation::debugName; +} + +void Substation::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Substation"), &Substation_factory)); +} + +void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Substation::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Substation::declare() +{ + return BaseClassDefiner(Substation::addConstructToMap, Substation::addPrimitiveAssignFnsToMap, Substation::addClassAssignFnsToMap, Substation::debugName); +} + +namespace CIMPP +{ + BaseClass* Substation_factory() + { + return new Substation; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Substation.hpp b/CGMES_2.4.13_18DEC2013/Substation.hpp new file mode 100644 index 000000000..a1a9e6881 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Substation.hpp @@ -0,0 +1,45 @@ +#ifndef Substation_H +#define Substation_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCConverterUnit; + 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. + */ + class Substation : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Substation_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Susceptance.cpp b/CGMES_2.4.13_18DEC2013/Susceptance.cpp new file mode 100644 index 000000000..2c15bc914 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Susceptance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Susceptance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Susceptance& Susceptance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Susceptance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Susceptance::debugName[] = "Susceptance"; +const char* Susceptance::debugString() const +{ + return Susceptance::debugName; +} + +Susceptance& Susceptance::operator+=(const Susceptance& rhs) +{ + value += rhs.value; + return *this; +} + +Susceptance& Susceptance::operator-=(const Susceptance& rhs) +{ + value -= rhs.value; + return *this; +} + +Susceptance& Susceptance::operator*=(const Susceptance& rhs) +{ + value *= rhs.value; + return *this; +} + +Susceptance& Susceptance::operator/=(const Susceptance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Susceptance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Susceptance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Susceptance.hpp b/CGMES_2.4.13_18DEC2013/Susceptance.hpp new file mode 100644 index 000000000..c213337b1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Susceptance.hpp @@ -0,0 +1,39 @@ +#ifndef Susceptance_H +#define Susceptance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Imaginary part of admittance. + */ + class Susceptance + { + public: + Susceptance() : value(0.0), initialized(false) {} + Susceptance(long double value) : value(value), initialized(true) {} + + Susceptance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Susceptance& operator+=(const Susceptance& rhs); + Susceptance& operator-=(const Susceptance& rhs); + Susceptance& operator*=(const Susceptance& rhs); + Susceptance& operator/=(const Susceptance& rhs); + + friend std::istream& operator>>(std::istream& lop, Susceptance& rop); + friend std::ostream& operator<<(std::ostream& os, const Susceptance& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SvInjection.cpp b/CGMES_2.4.13_18DEC2013/SvInjection.cpp new file mode 100644 index 000000000..bed4c3d82 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvInjection.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvInjection.hpp" + +#include +#include + +#include "TopologicalNode.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +using namespace CIMPP; + +SvInjection::SvInjection() : TopologicalNode(nullptr) {}; +SvInjection::~SvInjection() {}; + + + +bool assign_SvInjection_pInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pInjection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SvInjection_qInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qInjection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); +bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SvInjection* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char SvInjection::debugName[] = "SvInjection"; +const char* SvInjection::debugString() const +{ + return SvInjection::debugName; +} + +void SvInjection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvInjection.TopologicalNode"), &assign_SvInjection_TopologicalNode)); +} + +const BaseClassDefiner SvInjection::declare() +{ + return BaseClassDefiner(SvInjection::addConstructToMap, SvInjection::addPrimitiveAssignFnsToMap, SvInjection::addClassAssignFnsToMap, SvInjection::debugName); +} + +namespace CIMPP +{ + BaseClass* SvInjection_factory() + { + return new SvInjection; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SvInjection.hpp b/CGMES_2.4.13_18DEC2013/SvInjection.hpp new file mode 100644 index 000000000..cc2f21267 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvInjection.hpp @@ -0,0 +1,45 @@ +#ifndef SvInjection_H +#define SvInjection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +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. + */ + class SvInjection : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvInjection_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp b/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp new file mode 100644 index 000000000..96125e597 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvPowerFlow.hpp" + +#include +#include + +#include "Terminal.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +using namespace CIMPP; + +SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {}; +SvPowerFlow::~SvPowerFlow() {}; + + + +bool assign_SvPowerFlow_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SvPowerFlow_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); +bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char SvPowerFlow::debugName[] = "SvPowerFlow"; +const char* SvPowerFlow::debugString() const +{ + return SvPowerFlow::debugName; +} + +void SvPowerFlow::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvPowerFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.Terminal"), &assign_SvPowerFlow_Terminal)); +} + +const BaseClassDefiner SvPowerFlow::declare() +{ + return BaseClassDefiner(SvPowerFlow::addConstructToMap, SvPowerFlow::addPrimitiveAssignFnsToMap, SvPowerFlow::addClassAssignFnsToMap, SvPowerFlow::debugName); +} + +namespace CIMPP +{ + BaseClass* SvPowerFlow_factory() + { + return new SvPowerFlow; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp b/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp new file mode 100644 index 000000000..a5075dfae --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp @@ -0,0 +1,45 @@ +#ifndef SvPowerFlow_H +#define SvPowerFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +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. + */ + class SvPowerFlow : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvPowerFlow_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp new file mode 100644 index 000000000..11f0ceeb5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvShuntCompensatorSections.hpp" + +#include +#include + +#include "ShuntCompensator.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {}; +SvShuntCompensatorSections::~SvShuntCompensatorSections() {}; + + + +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) +{ + SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + ShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ShuntCompensator != element2) + { + element->ShuntCompensator = element2; + return assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvShuntCompensatorSections::debugName[] = "SvShuntCompensatorSections"; +const char* SvShuntCompensatorSections::debugString() const +{ + return SvShuntCompensatorSections::debugName; +} + +void SvShuntCompensatorSections::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvShuntCompensatorSections::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.ShuntCompensator"), &assign_SvShuntCompensatorSections_ShuntCompensator)); +} + +const BaseClassDefiner SvShuntCompensatorSections::declare() +{ + return BaseClassDefiner(SvShuntCompensatorSections::addConstructToMap, SvShuntCompensatorSections::addPrimitiveAssignFnsToMap, SvShuntCompensatorSections::addClassAssignFnsToMap, SvShuntCompensatorSections::debugName); +} + +namespace CIMPP +{ + BaseClass* SvShuntCompensatorSections_factory() + { + return new SvShuntCompensatorSections; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp new file mode 100644 index 000000000..0541b7d9b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp @@ -0,0 +1,43 @@ +#ifndef SvShuntCompensatorSections_H +#define SvShuntCompensatorSections_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class ShuntCompensator; + + /* + State variable for the number of sections in service for a shunt compensator. + */ + class SvShuntCompensatorSections : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvShuntCompensatorSections_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SvStatus.cpp b/CGMES_2.4.13_18DEC2013/SvStatus.cpp new file mode 100644 index 000000000..57825fc15 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvStatus.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvStatus.hpp" + +#include +#include + +#include "ConductingEquipment.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +SvStatus::SvStatus() : ConductingEquipment(nullptr) {}; +SvStatus::~SvStatus() {}; + + + +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) +{ + SvStatus* element = dynamic_cast(BaseClass_ptr1); + ConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConductingEquipment != element2) + { + element->ConductingEquipment = element2; + return assign_ConductingEquipment_SvStatus(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvStatus::debugName[] = "SvStatus"; +const char* SvStatus::debugString() const +{ + return SvStatus::debugName; +} + +void SvStatus::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvStatus::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvStatus.ConductingEquipment"), &assign_SvStatus_ConductingEquipment)); +} + +const BaseClassDefiner SvStatus::declare() +{ + return BaseClassDefiner(SvStatus::addConstructToMap, SvStatus::addPrimitiveAssignFnsToMap, SvStatus::addClassAssignFnsToMap, SvStatus::debugName); +} + +namespace CIMPP +{ + BaseClass* SvStatus_factory() + { + return new SvStatus; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SvStatus.hpp b/CGMES_2.4.13_18DEC2013/SvStatus.hpp new file mode 100644 index 000000000..6c2d2d10e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvStatus.hpp @@ -0,0 +1,43 @@ +#ifndef SvStatus_H +#define SvStatus_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ConductingEquipment; + + /* + State variable for status. + */ + class SvStatus : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvStatus_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SvTapStep.cpp b/CGMES_2.4.13_18DEC2013/SvTapStep.cpp new file mode 100644 index 000000000..e828dc3e3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvTapStep.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvTapStep.hpp" + +#include +#include + +#include "TapChanger.hpp" +#include "Simple_Float.hpp" + +using namespace CIMPP; + +SvTapStep::SvTapStep() : TapChanger(nullptr) {}; +SvTapStep::~SvTapStep() {}; + + + +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) +{ + SvTapStep* element = dynamic_cast(BaseClass_ptr1); + TapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TapChanger != element2) + { + element->TapChanger = element2; + return assign_TapChanger_SvTapStep(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvTapStep::debugName[] = "SvTapStep"; +const char* SvTapStep::debugString() const +{ + return SvTapStep::debugName; +} + +void SvTapStep::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvTapStep::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvTapStep.TapChanger"), &assign_SvTapStep_TapChanger)); +} + +const BaseClassDefiner SvTapStep::declare() +{ + return BaseClassDefiner(SvTapStep::addConstructToMap, SvTapStep::addPrimitiveAssignFnsToMap, SvTapStep::addClassAssignFnsToMap, SvTapStep::debugName); +} + +namespace CIMPP +{ + BaseClass* SvTapStep_factory() + { + return new SvTapStep; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SvTapStep.hpp b/CGMES_2.4.13_18DEC2013/SvTapStep.hpp new file mode 100644 index 000000000..74a224484 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvTapStep.hpp @@ -0,0 +1,43 @@ +#ifndef SvTapStep_H +#define SvTapStep_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Simple_Float.hpp" + +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. + */ + class SvTapStep : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvTapStep_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SvVoltage.cpp b/CGMES_2.4.13_18DEC2013/SvVoltage.cpp new file mode 100644 index 000000000..95b8265ea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvVoltage.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvVoltage.hpp" + +#include +#include + +#include "TopologicalNode.hpp" +#include "AngleDegrees.hpp" +#include "Voltage.hpp" + +using namespace CIMPP; + +SvVoltage::SvVoltage() : TopologicalNode(nullptr) {}; +SvVoltage::~SvVoltage() {}; + + + +bool assign_SvVoltage_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->angle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SvVoltage_v(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->v; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); +bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char SvVoltage::debugName[] = "SvVoltage"; +const char* SvVoltage::debugString() const +{ + return SvVoltage::debugName; +} + +void SvVoltage::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvVoltage.TopologicalNode"), &assign_SvVoltage_TopologicalNode)); +} + +const BaseClassDefiner SvVoltage::declare() +{ + return BaseClassDefiner(SvVoltage::addConstructToMap, SvVoltage::addPrimitiveAssignFnsToMap, SvVoltage::addClassAssignFnsToMap, SvVoltage::debugName); +} + +namespace CIMPP +{ + BaseClass* SvVoltage_factory() + { + return new SvVoltage; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SvVoltage.hpp b/CGMES_2.4.13_18DEC2013/SvVoltage.hpp new file mode 100644 index 000000000..f70a44314 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SvVoltage.hpp @@ -0,0 +1,45 @@ +#ifndef SvVoltage_H +#define SvVoltage_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class TopologicalNode; + + /* + State variable for voltage. + */ + class SvVoltage : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvVoltage_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Switch.cpp b/CGMES_2.4.13_18DEC2013/Switch.cpp new file mode 100644 index 000000000..dc1be1a67 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Switch.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Switch.hpp" + +#include +#include + +#include "SwitchSchedule.hpp" +#include "Boolean.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +Switch::Switch() {}; +Switch::~Switch() {}; + + + +bool assign_Switch_normalOpen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalOpen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->open; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_ratedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_retained(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->retained; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Switch* element = dynamic_cast(BaseClass_ptr1); + SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + +const char Switch::debugName[] = "Switch"; +const char* Switch::debugString() const +{ + return Switch::debugName; +} + +void Switch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Switch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Switch.SwitchSchedules"), &assign_Switch_SwitchSchedules)); +} + +const BaseClassDefiner Switch::declare() +{ + return BaseClassDefiner(Switch::addConstructToMap, Switch::addPrimitiveAssignFnsToMap, Switch::addClassAssignFnsToMap, Switch::debugName); +} + +namespace CIMPP +{ + BaseClass* Switch_factory() + { + return new Switch; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Switch.hpp b/CGMES_2.4.13_18DEC2013/Switch.hpp new file mode 100644 index 000000000..431a0db40 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Switch.hpp @@ -0,0 +1,47 @@ +#ifndef Switch_H +#define Switch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" + +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. + */ + class Switch : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Switch_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp b/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp new file mode 100644 index 000000000..2181dfba6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SwitchSchedule.hpp" + +#include +#include + +#include "Switch.hpp" + +using namespace CIMPP; + +SwitchSchedule::SwitchSchedule() : Switch(nullptr) {}; +SwitchSchedule::~SwitchSchedule() {}; + + + + +bool assign_Switch_SwitchSchedules(BaseClass*, BaseClass*); +bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SwitchSchedule* element = dynamic_cast(BaseClass_ptr1); + Switch* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Switch != element2) + { + element->Switch = element2; + return assign_Switch_SwitchSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SwitchSchedule::debugName[] = "SwitchSchedule"; +const char* SwitchSchedule::debugString() const +{ + return SwitchSchedule::debugName; +} + +void SwitchSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SwitchSchedule"), &SwitchSchedule_factory)); +} + +void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SwitchSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SwitchSchedule.Switch"), &assign_SwitchSchedule_Switch)); +} + +const BaseClassDefiner SwitchSchedule::declare() +{ + return BaseClassDefiner(SwitchSchedule::addConstructToMap, SwitchSchedule::addPrimitiveAssignFnsToMap, SwitchSchedule::addClassAssignFnsToMap, SwitchSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* SwitchSchedule_factory() + { + return new SwitchSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp b/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp new file mode 100644 index 000000000..91f5fe1aa --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef SwitchSchedule_H +#define SwitchSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Switch; + + /* + 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: + /* constructor initialising all attributes to null */ + SwitchSchedule(); + ~SwitchSchedule() override; + + CIMPP::Switch* Switch; /* A Switch can be associated with SwitchSchedules. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SwitchSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp new file mode 100644 index 000000000..0de495d1b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp @@ -0,0 +1,423 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachine.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_SynchronousMachine_earthing(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->earthing; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthingStarPointR(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->earthingStarPointR; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthingStarPointX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->earthingStarPointX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_ikk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ikk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_mu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operatingMode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_qPercent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qPercent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->referencePriority; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->satDirectSubtransX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_satDirectSyncX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->satDirectSyncX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_satDirectTransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->satDirectTransX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->shortCircuitRotorType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageRegulationRange; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + 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; +} + + + + + + + + + + + + + + + + + + + + + + +const char SynchronousMachine::debugName[] = "SynchronousMachine"; +const char* SynchronousMachine::debugString() const +{ + return SynchronousMachine::debugName; +} + +void SynchronousMachine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner SynchronousMachine::declare() +{ + return BaseClassDefiner(SynchronousMachine::addConstructToMap, SynchronousMachine::addPrimitiveAssignFnsToMap, SynchronousMachine::addClassAssignFnsToMap, SynchronousMachine::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachine_factory() + { + return new SynchronousMachine; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp new file mode 100644 index 000000000..4c5f7ed12 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp @@ -0,0 +1,76 @@ +#ifndef SynchronousMachine_H +#define SynchronousMachine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachine.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "PerCent.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "ShortCircuitRotorKind.hpp" +#include "Simple_Float.hpp" +#include "SynchronousMachineKind.hpp" +#include "SynchronousMachineOperatingMode.hpp" + +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. + */ + class SynchronousMachine : public RotatingMachine + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachine_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp new file mode 100644 index 000000000..7d74fe85f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineDetailed.hpp" + +#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() {}; + + +bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdBaseRatio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdBaseType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdBaseValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactor120QAxis; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactorQAxis; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char SynchronousMachineDetailed::debugName[] = "SynchronousMachineDetailed"; +const char* SynchronousMachineDetailed::debugString() const +{ + return SynchronousMachineDetailed::debugName; +} + +void SynchronousMachineDetailed::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineDetailed::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineDetailed::declare() +{ + return BaseClassDefiner(SynchronousMachineDetailed::addConstructToMap, SynchronousMachineDetailed::addPrimitiveAssignFnsToMap, SynchronousMachineDetailed::addClassAssignFnsToMap, SynchronousMachineDetailed::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineDetailed_factory() + { + return new SynchronousMachineDetailed; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp new file mode 100644 index 000000000..3d7c37290 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp @@ -0,0 +1,47 @@ +#ifndef SynchronousMachineDetailed_H +#define SynchronousMachineDetailed_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" +#include "IfdBaseKind.hpp" +#include "Simple_Float.hpp" + +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. + */ + class SynchronousMachineDetailed : public SynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineDetailed_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp new file mode 100644 index 000000000..9ef4f1aca --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "GenICompensationForGenJ.hpp" +#include "MechanicalLoadDynamics.hpp" +#include "SynchronousMachine.hpp" +#include "TurbineGovernorDynamics.hpp" + +using namespace CIMPP; + +SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {}; +SynchronousMachineDynamics::~SynchronousMachineDynamics() {}; + + + + + + + + +bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + GenICompensationForGenJ* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GenICompensationForGenJ.begin(), element->GenICompensationForGenJ.end(), element2) == element->GenICompensationForGenJ.end()) + { + element->GenICompensationForGenJ.push_back(element2); + return assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + MechanicalLoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MechanicalLoadDynamics != element2) + { + element->MechanicalLoadDynamics = element2; + return assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachine != element2) + { + element->SynchronousMachine = element2; + return assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TurbineGovernorDynamics.begin(), element->TurbineGovernorDynamics.end(), element2) == element->TurbineGovernorDynamics.end()) + { + element->TurbineGovernorDynamics.push_back(element2); + return assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SynchronousMachineDynamics::debugName[] = "SynchronousMachineDynamics"; +const char* SynchronousMachineDynamics::debugString() const +{ + return SynchronousMachineDynamics::debugName; +} + +void SynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics"), &SynchronousMachineDynamics_factory)); +} + +void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SynchronousMachineDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SynchronousMachineDynamics::declare() +{ + return BaseClassDefiner(SynchronousMachineDynamics::addConstructToMap, SynchronousMachineDynamics::addPrimitiveAssignFnsToMap, SynchronousMachineDynamics::addClassAssignFnsToMap, SynchronousMachineDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineDynamics_factory() + { + return new SynchronousMachineDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp new file mode 100644 index 000000000..ee5e3e2cf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp @@ -0,0 +1,49 @@ +#ifndef SynchronousMachineDynamics_H +#define SynchronousMachineDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + class GenICompensationForGenJ; + class MechanicalLoadDynamics; + class SynchronousMachine; + class TurbineGovernorDynamics; + + /* + Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: + */ + class SynchronousMachineDynamics : public RotatingMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp new file mode 100644 index 000000000..a228afafe --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineEquivalentCircuit.hpp" + +#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() {}; + + +bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r1d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r1q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r2q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x1d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x1q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x2q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xad; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xaq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xf1d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char SynchronousMachineEquivalentCircuit::debugName[] = "SynchronousMachineEquivalentCircuit"; +const char* SynchronousMachineEquivalentCircuit::debugString() const +{ + return SynchronousMachineEquivalentCircuit::debugName; +} + +void SynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineEquivalentCircuit::declare() +{ + return BaseClassDefiner(SynchronousMachineEquivalentCircuit::addConstructToMap, SynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap, SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap, SynchronousMachineEquivalentCircuit::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineEquivalentCircuit_factory() + { + return new SynchronousMachineEquivalentCircuit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp new file mode 100644 index 000000000..47630a0f5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp @@ -0,0 +1,51 @@ +#ifndef SynchronousMachineEquivalentCircuit_H +#define SynchronousMachineEquivalentCircuit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDetailed.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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. + */ + class SynchronousMachineEquivalentCircuit : public SynchronousMachineDetailed + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineEquivalentCircuit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp new file mode 100644 index 000000000..55bd958b0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp @@ -0,0 +1,135 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SynchronousMachineKind& SynchronousMachineKind::operator=(SynchronousMachineKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SynchronousMachineKind::operator SynchronousMachineKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SynchronousMachineKind::debugName[] = "SynchronousMachineKind"; +const char* SynchronousMachineKind::debugString() const +{ + return SynchronousMachineKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SynchronousMachineKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SynchronousMachineKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = SynchronousMachineKind::generator; + return lop; + } + if(EnumSymbol == "condenser") + { + rop = SynchronousMachineKind::condenser; + return lop; + } + if(EnumSymbol == "generatorOrCondenser") + { + rop = SynchronousMachineKind::generatorOrCondenser; + return lop; + } + if(EnumSymbol == "motor") + { + rop = SynchronousMachineKind::motor; + return lop; + } + if(EnumSymbol == "generatorOrMotor") + { + rop = SynchronousMachineKind::generatorOrMotor; + return lop; + } + if(EnumSymbol == "motorOrCondenser") + { + rop = SynchronousMachineKind::motorOrCondenser; + return lop; + } + if(EnumSymbol == "generatorOrCondenserOrMotor") + { + rop = SynchronousMachineKind::generatorOrCondenserOrMotor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SynchronousMachineKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SynchronousMachineKind::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == SynchronousMachineKind::condenser) + { + EnumSymbol = "condenser"; + } + if (obj.value == SynchronousMachineKind::generatorOrCondenser) + { + EnumSymbol = "generatorOrCondenser"; + } + if (obj.value == SynchronousMachineKind::motor) + { + EnumSymbol = "motor"; + } + if (obj.value == SynchronousMachineKind::generatorOrMotor) + { + EnumSymbol = "generatorOrMotor"; + } + if (obj.value == SynchronousMachineKind::motorOrCondenser) + { + EnumSymbol = "motorOrCondenser"; + } + if (obj.value == SynchronousMachineKind::generatorOrCondenserOrMotor) + { + EnumSymbol = "generatorOrCondenserOrMotor"; + } + + if (!EnumSymbol.empty()) + { + os << "SynchronousMachineKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp new file mode 100644 index 000000000..9b3eaf71b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp @@ -0,0 +1,45 @@ +#ifndef SynchronousMachineKind_H +#define SynchronousMachineKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Synchronous machine type. + */ + class SynchronousMachineKind + { + public: + enum SynchronousMachineKind_ENUM + { + generator, + condenser, + generatorOrCondenser, + motor, + generatorOrMotor, + motorOrCondenser, + generatorOrCondenserOrMotor, + }; + + SynchronousMachineKind() : value(), initialized(false) {} + SynchronousMachineKind(SynchronousMachineKind_ENUM value) : value(value), initialized(true) {} + + SynchronousMachineKind& operator=(SynchronousMachineKind_ENUM rop); + operator SynchronousMachineKind_ENUM() const; + + SynchronousMachineKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SynchronousMachineKind& rop); + friend std::ostream& operator<<(std::ostream& os, const SynchronousMachineKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp new file mode 100644 index 000000000..10460ede1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp @@ -0,0 +1,117 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SynchronousMachineModelKind& SynchronousMachineModelKind::operator=(SynchronousMachineModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SynchronousMachineModelKind::operator SynchronousMachineModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SynchronousMachineModelKind::debugName[] = "SynchronousMachineModelKind"; +const char* SynchronousMachineModelKind::debugString() const +{ + return SynchronousMachineModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SynchronousMachineModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "subtransient") + { + rop = SynchronousMachineModelKind::subtransient; + return lop; + } + if(EnumSymbol == "subtransientTypeF") + { + rop = SynchronousMachineModelKind::subtransientTypeF; + return lop; + } + if(EnumSymbol == "subtransientTypeJ") + { + rop = SynchronousMachineModelKind::subtransientTypeJ; + return lop; + } + if(EnumSymbol == "subtransientSimplified") + { + rop = SynchronousMachineModelKind::subtransientSimplified; + return lop; + } + if(EnumSymbol == "subtransientSimplifiedDirectAxis") + { + rop = SynchronousMachineModelKind::subtransientSimplifiedDirectAxis; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SynchronousMachineModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SynchronousMachineModelKind::subtransient) + { + EnumSymbol = "subtransient"; + } + if (obj.value == SynchronousMachineModelKind::subtransientTypeF) + { + EnumSymbol = "subtransientTypeF"; + } + if (obj.value == SynchronousMachineModelKind::subtransientTypeJ) + { + EnumSymbol = "subtransientTypeJ"; + } + if (obj.value == SynchronousMachineModelKind::subtransientSimplified) + { + EnumSymbol = "subtransientSimplified"; + } + if (obj.value == SynchronousMachineModelKind::subtransientSimplifiedDirectAxis) + { + EnumSymbol = "subtransientSimplifiedDirectAxis"; + } + + if (!EnumSymbol.empty()) + { + os << "SynchronousMachineModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp new file mode 100644 index 000000000..06da8b2b5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp @@ -0,0 +1,58 @@ +#ifndef SynchronousMachineModelKind_H +#define SynchronousMachineModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of synchronous machine model used in Dynamic simulation applications. + */ + class SynchronousMachineModelKind + { + public: + enum SynchronousMachineModelKind_ENUM + { + /** + * Subtransient synchronous machine model. + */ + subtransient, + /** + * WECC Type F variant of subtransient synchronous machine model. + */ + subtransientTypeF, + /** + * 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. + */ + subtransientSimplified, + /** + * Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. + */ + subtransientSimplifiedDirectAxis, + }; + + SynchronousMachineModelKind() : value(), initialized(false) {} + SynchronousMachineModelKind(SynchronousMachineModelKind_ENUM value) : value(value), initialized(true) {} + + SynchronousMachineModelKind& operator=(SynchronousMachineModelKind_ENUM rop); + operator SynchronousMachineModelKind_ENUM() const; + + SynchronousMachineModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SynchronousMachineModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const SynchronousMachineModelKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp new file mode 100644 index 000000000..92b1e2cc3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineOperatingMode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SynchronousMachineOperatingMode& SynchronousMachineOperatingMode::operator=(SynchronousMachineOperatingMode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SynchronousMachineOperatingMode::operator SynchronousMachineOperatingMode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SynchronousMachineOperatingMode::debugName[] = "SynchronousMachineOperatingMode"; +const char* SynchronousMachineOperatingMode::debugString() const +{ + return SynchronousMachineOperatingMode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SynchronousMachineOperatingMode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = SynchronousMachineOperatingMode::generator; + return lop; + } + if(EnumSymbol == "condenser") + { + rop = SynchronousMachineOperatingMode::condenser; + return lop; + } + if(EnumSymbol == "motor") + { + rop = SynchronousMachineOperatingMode::motor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SynchronousMachineOperatingMode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SynchronousMachineOperatingMode::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == SynchronousMachineOperatingMode::condenser) + { + EnumSymbol = "condenser"; + } + if (obj.value == SynchronousMachineOperatingMode::motor) + { + EnumSymbol = "motor"; + } + + if (!EnumSymbol.empty()) + { + os << "SynchronousMachineOperatingMode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp new file mode 100644 index 000000000..464590a5b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp @@ -0,0 +1,41 @@ +#ifndef SynchronousMachineOperatingMode_H +#define SynchronousMachineOperatingMode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Synchronous machine operating mode. + */ + class SynchronousMachineOperatingMode + { + public: + enum SynchronousMachineOperatingMode_ENUM + { + generator, + condenser, + motor, + }; + + SynchronousMachineOperatingMode() : value(), initialized(false) {} + SynchronousMachineOperatingMode(SynchronousMachineOperatingMode_ENUM value) : value(value), initialized(true) {} + + SynchronousMachineOperatingMode& operator=(SynchronousMachineOperatingMode_ENUM rop); + operator SynchronousMachineOperatingMode_ENUM() const; + + SynchronousMachineOperatingMode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SynchronousMachineOperatingMode& rop); + friend std::ostream& operator<<(std::ostream& os, const SynchronousMachineOperatingMode& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp new file mode 100644 index 000000000..c871a8180 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineSimplified.hpp" + +#include +#include + + +using namespace CIMPP; + +SynchronousMachineSimplified::SynchronousMachineSimplified() {}; +SynchronousMachineSimplified::~SynchronousMachineSimplified() {}; + + + +const char SynchronousMachineSimplified::debugName[] = "SynchronousMachineSimplified"; +const char* SynchronousMachineSimplified::debugString() const +{ + return SynchronousMachineSimplified::debugName; +} + +void SynchronousMachineSimplified::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineSimplified"), &SynchronousMachineSimplified_factory)); +} + +void SynchronousMachineSimplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SynchronousMachineSimplified::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineSimplified::declare() +{ + return BaseClassDefiner(SynchronousMachineSimplified::addConstructToMap, SynchronousMachineSimplified::addPrimitiveAssignFnsToMap, SynchronousMachineSimplified::addClassAssignFnsToMap, SynchronousMachineSimplified::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineSimplified_factory() + { + return new SynchronousMachineSimplified; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp new file mode 100644 index 000000000..3cb0a9a5d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp @@ -0,0 +1,39 @@ +#ifndef SynchronousMachineSimplified_H +#define SynchronousMachineSimplified_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" + +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: + */ + class SynchronousMachineSimplified : public SynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + SynchronousMachineSimplified(); + ~SynchronousMachineSimplified() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineSimplified_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp new file mode 100644 index 000000000..78d9a31b1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineTimeConstantReactance.hpp" + +#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() {}; + + +bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->modelType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rotorType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpdo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppdo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppqo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpqo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xDirectSubtrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xDirectSync; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xDirectTrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xQuadSubtrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xQuadSync; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xQuadTrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char SynchronousMachineTimeConstantReactance::debugName[] = "SynchronousMachineTimeConstantReactance"; +const char* SynchronousMachineTimeConstantReactance::debugString() const +{ + return SynchronousMachineTimeConstantReactance::debugName; +} + +void SynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineTimeConstantReactance::declare() +{ + return BaseClassDefiner(SynchronousMachineTimeConstantReactance::addConstructToMap, SynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap, SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap, SynchronousMachineTimeConstantReactance::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineTimeConstantReactance_factory() + { + return new SynchronousMachineTimeConstantReactance; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp new file mode 100644 index 000000000..7742a80ed --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp @@ -0,0 +1,58 @@ +#ifndef SynchronousMachineTimeConstantReactance_H +#define SynchronousMachineTimeConstantReactance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDetailed.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "RotorKind.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" +#include "SynchronousMachineModelKind.hpp" + +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: + */ + class SynchronousMachineTimeConstantReactance : public SynchronousMachineDetailed + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineTimeConstantReactance_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp new file mode 100644 index 000000000..80c109209 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +SynchronousMachineUserDefined::SynchronousMachineUserDefined() {}; +SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {}; + + + +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) +{ + SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SynchronousMachineUserDefined::debugName[] = "SynchronousMachineUserDefined"; +const char* SynchronousMachineUserDefined::debugString() const +{ + return SynchronousMachineUserDefined::debugName; +} + +void SynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner SynchronousMachineUserDefined::declare() +{ + return BaseClassDefiner(SynchronousMachineUserDefined::addConstructToMap, SynchronousMachineUserDefined::addPrimitiveAssignFnsToMap, SynchronousMachineUserDefined::addClassAssignFnsToMap, SynchronousMachineUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineUserDefined_factory() + { + return new SynchronousMachineUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp new file mode 100644 index 000000000..801d49502 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef SynchronousMachineUserDefined_H +#define SynchronousMachineUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Synchronous machine whose dynamic behaviour is described by a user-defined model. + */ + class SynchronousMachineUserDefined : public SynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TapChanger.cpp b/CGMES_2.4.13_18DEC2013/TapChanger.cpp new file mode 100644 index 000000000..b353d76ce --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapChanger.cpp @@ -0,0 +1,235 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapChanger.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_TapChanger_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->controlEnabled; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_highStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->highStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_lowStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lowStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_ltcFlag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ltcFlag; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_neutralStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->neutralStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_neutralU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->neutralU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_normalStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->step; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_TapChangerControl_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TapChangerControl != element2) + { + element->TapChangerControl = element2; + return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + + + + +const char TapChanger::debugName[] = "TapChanger"; +const char* TapChanger::debugString() const +{ + return TapChanger::debugName; +} + +void TapChanger::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TapChanger::declare() +{ + return BaseClassDefiner(TapChanger::addConstructToMap, TapChanger::addPrimitiveAssignFnsToMap, TapChanger::addClassAssignFnsToMap, TapChanger::debugName); +} + +namespace CIMPP +{ + BaseClass* TapChanger_factory() + { + return new TapChanger; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TapChanger.hpp b/CGMES_2.4.13_18DEC2013/TapChanger.hpp new file mode 100644 index 000000000..674003d92 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapChanger.hpp @@ -0,0 +1,57 @@ +#ifndef TapChanger_H +#define TapChanger_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class SvTapStep; + class TapChangerControl; + class TapSchedule; + + /* + Mechanism for changing transformer winding tap positions. + */ + class TapChanger : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapChanger_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp b/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp new file mode 100644 index 000000000..031f9704e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapChangerControl.hpp" + +#include +#include + +#include "TapChanger.hpp" + +using namespace CIMPP; + +TapChangerControl::TapChangerControl() {}; +TapChangerControl::~TapChangerControl() {}; + + + + +bool assign_TapChanger_TapChangerControl(BaseClass*, BaseClass*); +bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChangerControl* element = dynamic_cast(BaseClass_ptr1); + TapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TapChanger.begin(), element->TapChanger.end(), element2) == element->TapChanger.end()) + { + element->TapChanger.push_back(element2); + return assign_TapChanger_TapChangerControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TapChangerControl::debugName[] = "TapChangerControl"; +const char* TapChangerControl::debugString() const +{ + return TapChangerControl::debugName; +} + +void TapChangerControl::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TapChangerControl"), &TapChangerControl_factory)); +} + +void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TapChangerControl::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TapChangerControl.TapChanger"), &assign_TapChangerControl_TapChanger)); +} + +const BaseClassDefiner TapChangerControl::declare() +{ + return BaseClassDefiner(TapChangerControl::addConstructToMap, TapChangerControl::addPrimitiveAssignFnsToMap, TapChangerControl::addClassAssignFnsToMap, TapChangerControl::debugName); +} + +namespace CIMPP +{ + BaseClass* TapChangerControl_factory() + { + return new TapChangerControl; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp b/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp new file mode 100644 index 000000000..7e19b5b7a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp @@ -0,0 +1,41 @@ +#ifndef TapChangerControl_H +#define TapChangerControl_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingControl.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class TapChangerControl : public RegulatingControl + { + public: + /* constructor initialising all attributes to null */ + TapChangerControl(); + ~TapChangerControl() override; + + std::list TapChanger; /* The regulating control scheme in which this tap changer participates. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapChangerControl_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp new file mode 100644 index 000000000..764d42bac --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapChangerTablePoint.hpp" + +#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() {}; + + +bool assign_TapChangerTablePoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->step; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char TapChangerTablePoint::debugName[] = "TapChangerTablePoint"; +const char* TapChangerTablePoint::debugString() const +{ + return TapChangerTablePoint::debugName; +} + +void TapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TapChangerTablePoint::declare() +{ + return BaseClassDefiner(TapChangerTablePoint::addConstructToMap, TapChangerTablePoint::addPrimitiveAssignFnsToMap, TapChangerTablePoint::addClassAssignFnsToMap, TapChangerTablePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* TapChangerTablePoint_factory() + { + return new TapChangerTablePoint; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp new file mode 100644 index 000000000..72c16526f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp @@ -0,0 +1,45 @@ +#ifndef TapChangerTablePoint_H +#define TapChangerTablePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "PerCent.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + class TapChangerTablePoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapChangerTablePoint_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TapSchedule.cpp b/CGMES_2.4.13_18DEC2013/TapSchedule.cpp new file mode 100644 index 000000000..638119eee --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapSchedule.hpp" + +#include +#include + +#include "TapChanger.hpp" + +using namespace CIMPP; + +TapSchedule::TapSchedule() : TapChanger(nullptr) {}; +TapSchedule::~TapSchedule() {}; + + + + +bool assign_TapChanger_TapSchedules(BaseClass*, BaseClass*); +bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapSchedule* element = dynamic_cast(BaseClass_ptr1); + TapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TapChanger != element2) + { + element->TapChanger = element2; + return assign_TapChanger_TapSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TapSchedule::debugName[] = "TapSchedule"; +const char* TapSchedule::debugString() const +{ + return TapSchedule::debugName; +} + +void TapSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TapSchedule"), &TapSchedule_factory)); +} + +void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TapSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TapSchedule.TapChanger"), &assign_TapSchedule_TapChanger)); +} + +const BaseClassDefiner TapSchedule::declare() +{ + return BaseClassDefiner(TapSchedule::addConstructToMap, TapSchedule::addPrimitiveAssignFnsToMap, TapSchedule::addClassAssignFnsToMap, TapSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* TapSchedule_factory() + { + return new TapSchedule; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TapSchedule.hpp b/CGMES_2.4.13_18DEC2013/TapSchedule.hpp new file mode 100644 index 000000000..540c7935e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TapSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef TapSchedule_H +#define TapSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class TapChanger; + + /* + A pre-established pattern over time for a tap step. + */ + class TapSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + TapSchedule(); + ~TapSchedule() override; + + CIMPP::TapChanger* TapChanger; /* A TapChanger can have TapSchedules. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapSchedule_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Temperature.cpp b/CGMES_2.4.13_18DEC2013/Temperature.cpp new file mode 100644 index 000000000..3a788af85 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Temperature.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Temperature.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Temperature& Temperature::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Temperature::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Temperature::debugName[] = "Temperature"; +const char* Temperature::debugString() const +{ + return Temperature::debugName; +} + +Temperature& Temperature::operator+=(const Temperature& rhs) +{ + value += rhs.value; + return *this; +} + +Temperature& Temperature::operator-=(const Temperature& rhs) +{ + value -= rhs.value; + return *this; +} + +Temperature& Temperature::operator*=(const Temperature& rhs) +{ + value *= rhs.value; + return *this; +} + +Temperature& Temperature::operator/=(const Temperature& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Temperature& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Temperature& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Temperature.hpp b/CGMES_2.4.13_18DEC2013/Temperature.hpp new file mode 100644 index 000000000..33ba8ea2b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Temperature.hpp @@ -0,0 +1,39 @@ +#ifndef Temperature_H +#define Temperature_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Value of temperature in degrees Celsius. + */ + class Temperature + { + public: + Temperature() : value(0.0), initialized(false) {} + Temperature(long double value) : value(value), initialized(true) {} + + Temperature& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Temperature& operator+=(const Temperature& rhs); + Temperature& operator-=(const Temperature& rhs); + Temperature& operator*=(const Temperature& rhs); + Temperature& operator/=(const Temperature& rhs); + + friend std::istream& operator>>(std::istream& lop, Temperature& rop); + friend std::ostream& operator<<(std::ostream& os, const Temperature& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Terminal.cpp b/CGMES_2.4.13_18DEC2013/Terminal.cpp new file mode 100644 index 000000000..76c977550 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Terminal.cpp @@ -0,0 +1,283 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Terminal.hpp" + +#include +#include + +#include "ConductingEquipment.hpp" +#include "ConnectivityNode.hpp" +#include "ACDCConverter.hpp" +#include "MutualCoupling.hpp" +#include "MutualCoupling.hpp" +#include "RegulatingControl.hpp" +#include "RemoteInputSignal.hpp" +#include "SvPowerFlow.hpp" +#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() {}; + + + + + + + + + + + + + +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) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + ConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConductingEquipment != element2) + { + element->ConductingEquipment = element2; + return assign_ConductingEquipment_Terminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConnectivityNode_Terminals(BaseClass*, BaseClass*); +bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* 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_Terminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCConverter_PccTerminal(BaseClass*, BaseClass*); +bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + ACDCConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConverterDCSides.begin(), element->ConverterDCSides.end(), element2) == element->ConverterDCSides.end()) + { + element->ConverterDCSides.push_back(element2); + return assign_ACDCConverter_PccTerminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MutualCoupling_First_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + MutualCoupling* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HasFirstMutualCoupling.begin(), element->HasFirstMutualCoupling.end(), element2) == element->HasFirstMutualCoupling.end()) + { + element->HasFirstMutualCoupling.push_back(element2); + return assign_MutualCoupling_First_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MutualCoupling_Second_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + MutualCoupling* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HasSecondMutualCoupling.begin(), element->HasSecondMutualCoupling.end(), element2) == element->HasSecondMutualCoupling.end()) + { + element->HasSecondMutualCoupling.push_back(element2); + return assign_MutualCoupling_Second_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RegulatingControl_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + RegulatingControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RegulatingControl != element2) + { + element->RegulatingControl = element2; + return assign_RegulatingControl_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RemoteInputSignal.begin(), element->RemoteInputSignal.end(), element2) == element->RemoteInputSignal.end()) + { + element->RemoteInputSignal.push_back(element2); + return assign_RemoteInputSignal_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvPowerFlow_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + SvPowerFlow* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvPowerFlow != element2) + { + element->SvPowerFlow = element2; + return assign_SvPowerFlow_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TieFlow_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + TieFlow* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TieFlow.begin(), element->TieFlow.end(), element2) == element->TieFlow.end()) + { + element->TieFlow.push_back(element2); + return assign_TieFlow_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TransformerEnd_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TransformerEnd.begin(), element->TransformerEnd.end(), element2) == element->TransformerEnd.end()) + { + element->TransformerEnd.push_back(element2); + return assign_TransformerEnd_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char Terminal::debugName[] = "Terminal"; +const char* Terminal::debugString() const +{ + return Terminal::debugName; +} + +void Terminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Terminal::declare() +{ + return BaseClassDefiner(Terminal::addConstructToMap, Terminal::addPrimitiveAssignFnsToMap, Terminal::addClassAssignFnsToMap, Terminal::debugName); +} + +namespace CIMPP +{ + BaseClass* Terminal_factory() + { + return new Terminal; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Terminal.hpp b/CGMES_2.4.13_18DEC2013/Terminal.hpp new file mode 100644 index 000000000..410b5d9b5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Terminal.hpp @@ -0,0 +1,62 @@ +#ifndef Terminal_H +#define Terminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCTerminal.hpp" +#include "BaseClassDefiner.hpp" +#include "PhaseCode.hpp" + +namespace CIMPP +{ + class ACDCConverter; + class ConductingEquipment; + class ConnectivityNode; + class MutualCoupling; + class RegulatingControl; + class RemoteInputSignal; + class SvPowerFlow; + class TieFlow; + 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. + */ + class Terminal : public ACDCTerminal + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Terminal_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp b/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp new file mode 100644 index 000000000..df7e44767 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TextDiagramObject.hpp" + +#include +#include + +#include "String.hpp" + +using namespace CIMPP; + +TextDiagramObject::TextDiagramObject() {}; +TextDiagramObject::~TextDiagramObject() {}; + + +bool assign_TextDiagramObject_text(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->text = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char TextDiagramObject::debugName[] = "TextDiagramObject"; +const char* TextDiagramObject::debugString() const +{ + return TextDiagramObject::debugName; +} + +void TextDiagramObject::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TextDiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TextDiagramObject::declare() +{ + return BaseClassDefiner(TextDiagramObject::addConstructToMap, TextDiagramObject::addPrimitiveAssignFnsToMap, TextDiagramObject::addClassAssignFnsToMap, TextDiagramObject::debugName); +} + +namespace CIMPP +{ + BaseClass* TextDiagramObject_factory() + { + return new TextDiagramObject; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp b/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp new file mode 100644 index 000000000..a683f51d4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp @@ -0,0 +1,41 @@ +#ifndef TextDiagramObject_H +#define TextDiagramObject_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiagramObject.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + A diagram object for placing free-text or text derived from an associated domain object. + */ + class TextDiagramObject : public DiagramObject + { + public: + /* constructor initialising all attributes to null */ + TextDiagramObject(); + ~TextDiagramObject() override; + + CIMPP::String text; /* The text that is displayed by this text diagram object. Default: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TextDiagramObject_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp new file mode 100644 index 000000000..976f64b7b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ThermalGeneratingUnit.hpp" + +#include +#include + +#include "FossilFuel.hpp" + +using namespace CIMPP; + +ThermalGeneratingUnit::ThermalGeneratingUnit() {}; +ThermalGeneratingUnit::~ThermalGeneratingUnit() {}; + + + + +bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + FossilFuel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->FossilFuels.begin(), element->FossilFuels.end(), element2) == element->FossilFuels.end()) + { + element->FossilFuels.push_back(element2); + return assign_FossilFuel_ThermalGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ThermalGeneratingUnit::debugName[] = "ThermalGeneratingUnit"; +const char* ThermalGeneratingUnit::debugString() const +{ + return ThermalGeneratingUnit::debugName; +} + +void ThermalGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit"), &ThermalGeneratingUnit_factory)); +} + +void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ThermalGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.FossilFuels"), &assign_ThermalGeneratingUnit_FossilFuels)); +} + +const BaseClassDefiner ThermalGeneratingUnit::declare() +{ + return BaseClassDefiner(ThermalGeneratingUnit::addConstructToMap, ThermalGeneratingUnit::addPrimitiveAssignFnsToMap, ThermalGeneratingUnit::addClassAssignFnsToMap, ThermalGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* ThermalGeneratingUnit_factory() + { + return new ThermalGeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp new file mode 100644 index 000000000..ea4d6ff7c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp @@ -0,0 +1,41 @@ +#ifndef ThermalGeneratingUnit_H +#define ThermalGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class FossilFuel; + + /* + A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. + */ + class ThermalGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + ThermalGeneratingUnit(); + ~ThermalGeneratingUnit() override; + + std::list FossilFuels; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ThermalGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TieFlow.cpp b/CGMES_2.4.13_18DEC2013/TieFlow.cpp new file mode 100644 index 000000000..f7f2139c5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TieFlow.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TieFlow.hpp" + +#include +#include + +#include "ControlArea.hpp" +#include "Terminal.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {}; +TieFlow::~TieFlow() {}; + + + + +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) +{ + TieFlow* element = dynamic_cast(BaseClass_ptr1); + ControlArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ControlArea != element2) + { + element->ControlArea = element2; + return assign_ControlArea_TieFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_TieFlow(BaseClass*, BaseClass*); +bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TieFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_TieFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char TieFlow::debugName[] = "TieFlow"; +const char* TieFlow::debugString() const +{ + return TieFlow::debugName; +} + +void TieFlow::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TieFlow::declare() +{ + return BaseClassDefiner(TieFlow::addConstructToMap, TieFlow::addPrimitiveAssignFnsToMap, TieFlow::addClassAssignFnsToMap, TieFlow::debugName); +} + +namespace CIMPP +{ + BaseClass* TieFlow_factory() + { + return new TieFlow; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TieFlow.hpp b/CGMES_2.4.13_18DEC2013/TieFlow.hpp new file mode 100644 index 000000000..2e02b52d2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TieFlow.hpp @@ -0,0 +1,45 @@ +#ifndef TieFlow_H +#define TieFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ControlArea; + class Terminal; + + /* + A flow specification in terms of location and direction for a control area. + */ + class TieFlow : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TieFlow_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp b/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp new file mode 100644 index 000000000..8ee4fba25 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TopologicalIsland.hpp" + +#include +#include + +#include "TopologicalNode.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {}; +TopologicalIsland::~TopologicalIsland() {}; + + + + + +bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass*, BaseClass*); +bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AngleRefTopologicalNode != element2) + { + element->AngleRefTopologicalNode = element2; + return assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_TopologicalIsland(BaseClass*, BaseClass*); +bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNodes.begin(), element->TopologicalNodes.end(), element2) == element->TopologicalNodes.end()) + { + element->TopologicalNodes.push_back(element2); + return assign_TopologicalNode_TopologicalIsland(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TopologicalIsland::debugName[] = "TopologicalIsland"; +const char* TopologicalIsland::debugString() const +{ + return TopologicalIsland::debugName; +} + +void TopologicalIsland::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TopologicalIsland"), &TopologicalIsland_factory)); +} + +void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TopologicalIsland::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner TopologicalIsland::declare() +{ + return BaseClassDefiner(TopologicalIsland::addConstructToMap, TopologicalIsland::addPrimitiveAssignFnsToMap, TopologicalIsland::addClassAssignFnsToMap, TopologicalIsland::debugName); +} + +namespace CIMPP +{ + BaseClass* TopologicalIsland_factory() + { + return new TopologicalIsland; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp b/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp new file mode 100644 index 000000000..8ddaccfbc --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp @@ -0,0 +1,42 @@ +#ifndef TopologicalIsland_H +#define TopologicalIsland_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class TopologicalIsland : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TopologicalIsland_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp b/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp new file mode 100644 index 000000000..6d4835b56 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp @@ -0,0 +1,339 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TopologicalNode.hpp" + +#include +#include + +#include "TopologicalIsland.hpp" +#include "BaseVoltage.hpp" +#include "ConnectivityNodeContainer.hpp" +#include "ConnectivityNode.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() {}; + + + + + + + + + + + +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) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalIsland* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AngleRefTopologicalIsland != element2) + { + element->AngleRefTopologicalIsland = element2; + return assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_BaseVoltage_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* 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_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConnectivityNode_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConnectivityNodes.begin(), element->ConnectivityNodes.end(), element2) == element->ConnectivityNodes.end()) + { + element->ConnectivityNodes.push_back(element2); + return assign_ConnectivityNode_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ReportingGroup_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + ReportingGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReportingGroup != element2) + { + element->ReportingGroup = element2; + return assign_ReportingGroup_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvInjection_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + SvInjection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvInjection != element2) + { + element->SvInjection = element2; + return assign_SvInjection_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvVoltage_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + SvVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvVoltage != element2) + { + element->SvVoltage = element2; + return assign_SvVoltage_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Terminal.begin(), element->Terminal.end(), element2) == element->Terminal.end()) + { + element->Terminal.push_back(element2); + return assign_Terminal_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalIsland_TopologicalNodes(BaseClass*, BaseClass*); +bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalIsland* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalIsland != element2) + { + element->TopologicalIsland = element2; + return assign_TopologicalIsland_TopologicalNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + +const char TopologicalNode::debugName[] = "TopologicalNode"; +const char* TopologicalNode::debugString() const +{ + return TopologicalNode::debugName; +} + +void TopologicalNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TopologicalNode::declare() +{ + return BaseClassDefiner(TopologicalNode::addConstructToMap, TopologicalNode::addPrimitiveAssignFnsToMap, TopologicalNode::addClassAssignFnsToMap, TopologicalNode::debugName); +} + +namespace CIMPP +{ + BaseClass* TopologicalNode_factory() + { + return new TopologicalNode; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp b/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp new file mode 100644 index 000000000..035d4035d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp @@ -0,0 +1,65 @@ +#ifndef TopologicalNode_H +#define TopologicalNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class BaseVoltage; + class ConnectivityNode; + class ConnectivityNodeContainer; + class ReportingGroup; + class SvInjection; + class SvVoltage; + 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". + */ + class TopologicalNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TopologicalNode_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp new file mode 100644 index 000000000..d0cfdd217 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TopologyBoundaryVersion.hpp" + +#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() {}; + + +bool assign_TopologyBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char TopologyBoundaryVersion::debugName[] = "TopologyBoundaryVersion"; +const char* TopologyBoundaryVersion::debugString() const +{ + return TopologyBoundaryVersion::debugName; +} + +void TopologyBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TopologyBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TopologyBoundaryVersion::declare() +{ + return BaseClassDefiner(TopologyBoundaryVersion::addConstructToMap, TopologyBoundaryVersion::addPrimitiveAssignFnsToMap, TopologyBoundaryVersion::addClassAssignFnsToMap, TopologyBoundaryVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* TopologyBoundaryVersion_factory() + { + return new TopologyBoundaryVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp new file mode 100644 index 000000000..be3ffc37c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp @@ -0,0 +1,51 @@ +#ifndef TopologyBoundaryVersion_H +#define TopologyBoundaryVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class TopologyBoundaryVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TopologyBoundaryVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp b/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp new file mode 100644 index 000000000..3e90c1136 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TopologyVersion.hpp" + +#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() {}; + + +bool assign_TopologyVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->baseURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->date = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->differenceModelURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->entsoeURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->modelDescriptionURI = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceRDF = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->namespaceUML = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TopologyVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char TopologyVersion::debugName[] = "TopologyVersion"; +const char* TopologyVersion::debugString() const +{ + return TopologyVersion::debugName; +} + +void TopologyVersion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TopologyVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TopologyVersion::declare() +{ + return BaseClassDefiner(TopologyVersion::addConstructToMap, TopologyVersion::addPrimitiveAssignFnsToMap, TopologyVersion::addClassAssignFnsToMap, TopologyVersion::debugName); +} + +namespace CIMPP +{ + BaseClass* TopologyVersion_factory() + { + return new TopologyVersion; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp b/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp new file mode 100644 index 000000000..4727fb972 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp @@ -0,0 +1,51 @@ +#ifndef TopologyVersion_H +#define TopologyVersion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Date.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Version details. + */ + class TopologyVersion : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TopologyVersion_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp b/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp new file mode 100644 index 000000000..3f49e0952 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TransformerControlMode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +TransformerControlMode& TransformerControlMode::operator=(TransformerControlMode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +TransformerControlMode::operator TransformerControlMode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char TransformerControlMode::debugName[] = "TransformerControlMode"; +const char* TransformerControlMode::debugString() const +{ + return TransformerControlMode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, TransformerControlMode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "TransformerControlMode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "volt") + { + rop = TransformerControlMode::volt; + return lop; + } + if(EnumSymbol == "reactive") + { + rop = TransformerControlMode::reactive; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const TransformerControlMode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == TransformerControlMode::volt) + { + EnumSymbol = "volt"; + } + if (obj.value == TransformerControlMode::reactive) + { + EnumSymbol = "reactive"; + } + + if (!EnumSymbol.empty()) + { + os << "TransformerControlMode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp b/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp new file mode 100644 index 000000000..563b222e5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp @@ -0,0 +1,46 @@ +#ifndef TransformerControlMode_H +#define TransformerControlMode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Control modes for a transformer. + */ + class TransformerControlMode + { + public: + enum TransformerControlMode_ENUM + { + /** + * Voltage control + */ + volt, + /** + * Reactive power flow control + */ + reactive, + }; + + TransformerControlMode() : value(), initialized(false) {} + TransformerControlMode(TransformerControlMode_ENUM value) : value(value), initialized(true) {} + + TransformerControlMode& operator=(TransformerControlMode_ENUM rop); + operator TransformerControlMode_ENUM() const; + + TransformerControlMode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, TransformerControlMode& rop); + friend std::ostream& operator<<(std::ostream& os, const TransformerControlMode& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp b/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp new file mode 100644 index 000000000..241deae09 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TransformerEnd.hpp" + +#include +#include + +#include "BaseVoltage.hpp" +#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() {}; + + + + + + +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) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_TransformerEnds(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PhaseTapChanger_TransformerEnd(BaseClass*, BaseClass*); +bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PhaseTapChanger != element2) + { + element->PhaseTapChanger = element2; + return assign_PhaseTapChanger_TransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RatioTapChanger_TransformerEnd(BaseClass*, BaseClass*); +bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + RatioTapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RatioTapChanger != element2) + { + element->RatioTapChanger = element2; + return assign_RatioTapChanger_TransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_TransformerEnd(BaseClass*, BaseClass*); +bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_TransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char TransformerEnd::debugName[] = "TransformerEnd"; +const char* TransformerEnd::debugString() const +{ + return TransformerEnd::debugName; +} + +void TransformerEnd::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TransformerEnd::declare() +{ + return BaseClassDefiner(TransformerEnd::addConstructToMap, TransformerEnd::addPrimitiveAssignFnsToMap, TransformerEnd::addClassAssignFnsToMap, TransformerEnd::debugName); +} + +namespace CIMPP +{ + BaseClass* TransformerEnd_factory() + { + return new TransformerEnd; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp b/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp new file mode 100644 index 000000000..93516d326 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp @@ -0,0 +1,55 @@ +#ifndef TransformerEnd_H +#define TransformerEnd_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" + +namespace CIMPP +{ + class BaseVoltage; + class PhaseTapChanger; + 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. + */ + class TransformerEnd : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TransformerEnd_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp b/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp new file mode 100644 index 000000000..b5c4049d7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbLCFB1.hpp" + +#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() {}; + + +bool assign_TurbLCFB1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_fb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_irmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->irmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_pbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmwset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->speedReferenceGovernor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpelec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char TurbLCFB1::debugName[] = "TurbLCFB1"; +const char* TurbLCFB1::debugString() const +{ + return TurbLCFB1::debugName; +} + +void TurbLCFB1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TurbLCFB1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TurbLCFB1::declare() +{ + return BaseClassDefiner(TurbLCFB1::addConstructToMap, TurbLCFB1::addPrimitiveAssignFnsToMap, TurbLCFB1::addClassAssignFnsToMap, TurbLCFB1::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbLCFB1_factory() + { + return new TurbLCFB1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp b/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp new file mode 100644 index 000000000..b1f382324 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp @@ -0,0 +1,55 @@ +#ifndef TurbLCFB1_H +#define TurbLCFB1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineLoadControllerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class TurbLCFB1 : public TurbineLoadControllerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbLCFB1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp new file mode 100644 index 000000000..a2bf98e5c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineGovernorDynamics.hpp" + +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" +#include "TurbineLoadControllerDynamics.hpp" + +using namespace CIMPP; + +TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {}; +TurbineGovernorDynamics::~TurbineGovernorDynamics() {}; + + + + + + +bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineGovernorDynamics* 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_TurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->SynchronousMachineDynamics.begin(), element->SynchronousMachineDynamics.end(), element2) == element->SynchronousMachineDynamics.end()) + { + element->SynchronousMachineDynamics.push_back(element2); + return assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineLoadControllerDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineLoadControllerDynamics != element2) + { + element->TurbineLoadControllerDynamics = element2; + return assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TurbineGovernorDynamics::debugName[] = "TurbineGovernorDynamics"; +const char* TurbineGovernorDynamics::debugString() const +{ + return TurbineGovernorDynamics::debugName; +} + +void TurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics"), &TurbineGovernorDynamics_factory)); +} + +void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TurbineGovernorDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner TurbineGovernorDynamics::declare() +{ + return BaseClassDefiner(TurbineGovernorDynamics::addConstructToMap, TurbineGovernorDynamics::addPrimitiveAssignFnsToMap, TurbineGovernorDynamics::addClassAssignFnsToMap, TurbineGovernorDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineGovernorDynamics_factory() + { + return new TurbineGovernorDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp new file mode 100644 index 000000000..159723b38 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp @@ -0,0 +1,45 @@ +#ifndef TurbineGovernorDynamics_H +#define TurbineGovernorDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AsynchronousMachineDynamics; + class SynchronousMachineDynamics; + class TurbineLoadControllerDynamics; + + /* + Turbine-governor function block whose behavior is described by reference to a standard model + */ + class TurbineGovernorDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineGovernorDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp new file mode 100644 index 000000000..8ebaeff3f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineGovernorUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +TurbineGovernorUserDefined::TurbineGovernorUserDefined() {}; +TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {}; + + + +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) +{ + TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char TurbineGovernorUserDefined::debugName[] = "TurbineGovernorUserDefined"; +const char* TurbineGovernorUserDefined::debugString() const +{ + return TurbineGovernorUserDefined::debugName; +} + +void TurbineGovernorUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TurbineGovernorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics"), &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner TurbineGovernorUserDefined::declare() +{ + return BaseClassDefiner(TurbineGovernorUserDefined::addConstructToMap, TurbineGovernorUserDefined::addPrimitiveAssignFnsToMap, TurbineGovernorUserDefined::addClassAssignFnsToMap, TurbineGovernorUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineGovernorUserDefined_factory() + { + return new TurbineGovernorUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp new file mode 100644 index 000000000..522072b50 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef TurbineGovernorUserDefined_H +#define TurbineGovernorUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Turbine-governor function block whose dynamic behaviour is described by + */ + class TurbineGovernorUserDefined : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineGovernorUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp new file mode 100644 index 000000000..eac14ab44 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineLoadControllerDynamics.hpp" + +#include +#include + +#include "TurbineGovernorDynamics.hpp" + +using namespace CIMPP; + +TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {}; +TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {}; + + + + +bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass*, BaseClass*); +bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineGovernorDynamics != element2) + { + element->TurbineGovernorDynamics = element2; + return assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TurbineLoadControllerDynamics::debugName[] = "TurbineLoadControllerDynamics"; +const char* TurbineLoadControllerDynamics::debugString() const +{ + return TurbineLoadControllerDynamics::debugName; +} + +void TurbineLoadControllerDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics"), &TurbineLoadControllerDynamics_factory)); +} + +void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TurbineLoadControllerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics"), &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics)); +} + +const BaseClassDefiner TurbineLoadControllerDynamics::declare() +{ + return BaseClassDefiner(TurbineLoadControllerDynamics::addConstructToMap, TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap, TurbineLoadControllerDynamics::addClassAssignFnsToMap, TurbineLoadControllerDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineLoadControllerDynamics_factory() + { + return new TurbineLoadControllerDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp new file mode 100644 index 000000000..22756c038 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef TurbineLoadControllerDynamics_H +#define TurbineLoadControllerDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class TurbineGovernorDynamics; + + /* + Turbine load controller function block whose behavior is described by reference to a standard model + */ + class TurbineLoadControllerDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + TurbineLoadControllerDynamics(); + ~TurbineLoadControllerDynamics() override; + + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor controlled by this turbine load controller. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineLoadControllerDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp new file mode 100644 index 000000000..70752dcc4 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineLoadControllerUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {}; +TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {}; + + + +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) +{ + TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char TurbineLoadControllerUserDefined::debugName[] = "TurbineLoadControllerUserDefined"; +const char* TurbineLoadControllerUserDefined::debugString() const +{ + return TurbineLoadControllerUserDefined::debugName; +} + +void TurbineLoadControllerUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TurbineLoadControllerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics"), &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner TurbineLoadControllerUserDefined::declare() +{ + return BaseClassDefiner(TurbineLoadControllerUserDefined::addConstructToMap, TurbineLoadControllerUserDefined::addPrimitiveAssignFnsToMap, TurbineLoadControllerUserDefined::addClassAssignFnsToMap, TurbineLoadControllerUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineLoadControllerUserDefined_factory() + { + return new TurbineLoadControllerUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp new file mode 100644 index 000000000..d37fd76e1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef TurbineLoadControllerUserDefined_H +#define TurbineLoadControllerUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineLoadControllerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Turbine load controller function block whose dynamic behaviour is described by + */ + class TurbineLoadControllerUserDefined : public TurbineLoadControllerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineLoadControllerUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp new file mode 100644 index 000000000..c9798125d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLim2Simplified.hpp" + +#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() {}; + + +bool assign_UnderexcLim2Simplified_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kui; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char UnderexcLim2Simplified::debugName[] = "UnderexcLim2Simplified"; +const char* UnderexcLim2Simplified::debugString() const +{ + return UnderexcLim2Simplified::debugName; +} + +void UnderexcLim2Simplified::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLim2Simplified::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLim2Simplified::declare() +{ + return BaseClassDefiner(UnderexcLim2Simplified::addConstructToMap, UnderexcLim2Simplified::addPrimitiveAssignFnsToMap, UnderexcLim2Simplified::addClassAssignFnsToMap, UnderexcLim2Simplified::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLim2Simplified_factory() + { + return new UnderexcLim2Simplified; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp new file mode 100644 index 000000000..8d1117474 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp @@ -0,0 +1,47 @@ +#ifndef UnderexcLim2Simplified_H +#define UnderexcLim2Simplified_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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). + */ + class UnderexcLim2Simplified : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLim2Simplified_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp new file mode 100644 index 000000000..e09b8a4fd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimIEEE1.hpp" + +#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() {}; + + +bool assign_UnderexcLimIEEE1_kuc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kuc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kuf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kui; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kur(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kur; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vucmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vurmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vurmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char UnderexcLimIEEE1::debugName[] = "UnderexcLimIEEE1"; +const char* UnderexcLimIEEE1::debugString() const +{ + return UnderexcLimIEEE1::debugName; +} + +void UnderexcLimIEEE1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimIEEE1::declare() +{ + return BaseClassDefiner(UnderexcLimIEEE1::addConstructToMap, UnderexcLimIEEE1::addPrimitiveAssignFnsToMap, UnderexcLimIEEE1::addClassAssignFnsToMap, UnderexcLimIEEE1::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimIEEE1_factory() + { + return new UnderexcLimIEEE1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp new file mode 100644 index 000000000..8d114d67e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp @@ -0,0 +1,56 @@ +#ifndef UnderexcLimIEEE1_H +#define UnderexcLimIEEE1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class UnderexcLimIEEE1 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimIEEE1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp new file mode 100644 index 000000000..1fdffe52d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp @@ -0,0 +1,687 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimIEEE2.hpp" + +#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() {}; + + +bool assign_UnderexcLimIEEE2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kfb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kfb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kuf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kui; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tup; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tuq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tuv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char UnderexcLimIEEE2::debugName[] = "UnderexcLimIEEE2"; +const char* UnderexcLimIEEE2::debugString() const +{ + return UnderexcLimIEEE2::debugName; +} + +void UnderexcLimIEEE2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimIEEE2::declare() +{ + return BaseClassDefiner(UnderexcLimIEEE2::addConstructToMap, UnderexcLimIEEE2::addPrimitiveAssignFnsToMap, UnderexcLimIEEE2::addClassAssignFnsToMap, UnderexcLimIEEE2::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimIEEE2_factory() + { + return new UnderexcLimIEEE2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp new file mode 100644 index 000000000..c7a840649 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp @@ -0,0 +1,82 @@ +#ifndef UnderexcLimIEEE2_H +#define UnderexcLimIEEE2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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). + */ + class UnderexcLimIEEE2 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimIEEE2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp new file mode 100644 index 000000000..3d9a9b6e1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimX1.hpp" + +#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() {}; + + +bool assign_UnderexcLimX1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->melmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char UnderexcLimX1::debugName[] = "UnderexcLimX1"; +const char* UnderexcLimX1::debugString() const +{ + return UnderexcLimX1::debugName; +} + +void UnderexcLimX1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimX1::declare() +{ + return BaseClassDefiner(UnderexcLimX1::addConstructToMap, UnderexcLimX1::addPrimitiveAssignFnsToMap, UnderexcLimX1::addClassAssignFnsToMap, UnderexcLimX1::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimX1_factory() + { + return new UnderexcLimX1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp new file mode 100644 index 000000000..f79ff24dd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp @@ -0,0 +1,44 @@ +#ifndef UnderexcLimX1_H +#define UnderexcLimX1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + class UnderexcLimX1 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimX1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp new file mode 100644 index 000000000..9b6bc21c8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimX2.hpp" + +#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() {}; + + +bool assign_UnderexcLimX2_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->melmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_qo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char UnderexcLimX2::debugName[] = "UnderexcLimX2"; +const char* UnderexcLimX2::debugString() const +{ + return UnderexcLimX2::debugName; +} + +void UnderexcLimX2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimX2::declare() +{ + return BaseClassDefiner(UnderexcLimX2::addConstructToMap, UnderexcLimX2::addPrimitiveAssignFnsToMap, UnderexcLimX2::addClassAssignFnsToMap, UnderexcLimX2::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimX2_factory() + { + return new UnderexcLimX2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp new file mode 100644 index 000000000..23ce6a21b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp @@ -0,0 +1,45 @@ +#ifndef UnderexcLimX2_H +#define UnderexcLimX2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + class UnderexcLimX2 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimX2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp new file mode 100644 index 000000000..131bea982 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcitationLimiterDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; +UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); +bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); +bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char UnderexcitationLimiterDynamics::debugName[] = "UnderexcitationLimiterDynamics"; +const char* UnderexcitationLimiterDynamics::debugString() const +{ + return UnderexcitationLimiterDynamics::debugName; +} + +void UnderexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics"), &UnderexcitationLimiterDynamics_factory)); +} + +void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner UnderexcitationLimiterDynamics::declare() +{ + return BaseClassDefiner(UnderexcitationLimiterDynamics::addConstructToMap, UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap, UnderexcitationLimiterDynamics::addClassAssignFnsToMap, UnderexcitationLimiterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcitationLimiterDynamics_factory() + { + return new UnderexcitationLimiterDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp new file mode 100644 index 000000000..1ad15fc65 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef UnderexcitationLimiterDynamics_H +#define UnderexcitationLimiterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + class RemoteInputSignal; + + /* + Underexcitation limiter function block whose behaviour is described by reference to a standard model + */ + class UnderexcitationLimiterDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcitationLimiterDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp new file mode 100644 index 000000000..6415389ab --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcitationLimiterUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {}; +UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {}; + + + +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) +{ + UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char UnderexcitationLimiterUserDefined::debugName[] = "UnderexcitationLimiterUserDefined"; +const char* UnderexcitationLimiterUserDefined::debugString() const +{ + return UnderexcitationLimiterUserDefined::debugName; +} + +void UnderexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner UnderexcitationLimiterUserDefined::declare() +{ + return BaseClassDefiner(UnderexcitationLimiterUserDefined::addConstructToMap, UnderexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap, UnderexcitationLimiterUserDefined::addClassAssignFnsToMap, UnderexcitationLimiterUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcitationLimiterUserDefined_factory() + { + return new UnderexcitationLimiterUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp new file mode 100644 index 000000000..46f6cfdcb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef UnderexcitationLimiterUserDefined_H +#define UnderexcitationLimiterUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Underexcitation limiter function block whose dynamic behaviour is described by + */ + class UnderexcitationLimiterUserDefined : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcitationLimiterUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp b/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp new file mode 100644 index 000000000..51e68a621 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp @@ -0,0 +1,171 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnitMultiplier.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +UnitMultiplier& UnitMultiplier::operator=(UnitMultiplier_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +UnitMultiplier::operator UnitMultiplier_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char UnitMultiplier::debugName[] = "UnitMultiplier"; +const char* UnitMultiplier::debugString() const +{ + return UnitMultiplier::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, UnitMultiplier& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "UnitMultiplier") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "p") + { + rop = UnitMultiplier::p; + return lop; + } + if(EnumSymbol == "n") + { + rop = UnitMultiplier::n; + return lop; + } + if(EnumSymbol == "micro") + { + rop = UnitMultiplier::micro; + return lop; + } + if(EnumSymbol == "m") + { + rop = UnitMultiplier::m; + return lop; + } + if(EnumSymbol == "c") + { + rop = UnitMultiplier::c; + return lop; + } + if(EnumSymbol == "d") + { + rop = UnitMultiplier::d; + return lop; + } + if(EnumSymbol == "k") + { + rop = UnitMultiplier::k; + return lop; + } + if(EnumSymbol == "M") + { + rop = UnitMultiplier::M; + return lop; + } + if(EnumSymbol == "G") + { + rop = UnitMultiplier::G; + return lop; + } + if(EnumSymbol == "T") + { + rop = UnitMultiplier::T; + return lop; + } + if(EnumSymbol == "none") + { + rop = UnitMultiplier::none; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const UnitMultiplier& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == UnitMultiplier::p) + { + EnumSymbol = "p"; + } + if (obj.value == UnitMultiplier::n) + { + EnumSymbol = "n"; + } + if (obj.value == UnitMultiplier::micro) + { + EnumSymbol = "micro"; + } + if (obj.value == UnitMultiplier::m) + { + EnumSymbol = "m"; + } + if (obj.value == UnitMultiplier::c) + { + EnumSymbol = "c"; + } + if (obj.value == UnitMultiplier::d) + { + EnumSymbol = "d"; + } + if (obj.value == UnitMultiplier::k) + { + EnumSymbol = "k"; + } + if (obj.value == UnitMultiplier::M) + { + EnumSymbol = "M"; + } + if (obj.value == UnitMultiplier::G) + { + EnumSymbol = "G"; + } + if (obj.value == UnitMultiplier::T) + { + EnumSymbol = "T"; + } + if (obj.value == UnitMultiplier::none) + { + EnumSymbol = "none"; + } + + if (!EnumSymbol.empty()) + { + os << "UnitMultiplier." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp b/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp new file mode 100644 index 000000000..710c6f153 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp @@ -0,0 +1,82 @@ +#ifndef UnitMultiplier_H +#define UnitMultiplier_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The unit multipliers defined for the CIM. + */ + class UnitMultiplier + { + public: + enum UnitMultiplier_ENUM + { + /** + * Pico 10**-12. + */ + p, + /** + * Nano 10**-9. + */ + n, + /** + * Micro 10**-6. + */ + micro, + /** + * Milli 10**-3. + */ + m, + /** + * Centi 10**-2. + */ + c, + /** + * Deci 10**-1. + */ + d, + /** + * Kilo 10**3. + */ + k, + /** + * Mega 10**6. + */ + M, + /** + * Giga 10**9. + */ + G, + /** + * Tera 10**12. + */ + T, + /** + * No multiplier or equivalently multiply by 1. + */ + none, + }; + + UnitMultiplier() : value(), initialized(false) {} + UnitMultiplier(UnitMultiplier_ENUM value) : value(value), initialized(true) {} + + UnitMultiplier& operator=(UnitMultiplier_ENUM rop); + operator UnitMultiplier_ENUM() const; + + UnitMultiplier_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, UnitMultiplier& rop); + friend std::ostream& operator<<(std::ostream& os, const UnitMultiplier& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp b/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp new file mode 100644 index 000000000..8812cdffb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp @@ -0,0 +1,315 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnitSymbol.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +UnitSymbol& UnitSymbol::operator=(UnitSymbol_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +UnitSymbol::operator UnitSymbol_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char UnitSymbol::debugName[] = "UnitSymbol"; +const char* UnitSymbol::debugString() const +{ + return UnitSymbol::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, UnitSymbol& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "UnitSymbol") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "VA") + { + rop = UnitSymbol::VA; + return lop; + } + if(EnumSymbol == "W") + { + rop = UnitSymbol::W; + return lop; + } + if(EnumSymbol == "VAr") + { + rop = UnitSymbol::VAr; + return lop; + } + if(EnumSymbol == "VAh") + { + rop = UnitSymbol::VAh; + return lop; + } + if(EnumSymbol == "Wh") + { + rop = UnitSymbol::Wh; + return lop; + } + if(EnumSymbol == "VArh") + { + rop = UnitSymbol::VArh; + return lop; + } + if(EnumSymbol == "V") + { + rop = UnitSymbol::V; + return lop; + } + if(EnumSymbol == "ohm") + { + rop = UnitSymbol::ohm; + return lop; + } + if(EnumSymbol == "A") + { + rop = UnitSymbol::A; + return lop; + } + if(EnumSymbol == "F") + { + rop = UnitSymbol::F; + return lop; + } + if(EnumSymbol == "H") + { + rop = UnitSymbol::H; + return lop; + } + if(EnumSymbol == "degC") + { + rop = UnitSymbol::degC; + return lop; + } + if(EnumSymbol == "s") + { + rop = UnitSymbol::s; + return lop; + } + if(EnumSymbol == "min") + { + rop = UnitSymbol::min; + return lop; + } + if(EnumSymbol == "h") + { + rop = UnitSymbol::h; + return lop; + } + if(EnumSymbol == "deg") + { + rop = UnitSymbol::deg; + return lop; + } + if(EnumSymbol == "rad") + { + rop = UnitSymbol::rad; + return lop; + } + if(EnumSymbol == "J") + { + rop = UnitSymbol::J; + return lop; + } + if(EnumSymbol == "N") + { + rop = UnitSymbol::N; + return lop; + } + if(EnumSymbol == "S") + { + rop = UnitSymbol::S; + return lop; + } + if(EnumSymbol == "none") + { + rop = UnitSymbol::none; + return lop; + } + if(EnumSymbol == "Hz") + { + rop = UnitSymbol::Hz; + return lop; + } + if(EnumSymbol == "g") + { + rop = UnitSymbol::g; + return lop; + } + if(EnumSymbol == "Pa") + { + rop = UnitSymbol::Pa; + return lop; + } + if(EnumSymbol == "m") + { + rop = UnitSymbol::m; + return lop; + } + if(EnumSymbol == "m2") + { + rop = UnitSymbol::m2; + return lop; + } + if(EnumSymbol == "m3") + { + rop = UnitSymbol::m3; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const UnitSymbol& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == UnitSymbol::VA) + { + EnumSymbol = "VA"; + } + if (obj.value == UnitSymbol::W) + { + EnumSymbol = "W"; + } + if (obj.value == UnitSymbol::VAr) + { + EnumSymbol = "VAr"; + } + if (obj.value == UnitSymbol::VAh) + { + EnumSymbol = "VAh"; + } + if (obj.value == UnitSymbol::Wh) + { + EnumSymbol = "Wh"; + } + if (obj.value == UnitSymbol::VArh) + { + EnumSymbol = "VArh"; + } + if (obj.value == UnitSymbol::V) + { + EnumSymbol = "V"; + } + if (obj.value == UnitSymbol::ohm) + { + EnumSymbol = "ohm"; + } + if (obj.value == UnitSymbol::A) + { + EnumSymbol = "A"; + } + if (obj.value == UnitSymbol::F) + { + EnumSymbol = "F"; + } + if (obj.value == UnitSymbol::H) + { + EnumSymbol = "H"; + } + if (obj.value == UnitSymbol::degC) + { + EnumSymbol = "degC"; + } + if (obj.value == UnitSymbol::s) + { + EnumSymbol = "s"; + } + if (obj.value == UnitSymbol::min) + { + EnumSymbol = "min"; + } + if (obj.value == UnitSymbol::h) + { + EnumSymbol = "h"; + } + if (obj.value == UnitSymbol::deg) + { + EnumSymbol = "deg"; + } + if (obj.value == UnitSymbol::rad) + { + EnumSymbol = "rad"; + } + if (obj.value == UnitSymbol::J) + { + EnumSymbol = "J"; + } + if (obj.value == UnitSymbol::N) + { + EnumSymbol = "N"; + } + if (obj.value == UnitSymbol::S) + { + EnumSymbol = "S"; + } + if (obj.value == UnitSymbol::none) + { + EnumSymbol = "none"; + } + if (obj.value == UnitSymbol::Hz) + { + EnumSymbol = "Hz"; + } + if (obj.value == UnitSymbol::g) + { + EnumSymbol = "g"; + } + if (obj.value == UnitSymbol::Pa) + { + EnumSymbol = "Pa"; + } + if (obj.value == UnitSymbol::m) + { + EnumSymbol = "m"; + } + if (obj.value == UnitSymbol::m2) + { + EnumSymbol = "m2"; + } + if (obj.value == UnitSymbol::m3) + { + EnumSymbol = "m3"; + } + + if (!EnumSymbol.empty()) + { + os << "UnitSymbol." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp b/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp new file mode 100644 index 000000000..b63a20465 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp @@ -0,0 +1,146 @@ +#ifndef UnitSymbol_H +#define UnitSymbol_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The units defined for usage in the CIM. + */ + class UnitSymbol + { + public: + enum UnitSymbol_ENUM + { + /** + * Apparent power in volt ampere. + */ + VA, + /** + * Active power in watt. + */ + W, + /** + * Reactive power in volt ampere reactive. + */ + VAr, + /** + * Apparent energy in volt ampere hours. + */ + VAh, + /** + * Real energy in what hours. + */ + Wh, + /** + * Reactive energy in volt ampere reactive hours. + */ + VArh, + /** + * Voltage in volt. + */ + V, + /** + * Resistance in ohm. + */ + ohm, + /** + * Current in ampere. + */ + A, + /** + * Capacitance in farad. + */ + F, + /** + * 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. + */ + degC, + /** + * Time in seconds. + */ + s, + /** + * Time in minutes. + */ + min, + /** + * Time in hours. + */ + h, + /** + * Plane angle in degrees. + */ + deg, + /** + * Plane angle in radians. + */ + rad, + /** + * Energy in joule. + */ + J, + /** + * Force in newton. + */ + N, + /** + * Conductance in siemens. + */ + S, + /** + * Dimension less quantity, e.g. count, per unit, etc. + */ + none, + /** + * Frequency in hertz. + */ + Hz, + /** + * Mass in gram. + */ + g, + /** + * Pressure in pascal (n/m2). + */ + Pa, + /** + * Length in meter. + */ + m, + /** + * Area in square meters. + */ + m2, + /** + * Volume in cubic meters. + */ + m3, + }; + + UnitSymbol() : value(), initialized(false) {} + UnitSymbol(UnitSymbol_ENUM value) : value(value), initialized(true) {} + + UnitSymbol& operator=(UnitSymbol_ENUM rop); + operator UnitSymbol_ENUM() const; + + UnitSymbol_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, UnitSymbol& rop); + friend std::ostream& operator<<(std::ostream& os, const UnitSymbol& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp b/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp new file mode 100644 index 000000000..40cbde3f2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VAdjIEEE.hpp" + +#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() {}; + + +bool assign_VAdjIEEE_adjslew(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->adjslew; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_taoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->taoff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_taon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->taon; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_vadjf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadjf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_vadjmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadjmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_vadjmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadjmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char VAdjIEEE::debugName[] = "VAdjIEEE"; +const char* VAdjIEEE::debugString() const +{ + return VAdjIEEE::debugName; +} + +void VAdjIEEE::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VAdjIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner VAdjIEEE::declare() +{ + return BaseClassDefiner(VAdjIEEE::addConstructToMap, VAdjIEEE::addPrimitiveAssignFnsToMap, VAdjIEEE::addClassAssignFnsToMap, VAdjIEEE::debugName); +} + +namespace CIMPP +{ + BaseClass* VAdjIEEE_factory() + { + return new VAdjIEEE; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp b/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp new file mode 100644 index 000000000..dfbc75b3f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp @@ -0,0 +1,48 @@ +#ifndef VAdjIEEE_H +#define VAdjIEEE_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageAdjusterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class VAdjIEEE : public VoltageAdjusterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VAdjIEEE_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp new file mode 100644 index 000000000..81a902412 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VCompIEEEType1.hpp" + +#include +#include + +#include "PU.hpp" +#include "Seconds.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +VCompIEEEType1::VCompIEEEType1() {}; +VCompIEEEType1::~VCompIEEEType1() {}; + + +bool assign_VCompIEEEType1_rc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VCompIEEEType1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VCompIEEEType1_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char VCompIEEEType1::debugName[] = "VCompIEEEType1"; +const char* VCompIEEEType1::debugString() const +{ + return VCompIEEEType1::debugName; +} + +void VCompIEEEType1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VCompIEEEType1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner VCompIEEEType1::declare() +{ + return BaseClassDefiner(VCompIEEEType1::addConstructToMap, VCompIEEEType1::addPrimitiveAssignFnsToMap, VCompIEEEType1::addClassAssignFnsToMap, VCompIEEEType1::debugName); +} + +namespace CIMPP +{ + BaseClass* VCompIEEEType1_factory() + { + return new VCompIEEEType1; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp new file mode 100644 index 000000000..3c20535b0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp @@ -0,0 +1,44 @@ +#ifndef VCompIEEEType1_H +#define VCompIEEEType1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Reference: IEEE Standard 421.5-2005 Section 4. + */ + class VCompIEEEType1 : public VoltageCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + VCompIEEEType1(); + ~VCompIEEEType1() override; + + CIMPP::PU rc; /* Default: nullptr */ + CIMPP::Seconds tr; /* Default: nullptr */ + CIMPP::PU xc; /* Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VCompIEEEType1_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp new file mode 100644 index 000000000..828250e60 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VCompIEEEType2.hpp" + +#include +#include + +#include "GenICompensationForGenJ.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +VCompIEEEType2::VCompIEEEType2() {}; +VCompIEEEType2::~VCompIEEEType2() {}; + + + +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) +{ + VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + GenICompensationForGenJ* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GenICompensationForGenJ.begin(), element->GenICompensationForGenJ.end(), element2) == element->GenICompensationForGenJ.end()) + { + element->GenICompensationForGenJ.push_back(element2); + return assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VCompIEEEType2::debugName[] = "VCompIEEEType2"; +const char* VCompIEEEType2::debugString() const +{ + return VCompIEEEType2::debugName; +} + +void VCompIEEEType2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VCompIEEEType2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.GenICompensationForGenJ"), &assign_VCompIEEEType2_GenICompensationForGenJ)); +} + +const BaseClassDefiner VCompIEEEType2::declare() +{ + return BaseClassDefiner(VCompIEEEType2::addConstructToMap, VCompIEEEType2::addPrimitiveAssignFnsToMap, VCompIEEEType2::addClassAssignFnsToMap, VCompIEEEType2::debugName); +} + +namespace CIMPP +{ + BaseClass* VCompIEEEType2_factory() + { + return new VCompIEEEType2; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp new file mode 100644 index 000000000..2eb1c729a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp @@ -0,0 +1,40 @@ +#ifndef VCompIEEEType2_H +#define VCompIEEEType2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class GenICompensationForGenJ; + + class VCompIEEEType2 : public VoltageCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VCompIEEEType2_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Validity.cpp b/CGMES_2.4.13_18DEC2013/Validity.cpp new file mode 100644 index 000000000..9796a2efa --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Validity.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Validity.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Validity& Validity::operator=(Validity_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +Validity::operator Validity_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Validity::debugName[] = "Validity"; +const char* Validity::debugString() const +{ + return Validity::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Validity& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "Validity") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "GOOD") + { + rop = Validity::GOOD; + return lop; + } + if(EnumSymbol == "QUESTIONABLE") + { + rop = Validity::QUESTIONABLE; + return lop; + } + if(EnumSymbol == "INVALID") + { + rop = Validity::INVALID; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Validity& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == Validity::GOOD) + { + EnumSymbol = "GOOD"; + } + if (obj.value == Validity::QUESTIONABLE) + { + EnumSymbol = "QUESTIONABLE"; + } + if (obj.value == Validity::INVALID) + { + EnumSymbol = "INVALID"; + } + + if (!EnumSymbol.empty()) + { + os << "Validity." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Validity.hpp b/CGMES_2.4.13_18DEC2013/Validity.hpp new file mode 100644 index 000000000..fb4d8ce56 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Validity.hpp @@ -0,0 +1,50 @@ +#ifndef Validity_H +#define Validity_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + INVALID, + }; + + Validity() : value(), initialized(false) {} + Validity(Validity_ENUM value) : value(value), initialized(true) {} + + Validity& operator=(Validity_ENUM rop); + operator Validity_ENUM() const; + + Validity_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Validity& rop); + friend std::ostream& operator<<(std::ostream& os, const Validity& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp b/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp new file mode 100644 index 000000000..09cad7fd2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ValueAliasSet.hpp" + +#include +#include + +#include "Command.hpp" +#include "Discrete.hpp" +#include "RaiseLowerCommand.hpp" +#include "ValueToAlias.hpp" + +using namespace CIMPP; + +ValueAliasSet::ValueAliasSet() {}; +ValueAliasSet::~ValueAliasSet() {}; + + + + + + + +bool assign_Command_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + Command* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Commands.begin(), element->Commands.end(), element2) == element->Commands.end()) + { + element->Commands.push_back(element2); + return assign_Command_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Discrete_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + Discrete* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Discretes.begin(), element->Discretes.end(), element2) == element->Discretes.end()) + { + element->Discretes.push_back(element2); + return assign_Discrete_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + RaiseLowerCommand* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RaiseLowerCommands.begin(), element->RaiseLowerCommands.end(), element2) == element->RaiseLowerCommands.end()) + { + element->RaiseLowerCommands.push_back(element2); + return assign_RaiseLowerCommand_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ValueToAlias_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + ValueToAlias* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Values.begin(), element->Values.end(), element2) == element->Values.end()) + { + element->Values.push_back(element2); + return assign_ValueToAlias_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ValueAliasSet::debugName[] = "ValueAliasSet"; +const char* ValueAliasSet::debugString() const +{ + return ValueAliasSet::debugName; +} + +void ValueAliasSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ValueAliasSet"), &ValueAliasSet_factory)); +} + +void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ValueAliasSet::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ValueAliasSet::declare() +{ + return BaseClassDefiner(ValueAliasSet::addConstructToMap, ValueAliasSet::addPrimitiveAssignFnsToMap, ValueAliasSet::addClassAssignFnsToMap, ValueAliasSet::debugName); +} + +namespace CIMPP +{ + BaseClass* ValueAliasSet_factory() + { + return new ValueAliasSet; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp b/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp new file mode 100644 index 000000000..5cf4ee926 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp @@ -0,0 +1,47 @@ +#ifndef ValueAliasSet_H +#define ValueAliasSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Command; + class Discrete; + 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. + */ + class ValueAliasSet : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ValueAliasSet_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp b/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp new file mode 100644 index 000000000..6472d61b0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ValueToAlias.hpp" + +#include +#include + +#include "ValueAliasSet.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {}; +ValueToAlias::~ValueToAlias() {}; + + + +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) +{ + ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_Values(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char ValueToAlias::debugName[] = "ValueToAlias"; +const char* ValueToAlias::debugString() const +{ + return ValueToAlias::debugName; +} + +void ValueToAlias::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ValueToAlias::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.ValueAliasSet"), &assign_ValueToAlias_ValueAliasSet)); +} + +const BaseClassDefiner ValueToAlias::declare() +{ + return BaseClassDefiner(ValueToAlias::addConstructToMap, ValueToAlias::addPrimitiveAssignFnsToMap, ValueToAlias::addClassAssignFnsToMap, ValueToAlias::debugName); +} + +namespace CIMPP +{ + BaseClass* ValueToAlias_factory() + { + return new ValueToAlias; + } +} diff --git a/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp b/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp new file mode 100644 index 000000000..6cb282164 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp @@ -0,0 +1,43 @@ +#ifndef ValueToAlias_H +#define ValueToAlias_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class ValueAliasSet; + + /* + Describes the translation of one particular value into a name, e.g. 1 as "Open". + */ + class ValueToAlias : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ValueToAlias_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp b/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp new file mode 100644 index 000000000..f08a78d66 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VisibilityLayer.hpp" + +#include +#include + +#include "DiagramObject.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +VisibilityLayer::VisibilityLayer() {}; +VisibilityLayer::~VisibilityLayer() {}; + + + +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) +{ + VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VisibleObjects.begin(), element->VisibleObjects.end(), element2) == element->VisibleObjects.end()) + { + element->VisibleObjects.push_back(element2); + return assign_DiagramObject_VisibilityLayers(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VisibilityLayer::debugName[] = "VisibilityLayer"; +const char* VisibilityLayer::debugString() const +{ + return VisibilityLayer::debugName; +} + +void VisibilityLayer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VisibilityLayer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.VisibleObjects"), &assign_VisibilityLayer_VisibleObjects)); +} + +const BaseClassDefiner VisibilityLayer::declare() +{ + return BaseClassDefiner(VisibilityLayer::addConstructToMap, VisibilityLayer::addPrimitiveAssignFnsToMap, VisibilityLayer::addClassAssignFnsToMap, VisibilityLayer::debugName); +} + +namespace CIMPP +{ + BaseClass* VisibilityLayer_factory() + { + return new VisibilityLayer; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp b/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp new file mode 100644 index 000000000..3df88871d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp @@ -0,0 +1,43 @@ +#ifndef VisibilityLayer_H +#define VisibilityLayer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +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. + */ + class VisibilityLayer : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VisibilityLayer_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/Voltage.cpp b/CGMES_2.4.13_18DEC2013/Voltage.cpp new file mode 100644 index 000000000..3f7992f4e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Voltage.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Voltage.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Voltage& Voltage::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Voltage::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Voltage::debugName[] = "Voltage"; +const char* Voltage::debugString() const +{ + return Voltage::debugName; +} + +Voltage& Voltage::operator+=(const Voltage& rhs) +{ + value += rhs.value; + return *this; +} + +Voltage& Voltage::operator-=(const Voltage& rhs) +{ + value -= rhs.value; + return *this; +} + +Voltage& Voltage::operator*=(const Voltage& rhs) +{ + value *= rhs.value; + return *this; +} + +Voltage& Voltage::operator/=(const Voltage& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Voltage& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Voltage& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/Voltage.hpp b/CGMES_2.4.13_18DEC2013/Voltage.hpp new file mode 100644 index 000000000..12eb87179 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/Voltage.hpp @@ -0,0 +1,39 @@ +#ifndef Voltage_H +#define Voltage_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Electrical voltage, can be both AC and DC. + */ + class Voltage + { + public: + Voltage() : value(0.0), initialized(false) {} + Voltage(long double value) : value(value), initialized(true) {} + + Voltage& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Voltage& operator+=(const Voltage& rhs); + Voltage& operator-=(const Voltage& rhs); + Voltage& operator*=(const Voltage& rhs); + Voltage& operator/=(const Voltage& rhs); + + friend std::istream& operator>>(std::istream& lop, Voltage& rop); + friend std::ostream& operator<<(std::ostream& os, const Voltage& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp new file mode 100644 index 000000000..fbd1e515e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageAdjusterDynamics.hpp" + +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" + +using namespace CIMPP; + +VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {}; +VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {}; + + + + +bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass*, BaseClass*); +bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1Dynamics != element2) + { + element->PFVArControllerType1Dynamics = element2; + return assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VoltageAdjusterDynamics::debugName[] = "VoltageAdjusterDynamics"; +const char* VoltageAdjusterDynamics::debugString() const +{ + return VoltageAdjusterDynamics::debugName; +} + +void VoltageAdjusterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics"), &VoltageAdjusterDynamics_factory)); +} + +void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VoltageAdjusterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics"), &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics)); +} + +const BaseClassDefiner VoltageAdjusterDynamics::declare() +{ + return BaseClassDefiner(VoltageAdjusterDynamics::addConstructToMap, VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap, VoltageAdjusterDynamics::addClassAssignFnsToMap, VoltageAdjusterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageAdjusterDynamics_factory() + { + return new VoltageAdjusterDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp new file mode 100644 index 000000000..9f64ce933 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef VoltageAdjusterDynamics_H +#define VoltageAdjusterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class PFVArControllerType1Dynamics; + + /* + Voltage adjuster function block whose behaviour is described by reference to a standard model + */ + class VoltageAdjusterDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + VoltageAdjusterDynamics(); + ~VoltageAdjusterDynamics() override; + + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageAdjusterDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp new file mode 100644 index 000000000..b41599c4a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageAdjusterUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {}; +VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {}; + + + +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) +{ + VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VoltageAdjusterUserDefined::debugName[] = "VoltageAdjusterUserDefined"; +const char* VoltageAdjusterUserDefined::debugString() const +{ + return VoltageAdjusterUserDefined::debugName; +} + +void VoltageAdjusterUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VoltageAdjusterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics"), &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner VoltageAdjusterUserDefined::declare() +{ + return BaseClassDefiner(VoltageAdjusterUserDefined::addConstructToMap, VoltageAdjusterUserDefined::addPrimitiveAssignFnsToMap, VoltageAdjusterUserDefined::addClassAssignFnsToMap, VoltageAdjusterUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageAdjusterUserDefined_factory() + { + return new VoltageAdjusterUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp new file mode 100644 index 000000000..85173e315 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef VoltageAdjusterUserDefined_H +#define VoltageAdjusterUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageAdjusterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + function block whose dynamic behaviour is described by + */ + class VoltageAdjusterUserDefined : public VoltageAdjusterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageAdjusterUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp new file mode 100644 index 000000000..283d81921 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageCompensatorDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; +VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass*, BaseClass*); +bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass*, BaseClass*); +bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VoltageCompensatorDynamics::debugName[] = "VoltageCompensatorDynamics"; +const char* VoltageCompensatorDynamics::debugString() const +{ + return VoltageCompensatorDynamics::debugName; +} + +void VoltageCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics"), &VoltageCompensatorDynamics_factory)); +} + +void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VoltageCompensatorDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner VoltageCompensatorDynamics::declare() +{ + return BaseClassDefiner(VoltageCompensatorDynamics::addConstructToMap, VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap, VoltageCompensatorDynamics::addClassAssignFnsToMap, VoltageCompensatorDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageCompensatorDynamics_factory() + { + return new VoltageCompensatorDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp new file mode 100644 index 000000000..d49ec9fa9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef VoltageCompensatorDynamics_H +#define VoltageCompensatorDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + class RemoteInputSignal; + + /* + Voltage compensator function block whose behaviour is described by reference to a standard model + */ + class VoltageCompensatorDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageCompensatorDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp new file mode 100644 index 000000000..7c74de428 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageCompensatorUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {}; +VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {}; + + + +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) +{ + VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VoltageCompensatorUserDefined::debugName[] = "VoltageCompensatorUserDefined"; +const char* VoltageCompensatorUserDefined::debugString() const +{ + return VoltageCompensatorUserDefined::debugName; +} + +void VoltageCompensatorUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VoltageCompensatorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics"), &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner VoltageCompensatorUserDefined::declare() +{ + return BaseClassDefiner(VoltageCompensatorUserDefined::addConstructToMap, VoltageCompensatorUserDefined::addPrimitiveAssignFnsToMap, VoltageCompensatorUserDefined::addClassAssignFnsToMap, VoltageCompensatorUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageCompensatorUserDefined_factory() + { + return new VoltageCompensatorUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp new file mode 100644 index 000000000..5ffa1b065 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef VoltageCompensatorUserDefined_H +#define VoltageCompensatorUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Voltage compensator function block whose dynamic behaviour is described by + */ + class VoltageCompensatorUserDefined : public VoltageCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageCompensatorUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp b/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp new file mode 100644 index 000000000..4fa8006ee --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp @@ -0,0 +1,139 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageLevel.hpp" + +#include +#include + +#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() {}; + + + + + +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) +{ + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_VoltageLevel(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Bay_VoltageLevel(BaseClass*, BaseClass*); +bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + Bay* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Bays.begin(), element->Bays.end(), element2) == element->Bays.end()) + { + element->Bays.push_back(element2); + return assign_Bay_VoltageLevel(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Substation_VoltageLevels(BaseClass*, BaseClass*); +bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + Substation* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Substation != element2) + { + element->Substation = element2; + return assign_Substation_VoltageLevels(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char VoltageLevel::debugName[] = "VoltageLevel"; +const char* VoltageLevel::debugString() const +{ + return VoltageLevel::debugName; +} + +void VoltageLevel::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner VoltageLevel::declare() +{ + return BaseClassDefiner(VoltageLevel::addConstructToMap, VoltageLevel::addPrimitiveAssignFnsToMap, VoltageLevel::addClassAssignFnsToMap, VoltageLevel::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageLevel_factory() + { + return new VoltageLevel; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp b/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp new file mode 100644 index 000000000..7d22565db --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp @@ -0,0 +1,48 @@ +#ifndef VoltageLevel_H +#define VoltageLevel_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class BaseVoltage; + 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. + */ + class VoltageLevel : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageLevel_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp b/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp new file mode 100644 index 000000000..f03b3f928 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageLimit.hpp" + +#include +#include + +#include "Voltage.hpp" + +using namespace CIMPP; + +VoltageLimit::VoltageLimit() {}; +VoltageLimit::~VoltageLimit() {}; + + +bool assign_VoltageLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char VoltageLimit::debugName[] = "VoltageLimit"; +const char* VoltageLimit::debugString() const +{ + return VoltageLimit::debugName; +} + +void VoltageLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VoltageLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner VoltageLimit::declare() +{ + return BaseClassDefiner(VoltageLimit::addConstructToMap, VoltageLimit::addPrimitiveAssignFnsToMap, VoltageLimit::addClassAssignFnsToMap, VoltageLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageLimit_factory() + { + return new VoltageLimit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp b/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp new file mode 100644 index 000000000..4dd2c2588 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp @@ -0,0 +1,41 @@ +#ifndef VoltageLimit_H +#define VoltageLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + + /* + Operational limit applied to voltage. + */ + class VoltageLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageLimit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.cpp b/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.cpp new file mode 100644 index 000000000..70718a915 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltagePerReactivePower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VoltagePerReactivePower& VoltagePerReactivePower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +VoltagePerReactivePower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VoltagePerReactivePower::debugName[] = "VoltagePerReactivePower"; +const char* VoltagePerReactivePower::debugString() const +{ + return VoltagePerReactivePower::debugName; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator+=(const VoltagePerReactivePower& rhs) +{ + value += rhs.value; + return *this; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator-=(const VoltagePerReactivePower& rhs) +{ + value -= rhs.value; + return *this; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator*=(const VoltagePerReactivePower& rhs) +{ + value *= rhs.value; + return *this; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator/=(const VoltagePerReactivePower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VoltagePerReactivePower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VoltagePerReactivePower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp b/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp new file mode 100644 index 000000000..51ef9b955 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp @@ -0,0 +1,39 @@ +#ifndef VoltagePerReactivePower_H +#define VoltagePerReactivePower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Voltage variation with reactive power. + */ + class VoltagePerReactivePower + { + public: + VoltagePerReactivePower() : value(0.0), initialized(false) {} + VoltagePerReactivePower(long double value) : value(value), initialized(true) {} + + VoltagePerReactivePower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + VoltagePerReactivePower& operator+=(const VoltagePerReactivePower& rhs); + VoltagePerReactivePower& operator-=(const VoltagePerReactivePower& rhs); + VoltagePerReactivePower& operator*=(const VoltagePerReactivePower& rhs); + VoltagePerReactivePower& operator/=(const VoltagePerReactivePower& rhs); + + friend std::istream& operator>>(std::istream& lop, VoltagePerReactivePower& rop); + friend std::ostream& operator<<(std::ostream& os, const VoltagePerReactivePower& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VolumeFlowRate.cpp b/CGMES_2.4.13_18DEC2013/VolumeFlowRate.cpp new file mode 100644 index 000000000..4ccbb5db3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VolumeFlowRate.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VolumeFlowRate.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VolumeFlowRate& VolumeFlowRate::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +VolumeFlowRate::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VolumeFlowRate::debugName[] = "VolumeFlowRate"; +const char* VolumeFlowRate::debugString() const +{ + return VolumeFlowRate::debugName; +} + +VolumeFlowRate& VolumeFlowRate::operator+=(const VolumeFlowRate& rhs) +{ + value += rhs.value; + return *this; +} + +VolumeFlowRate& VolumeFlowRate::operator-=(const VolumeFlowRate& rhs) +{ + value -= rhs.value; + return *this; +} + +VolumeFlowRate& VolumeFlowRate::operator*=(const VolumeFlowRate& rhs) +{ + value *= rhs.value; + return *this; +} + +VolumeFlowRate& VolumeFlowRate::operator/=(const VolumeFlowRate& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VolumeFlowRate& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VolumeFlowRate& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp b/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp new file mode 100644 index 000000000..256cf7e18 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp @@ -0,0 +1,39 @@ +#ifndef VolumeFlowRate_H +#define VolumeFlowRate_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Volume per time. + */ + class VolumeFlowRate + { + public: + VolumeFlowRate() : value(0.0), initialized(false) {} + VolumeFlowRate(long double value) : value(value), initialized(true) {} + + VolumeFlowRate& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + VolumeFlowRate& operator+=(const VolumeFlowRate& rhs); + VolumeFlowRate& operator-=(const VolumeFlowRate& rhs); + VolumeFlowRate& operator*=(const VolumeFlowRate& rhs); + VolumeFlowRate& operator/=(const VolumeFlowRate& rhs); + + friend std::istream& operator>>(std::istream& lop, VolumeFlowRate& rop); + friend std::ostream& operator<<(std::ostream& os, const VolumeFlowRate& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp new file mode 100644 index 000000000..ada4fd1b3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsCapabilityCurve.hpp" + +#include +#include + +#include "VsConverter.hpp" + +using namespace CIMPP; + +VsCapabilityCurve::VsCapabilityCurve() {}; +VsCapabilityCurve::~VsCapabilityCurve() {}; + + + + +bool assign_VsConverter_CapabilityCurve(BaseClass*, BaseClass*); +bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VsCapabilityCurve* element = dynamic_cast(BaseClass_ptr1); + VsConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VsConverterDCSides.begin(), element->VsConverterDCSides.end(), element2) == element->VsConverterDCSides.end()) + { + element->VsConverterDCSides.push_back(element2); + return assign_VsConverter_CapabilityCurve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VsCapabilityCurve::debugName[] = "VsCapabilityCurve"; +const char* VsCapabilityCurve::debugString() const +{ + return VsCapabilityCurve::debugName; +} + +void VsCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve"), &VsCapabilityCurve_factory)); +} + +void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VsCapabilityCurve::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve.VsConverterDCSides"), &assign_VsCapabilityCurve_VsConverterDCSides)); +} + +const BaseClassDefiner VsCapabilityCurve::declare() +{ + return BaseClassDefiner(VsCapabilityCurve::addConstructToMap, VsCapabilityCurve::addPrimitiveAssignFnsToMap, VsCapabilityCurve::addClassAssignFnsToMap, VsCapabilityCurve::debugName); +} + +namespace CIMPP +{ + BaseClass* VsCapabilityCurve_factory() + { + return new VsCapabilityCurve; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp new file mode 100644 index 000000000..d1720fd0e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp @@ -0,0 +1,41 @@ +#ifndef VsCapabilityCurve_H +#define VsCapabilityCurve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Curve.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class VsCapabilityCurve : public Curve + { + public: + /* constructor initialising all attributes to null */ + VsCapabilityCurve(); + ~VsCapabilityCurve() override; + + std::list VsConverterDCSides; /* Capability curve of this converter. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VsCapabilityCurve_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VsConverter.cpp b/CGMES_2.4.13_18DEC2013/VsConverter.cpp new file mode 100644 index 000000000..e61483f2f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsConverter.cpp @@ -0,0 +1,243 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsConverter.hpp" + +#include +#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() {}; + + + +bool assign_VsConverter_delta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->delta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_droop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->droop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_droopCompensation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->droopCompensation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_maxModulationIndex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxModulationIndex; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_maxValveCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxValveCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pPccControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_qPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qPccControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_qShare(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qShare; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetQpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetQpcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetUpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetUpcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_uf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + +const char VsConverter::debugName[] = "VsConverter"; +const char* VsConverter::debugString() const +{ + return VsConverter::debugName; +} + +void VsConverter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VsConverter.CapabilityCurve"), &assign_VsConverter_CapabilityCurve)); +} + +const BaseClassDefiner VsConverter::declare() +{ + return BaseClassDefiner(VsConverter::addConstructToMap, VsConverter::addPrimitiveAssignFnsToMap, VsConverter::addClassAssignFnsToMap, VsConverter::debugName); +} + +namespace CIMPP +{ + BaseClass* VsConverter_factory() + { + return new VsConverter; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VsConverter.hpp b/CGMES_2.4.13_18DEC2013/VsConverter.hpp new file mode 100644 index 000000000..f3a2be60e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsConverter.hpp @@ -0,0 +1,62 @@ +#ifndef VsConverter_H +#define VsConverter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCConverter.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "CurrentFlow.hpp" +#include "PU.hpp" +#include "PerCent.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Simple_Float.hpp" +#include "Voltage.hpp" +#include "VsPpccControlKind.hpp" +#include "VsQpccControlKind.hpp" + +namespace CIMPP +{ + class VsCapabilityCurve; + + /* + DC side of the voltage source converter (VSC). + */ + class VsConverter : public ACDCConverter + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VsConverter_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp new file mode 100644 index 000000000..bc8b2d84a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp @@ -0,0 +1,117 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsPpccControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VsPpccControlKind& VsPpccControlKind::operator=(VsPpccControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +VsPpccControlKind::operator VsPpccControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VsPpccControlKind::debugName[] = "VsPpccControlKind"; +const char* VsPpccControlKind::debugString() const +{ + return VsPpccControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VsPpccControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "VsPpccControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "pPcc") + { + rop = VsPpccControlKind::pPcc; + return lop; + } + if(EnumSymbol == "udc") + { + rop = VsPpccControlKind::udc; + return lop; + } + if(EnumSymbol == "pPccAndUdcDroop") + { + rop = VsPpccControlKind::pPccAndUdcDroop; + return lop; + } + if(EnumSymbol == "pPccAndUdcDroopWithCompensation") + { + rop = VsPpccControlKind::pPccAndUdcDroopWithCompensation; + return lop; + } + if(EnumSymbol == "pPccAndUdcDroopPilot") + { + rop = VsPpccControlKind::pPccAndUdcDroopPilot; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VsPpccControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == VsPpccControlKind::pPcc) + { + EnumSymbol = "pPcc"; + } + if (obj.value == VsPpccControlKind::udc) + { + EnumSymbol = "udc"; + } + if (obj.value == VsPpccControlKind::pPccAndUdcDroop) + { + EnumSymbol = "pPccAndUdcDroop"; + } + if (obj.value == VsPpccControlKind::pPccAndUdcDroopWithCompensation) + { + EnumSymbol = "pPccAndUdcDroopWithCompensation"; + } + if (obj.value == VsPpccControlKind::pPccAndUdcDroopPilot) + { + EnumSymbol = "pPccAndUdcDroopPilot"; + } + + if (!EnumSymbol.empty()) + { + os << "VsPpccControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp new file mode 100644 index 000000000..3aec56bb0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp @@ -0,0 +1,58 @@ +#ifndef VsPpccControlKind_H +#define VsPpccControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + pPcc, + /** + * 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. + */ + 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. + */ + pPccAndUdcDroopWithCompensation, + /** + * Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. + */ + pPccAndUdcDroopPilot, + }; + + VsPpccControlKind() : value(), initialized(false) {} + VsPpccControlKind(VsPpccControlKind_ENUM value) : value(value), initialized(true) {} + + VsPpccControlKind& operator=(VsPpccControlKind_ENUM rop); + operator VsPpccControlKind_ENUM() const; + + VsPpccControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, VsPpccControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const VsPpccControlKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp b/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp new file mode 100644 index 000000000..7f438e41c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsQpccControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VsQpccControlKind& VsQpccControlKind::operator=(VsQpccControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +VsQpccControlKind::operator VsQpccControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VsQpccControlKind::debugName[] = "VsQpccControlKind"; +const char* VsQpccControlKind::debugString() const +{ + return VsQpccControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VsQpccControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "VsQpccControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "reactivePcc") + { + rop = VsQpccControlKind::reactivePcc; + return lop; + } + if(EnumSymbol == "voltagePcc") + { + rop = VsQpccControlKind::voltagePcc; + return lop; + } + if(EnumSymbol == "powerFactorPcc") + { + rop = VsQpccControlKind::powerFactorPcc; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VsQpccControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == VsQpccControlKind::reactivePcc) + { + EnumSymbol = "reactivePcc"; + } + if (obj.value == VsQpccControlKind::voltagePcc) + { + EnumSymbol = "voltagePcc"; + } + if (obj.value == VsQpccControlKind::powerFactorPcc) + { + EnumSymbol = "powerFactorPcc"; + } + + if (!EnumSymbol.empty()) + { + os << "VsQpccControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/VsQpccControlKind.hpp b/CGMES_2.4.13_18DEC2013/VsQpccControlKind.hpp new file mode 100644 index 000000000..cc10bbf78 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/VsQpccControlKind.hpp @@ -0,0 +1,38 @@ +#ifndef VsQpccControlKind_H +#define VsQpccControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + class VsQpccControlKind + { + public: + enum VsQpccControlKind_ENUM + { + reactivePcc, + voltagePcc, + powerFactorPcc, + }; + + VsQpccControlKind() : value(), initialized(false) {} + VsQpccControlKind(VsQpccControlKind_ENUM value) : value(value), initialized(true) {} + + VsQpccControlKind& operator=(VsQpccControlKind_ENUM rop); + operator VsQpccControlKind_ENUM() const; + + VsQpccControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, VsQpccControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const VsQpccControlKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp new file mode 100644 index 000000000..af5ebf4d2 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindAeroConstIEC.hpp" + +#include +#include + +#include "WindGenTurbineType1IEC.hpp" + +using namespace CIMPP; + +WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {}; +WindAeroConstIEC::~WindAeroConstIEC() {}; + + + + +bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass*, BaseClass*); +bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindAeroConstIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType1IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType1IEC != element2) + { + element->WindGenTurbineType1IEC = element2; + return assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindAeroConstIEC::debugName[] = "WindAeroConstIEC"; +const char* WindAeroConstIEC::debugString() const +{ + return WindAeroConstIEC::debugName; +} + +void WindAeroConstIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC"), &WindAeroConstIEC_factory)); +} + +void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindAeroConstIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC.WindGenTurbineType1IEC"), &assign_WindAeroConstIEC_WindGenTurbineType1IEC)); +} + +const BaseClassDefiner WindAeroConstIEC::declare() +{ + return BaseClassDefiner(WindAeroConstIEC::addConstructToMap, WindAeroConstIEC::addPrimitiveAssignFnsToMap, WindAeroConstIEC::addClassAssignFnsToMap, WindAeroConstIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindAeroConstIEC_factory() + { + return new WindAeroConstIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp new file mode 100644 index 000000000..ad46f30a6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindAeroConstIEC_H +#define WindAeroConstIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindAeroConstIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + WindAeroConstIEC(); + ~WindAeroConstIEC() override; + + CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; /* Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindAeroConstIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp new file mode 100644 index 000000000..4f2b018a5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindAeroLinearIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindAeroLinearIEC_dpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroLinearIEC_dptheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dptheta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroLinearIEC_omegazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegazero; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroLinearIEC_pavail(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pavail; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroLinearIEC_thetazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetazero; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); +bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindAeroLinearIEC* 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_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char WindAeroLinearIEC::debugName[] = "WindAeroLinearIEC"; +const char* WindAeroLinearIEC::debugString() const +{ + return WindAeroLinearIEC::debugName; +} + +void WindAeroLinearIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindAeroLinearIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.WindGenTurbineType3IEC"), &assign_WindAeroLinearIEC_WindGenTurbineType3IEC)); +} + +const BaseClassDefiner WindAeroLinearIEC::declare() +{ + return BaseClassDefiner(WindAeroLinearIEC::addConstructToMap, WindAeroLinearIEC::addPrimitiveAssignFnsToMap, WindAeroLinearIEC::addClassAssignFnsToMap, WindAeroLinearIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindAeroLinearIEC_factory() + { + return new WindAeroLinearIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp new file mode 100644 index 000000000..5556cf924 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp @@ -0,0 +1,48 @@ +#ifndef WindAeroLinearIEC_H +#define WindAeroLinearIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" + +namespace CIMPP +{ + class WindGenTurbineType3IEC; + + /* + The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. + */ + class WindAeroLinearIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindAeroLinearIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp new file mode 100644 index 000000000..b1b64d199 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContCurrLimIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindContCurrLimIEC_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_imaxdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imaxdip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_mdfslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mdfslim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_mqpri(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mqpri; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContCurrLimIEC* 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_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContCurrLimIEC* 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_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char WindContCurrLimIEC::debugName[] = "WindContCurrLimIEC"; +const char* WindContCurrLimIEC::debugString() const +{ + return WindContCurrLimIEC::debugName; +} + +void WindContCurrLimIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContCurrLimIEC::declare() +{ + return BaseClassDefiner(WindContCurrLimIEC::addConstructToMap, WindContCurrLimIEC::addPrimitiveAssignFnsToMap, WindContCurrLimIEC::addClassAssignFnsToMap, WindContCurrLimIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContCurrLimIEC_factory() + { + return new WindContCurrLimIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp new file mode 100644 index 000000000..071ff806d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp @@ -0,0 +1,51 @@ +#ifndef WindContCurrLimIEC_H +#define WindContCurrLimIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class WindContCurrLimIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContCurrLimIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp new file mode 100644 index 000000000..841bebeea --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp @@ -0,0 +1,423 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPType3IEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindContPType3IEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtrisemaxlvrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_kdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdtd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_mplvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mplvrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_omegaoffset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegaoffset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_pdtdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pdtdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_rramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rramp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tdvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_temin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->temin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomegafilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpord; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tuscale(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuscale; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_twref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_udvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_updip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->updip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_wdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wdtd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_zeta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeta; + if (buffer.fail()) + return false; + else + 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; +} + + + + + + + + + + + + + + + + + + + + + + +const char WindContPType3IEC::debugName[] = "WindContPType3IEC"; +const char* WindContPType3IEC::debugString() const +{ + return WindContPType3IEC::debugName; +} + +void WindContPType3IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContPType3IEC::declare() +{ + return BaseClassDefiner(WindContPType3IEC::addConstructToMap, WindContPType3IEC::addPrimitiveAssignFnsToMap, WindContPType3IEC::addClassAssignFnsToMap, WindContPType3IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPType3IEC_factory() + { + return new WindContPType3IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp new file mode 100644 index 000000000..5dc2f994e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp @@ -0,0 +1,68 @@ +#ifndef WindContPType3IEC_H +#define WindContPType3IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindGenTurbineType3IEC; + + /* + P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. + */ + class WindContPType3IEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPType3IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp new file mode 100644 index 000000000..abd8f9dab --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPType4aIEC.hpp" + +#include +#include + +#include "WindTurbineType4aIEC.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {}; +WindContPType4aIEC::~WindContPType4aIEC() {}; + + + +bool assign_WindContPType4aIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4aIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpord; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4aIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char WindContPType4aIEC::debugName[] = "WindContPType4aIEC"; +const char* WindContPType4aIEC::debugString() const +{ + return WindContPType4aIEC::debugName; +} + +void WindContPType4aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContPType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.WindTurbineType4aIEC"), &assign_WindContPType4aIEC_WindTurbineType4aIEC)); +} + +const BaseClassDefiner WindContPType4aIEC::declare() +{ + return BaseClassDefiner(WindContPType4aIEC::addConstructToMap, WindContPType4aIEC::addPrimitiveAssignFnsToMap, WindContPType4aIEC::addClassAssignFnsToMap, WindContPType4aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPType4aIEC_factory() + { + return new WindContPType4aIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp new file mode 100644 index 000000000..c95a2af05 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp @@ -0,0 +1,46 @@ +#ifndef WindContPType4aIEC_H +#define WindContPType4aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType4aIEC; + + /* + P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. + */ + class WindContPType4aIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPType4aIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp new file mode 100644 index 000000000..25670919f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPType4bIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindContPType4bIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4bIEC_tpaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpaero; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4bIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpord; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4bIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindContPType4bIEC::debugName[] = "WindContPType4bIEC"; +const char* WindContPType4bIEC::debugString() const +{ + return WindContPType4bIEC::debugName; +} + +void WindContPType4bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContPType4bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.WindTurbineType4bIEC"), &assign_WindContPType4bIEC_WindTurbineType4bIEC)); +} + +const BaseClassDefiner WindContPType4bIEC::declare() +{ + return BaseClassDefiner(WindContPType4bIEC::addConstructToMap, WindContPType4bIEC::addPrimitiveAssignFnsToMap, WindContPType4bIEC::addClassAssignFnsToMap, WindContPType4bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPType4bIEC_factory() + { + return new WindContPType4bIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp new file mode 100644 index 000000000..c2f174f9b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp @@ -0,0 +1,47 @@ +#ifndef WindContPType4bIEC_H +#define WindContPType4bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType4bIEC; + + /* + P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. + */ + class WindContPType4bIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPType4bIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp new file mode 100644 index 000000000..1abd36c2c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPitchAngleIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dthetamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dthetamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kiomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_thetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_thetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + +const char WindContPitchAngleIEC::debugName[] = "WindContPitchAngleIEC"; +const char* WindContPitchAngleIEC::debugString() const +{ + return WindContPitchAngleIEC::debugName; +} + +void WindContPitchAngleIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContPitchAngleIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC"), &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC)); +} + +const BaseClassDefiner WindContPitchAngleIEC::declare() +{ + return BaseClassDefiner(WindContPitchAngleIEC::addConstructToMap, WindContPitchAngleIEC::addPrimitiveAssignFnsToMap, WindContPitchAngleIEC::addClassAssignFnsToMap, WindContPitchAngleIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPitchAngleIEC_factory() + { + return new WindContPitchAngleIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp new file mode 100644 index 000000000..c1f015f98 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp @@ -0,0 +1,55 @@ +#ifndef WindContPitchAngleIEC_H +#define WindContPitchAngleIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class WindGenTurbineType3IEC; + + /* + Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. + */ + class WindContPitchAngleIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPitchAngleIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp new file mode 100644 index 000000000..60df4e0e3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp @@ -0,0 +1,483 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContQIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindContQIEC_iqh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqh1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_iqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_iqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_iqpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqpost; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kiu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kpq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kqv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_qmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_qmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_rdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rdroop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tiq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpost; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tqord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tqord; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_udb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_udb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_umax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->umax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_umin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->umin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_uqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uqdip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_uref0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uref0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->windLVRTQcontrolModesType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_windQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char WindContQIEC::debugName[] = "WindContQIEC"; +const char* WindContQIEC::debugString() const +{ + return WindContQIEC::debugName; +} + +void WindContQIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContQIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.WindTurbineType3or4IEC"), &assign_WindContQIEC_WindTurbineType3or4IEC)); +} + +const BaseClassDefiner WindContQIEC::declare() +{ + return BaseClassDefiner(WindContQIEC::addConstructToMap, WindContQIEC::addPrimitiveAssignFnsToMap, WindContQIEC::addClassAssignFnsToMap, WindContQIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContQIEC_factory() + { + return new WindContQIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp new file mode 100644 index 000000000..eb9e06da8 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp @@ -0,0 +1,71 @@ +#ifndef WindContQIEC_H +#define WindContQIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "WindLVRTQcontrolModesKind.hpp" +#include "WindQcontrolModesKind.hpp" + +namespace CIMPP +{ + class WindTurbineType3or4IEC; + + /* + Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. + */ + class WindContQIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContQIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp new file mode 100644 index 000000000..59dfd4868 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp @@ -0,0 +1,215 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContRotorRIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindContRotorRIEC_kirr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kirr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_komegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->komegafilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_kpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_kprr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kprr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_rmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomegafilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContRotorRIEC* 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_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContRotorRIEC* 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_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + + +const char WindContRotorRIEC::debugName[] = "WindContRotorRIEC"; +const char* WindContRotorRIEC::debugString() const +{ + return WindContRotorRIEC::debugName; +} + +void WindContRotorRIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContRotorRIEC::declare() +{ + return BaseClassDefiner(WindContRotorRIEC::addConstructToMap, WindContRotorRIEC::addPrimitiveAssignFnsToMap, WindContRotorRIEC::addClassAssignFnsToMap, WindContRotorRIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContRotorRIEC_factory() + { + return new WindContRotorRIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp new file mode 100644 index 000000000..cfecbb5d1 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp @@ -0,0 +1,54 @@ +#ifndef WindContRotorRIEC_H +#define WindContRotorRIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindGenTurbineType2IEC; + + /* + Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. + */ + class WindContRotorRIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContRotorRIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp new file mode 100644 index 000000000..16f28bf01 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindDynamicsLookupTable.hpp" + +#include +#include + +#include "WindContCurrLimIEC.hpp" +#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() {}; + + + + + + +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) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContCurrLimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContCurrLimIEC != element2) + { + element->WindContCurrLimIEC = element2; + return assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContPType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType3IEC != element2) + { + element->WindContPType3IEC = element2; + return assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContRotorRIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContRotorRIEC != element2) + { + element->WindContRotorRIEC = element2; + return assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindPlantFreqPcontrolIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantFreqPcontrolIEC != element2) + { + element->WindPlantFreqPcontrolIEC = element2; + return assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindDynamicsLookupTable::debugName[] = "WindDynamicsLookupTable"; +const char* WindDynamicsLookupTable::debugString() const +{ + return WindDynamicsLookupTable::debugName; +} + +void WindDynamicsLookupTable::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindDynamicsLookupTable::declare() +{ + return BaseClassDefiner(WindDynamicsLookupTable::addConstructToMap, WindDynamicsLookupTable::addPrimitiveAssignFnsToMap, WindDynamicsLookupTable::addClassAssignFnsToMap, WindDynamicsLookupTable::debugName); +} + +namespace CIMPP +{ + BaseClass* WindDynamicsLookupTable_factory() + { + return new WindDynamicsLookupTable; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp new file mode 100644 index 000000000..2ed62aca5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp @@ -0,0 +1,54 @@ +#ifndef WindDynamicsLookupTable_H +#define WindDynamicsLookupTable_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "Simple_Float.hpp" +#include "WindLookupTableFunctionKind.hpp" + +namespace CIMPP +{ + class WindContCurrLimIEC; + class WindContPType3IEC; + class WindContRotorRIEC; + class WindPlantFreqPcontrolIEC; + + /* + The class models a look up table for the purpose of wind standard models. + */ + class WindDynamicsLookupTable : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindDynamicsLookupTable_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp new file mode 100644 index 000000000..42758de0c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType1IEC.hpp" + +#include +#include + +#include "WindAeroConstIEC.hpp" + +using namespace CIMPP; + +WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {}; +WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {}; + + + + +bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1); + WindAeroConstIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindAeroConstIEC != element2) + { + element->WindAeroConstIEC = element2; + return assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindGenTurbineType1IEC::debugName[] = "WindGenTurbineType1IEC"; +const char* WindGenTurbineType1IEC::debugString() const +{ + return WindGenTurbineType1IEC::debugName; +} + +void WindGenTurbineType1IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC"), &WindGenTurbineType1IEC_factory)); +} + +void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindGenTurbineType1IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC.WindAeroConstIEC"), &assign_WindGenTurbineType1IEC_WindAeroConstIEC)); +} + +const BaseClassDefiner WindGenTurbineType1IEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType1IEC::addConstructToMap, WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap, WindGenTurbineType1IEC::addClassAssignFnsToMap, WindGenTurbineType1IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType1IEC_factory() + { + return new WindGenTurbineType1IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp new file mode 100644 index 000000000..e25b25c4e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindGenTurbineType1IEC_H +#define WindGenTurbineType1IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindAeroConstIEC; + + /* + Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. + */ + class WindGenTurbineType1IEC : public WindTurbineType1or2IEC + { + public: + /* constructor initialising all attributes to null */ + WindGenTurbineType1IEC(); + ~WindGenTurbineType1IEC() override; + + CIMPP::WindAeroConstIEC* WindAeroConstIEC; /* Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType1IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp new file mode 100644 index 000000000..a0472c038 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType2IEC.hpp" + +#include +#include + +#include "WindContRotorRIEC.hpp" +#include "WindPitchContEmulIEC.hpp" + +using namespace CIMPP; + +WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {}; +WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {}; + + + + + +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + WindContRotorRIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContRotorRIEC != element2) + { + element->WindContRotorRIEC = element2; + return assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + WindPitchContEmulIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPitchContEmulIEC != element2) + { + element->WindPitchContEmulIEC = element2; + return assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindGenTurbineType2IEC::debugName[] = "WindGenTurbineType2IEC"; +const char* WindGenTurbineType2IEC::debugString() const +{ + return WindGenTurbineType2IEC::debugName; +} + +void WindGenTurbineType2IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC"), &WindGenTurbineType2IEC_factory)); +} + +void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindGenTurbineType2IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindGenTurbineType2IEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType2IEC::addConstructToMap, WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap, WindGenTurbineType2IEC::addClassAssignFnsToMap, WindGenTurbineType2IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType2IEC_factory() + { + return new WindGenTurbineType2IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp new file mode 100644 index 000000000..92b0a595b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindGenTurbineType2IEC_H +#define WindGenTurbineType2IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContRotorRIEC; + class WindPitchContEmulIEC; + + /* + Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. + */ + class WindGenTurbineType2IEC : public WindTurbineType1or2IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType2IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp new file mode 100644 index 000000000..7395215bf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType3IEC.hpp" + +#include +#include + +#include "WindAeroLinearIEC.hpp" +#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() {}; + + + + + + +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) +{ + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindAeroLinearIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindAeroLinearIEC != element2) + { + element->WindAeroLinearIEC = element2; + return assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindContPType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType3IEC != element2) + { + element->WindContPType3IEC = element2; + return assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindContPitchAngleIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPitchAngleIEC != element2) + { + element->WindContPitchAngleIEC = element2; + return assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindMechIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindMechIEC != element2) + { + element->WindMechIEC = element2; + return assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char WindGenTurbineType3IEC::debugName[] = "WindGenTurbineType3IEC"; +const char* WindGenTurbineType3IEC::debugString() const +{ + return WindGenTurbineType3IEC::debugName; +} + +void WindGenTurbineType3IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindGenTurbineType3IEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType3IEC::addConstructToMap, WindGenTurbineType3IEC::addPrimitiveAssignFnsToMap, WindGenTurbineType3IEC::addClassAssignFnsToMap, WindGenTurbineType3IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType3IEC_factory() + { + return new WindGenTurbineType3IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp new file mode 100644 index 000000000..4060364f3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp @@ -0,0 +1,50 @@ +#ifndef WindGenTurbineType3IEC_H +#define WindGenTurbineType3IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4IEC.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +namespace CIMPP +{ + class WindAeroLinearIEC; + class WindContPType3IEC; + class WindContPitchAngleIEC; + class WindMechIEC; + + /* + Generator model for wind turbines of IEC type 3A and 3B. + */ + class WindGenTurbineType3IEC : public WindTurbineType3or4IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType3IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp new file mode 100644 index 000000000..a665f7def --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType3aIEC.hpp" + +#include +#include + +#include "Simple_Float.hpp" +#include "Seconds.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {}; +WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {}; + + +bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenTurbineType3aIEC_tic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenTurbineType3aIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char WindGenTurbineType3aIEC::debugName[] = "WindGenTurbineType3aIEC"; +const char* WindGenTurbineType3aIEC::debugString() const +{ + return WindGenTurbineType3aIEC::debugName; +} + +void WindGenTurbineType3aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGenTurbineType3aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner WindGenTurbineType3aIEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType3aIEC::addConstructToMap, WindGenTurbineType3aIEC::addPrimitiveAssignFnsToMap, WindGenTurbineType3aIEC::addClassAssignFnsToMap, WindGenTurbineType3aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType3aIEC_factory() + { + return new WindGenTurbineType3aIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp new file mode 100644 index 000000000..d803c1dd5 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindGenTurbineType3aIEC_H +#define WindGenTurbineType3aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindGenTurbineType3IEC.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. + */ + class WindGenTurbineType3aIEC : public WindGenTurbineType3IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType3aIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp new file mode 100644 index 000000000..6bc10880c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType3bIEC.hpp" + +#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() {}; + + +bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fducw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwtcwp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenTurbineType3bIEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenTurbineType3bIEC_two(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->two; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenTurbineType3bIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char WindGenTurbineType3bIEC::debugName[] = "WindGenTurbineType3bIEC"; +const char* WindGenTurbineType3bIEC::debugString() const +{ + return WindGenTurbineType3bIEC::debugName; +} + +void WindGenTurbineType3bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGenTurbineType3bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner WindGenTurbineType3bIEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType3bIEC::addConstructToMap, WindGenTurbineType3bIEC::addPrimitiveAssignFnsToMap, WindGenTurbineType3bIEC::addClassAssignFnsToMap, WindGenTurbineType3bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType3bIEC_factory() + { + return new WindGenTurbineType3bIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp new file mode 100644 index 000000000..49e1153e3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp @@ -0,0 +1,48 @@ +#ifndef WindGenTurbineType3bIEC_H +#define WindGenTurbineType3bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindGenTurbineType3IEC.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + + /* + IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. + */ + class WindGenTurbineType3bIEC : public WindGenTurbineType3IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType3bIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp new file mode 100644 index 000000000..1553cc490 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenType4IEC.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +WindGenType4IEC::WindGenType4IEC() {}; +WindGenType4IEC::~WindGenType4IEC() {}; + + +bool assign_WindGenType4IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dipmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType4IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->diqmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType4IEC_diqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->diqmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType4IEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char WindGenType4IEC::debugName[] = "WindGenType4IEC"; +const char* WindGenType4IEC::debugString() const +{ + return WindGenType4IEC::debugName; +} + +void WindGenType4IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGenType4IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner WindGenType4IEC::declare() +{ + return BaseClassDefiner(WindGenType4IEC::addConstructToMap, WindGenType4IEC::addPrimitiveAssignFnsToMap, WindGenType4IEC::addClassAssignFnsToMap, WindGenType4IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenType4IEC_factory() + { + return new WindGenType4IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp new file mode 100644 index 000000000..b969138e3 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindGenType4IEC_H +#define WindGenType4IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4IEC.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. + */ + class WindGenType4IEC : public WindTurbineType3or4IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenType4IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp new file mode 100644 index 000000000..f92814598 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenUnitKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindGenUnitKind& WindGenUnitKind::operator=(WindGenUnitKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindGenUnitKind::operator WindGenUnitKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindGenUnitKind::debugName[] = "WindGenUnitKind"; +const char* WindGenUnitKind::debugString() const +{ + return WindGenUnitKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindGenUnitKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindGenUnitKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "offshore") + { + rop = WindGenUnitKind::offshore; + return lop; + } + if(EnumSymbol == "onshore") + { + rop = WindGenUnitKind::onshore; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindGenUnitKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindGenUnitKind::offshore) + { + EnumSymbol = "offshore"; + } + if (obj.value == WindGenUnitKind::onshore) + { + EnumSymbol = "onshore"; + } + + if (!EnumSymbol.empty()) + { + os << "WindGenUnitKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp new file mode 100644 index 000000000..4aa57c46c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp @@ -0,0 +1,46 @@ +#ifndef WindGenUnitKind_H +#define WindGenUnitKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Kind of wind generating unit. + */ + class WindGenUnitKind + { + public: + enum WindGenUnitKind_ENUM + { + /** + * The wind generating unit is located offshore. + */ + offshore, + /** + * The wind generating unit is located onshore. + */ + onshore, + }; + + WindGenUnitKind() : value(), initialized(false) {} + WindGenUnitKind(WindGenUnitKind_ENUM value) : value(value), initialized(true) {} + + WindGenUnitKind& operator=(WindGenUnitKind_ENUM rop); + operator WindGenUnitKind_ENUM() const; + + WindGenUnitKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindGenUnitKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindGenUnitKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp new file mode 100644 index 000000000..b07a7b82d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGeneratingUnit.hpp" + +#include +#include + +#include "WindGenUnitKind.hpp" + +using namespace CIMPP; + +WindGeneratingUnit::WindGeneratingUnit() {}; +WindGeneratingUnit::~WindGeneratingUnit() {}; + + +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; +} + + + +const char WindGeneratingUnit::debugName[] = "WindGeneratingUnit"; +const char* WindGeneratingUnit::debugString() const +{ + return WindGeneratingUnit::debugName; +} + +void WindGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner WindGeneratingUnit::declare() +{ + return BaseClassDefiner(WindGeneratingUnit::addConstructToMap, WindGeneratingUnit::addPrimitiveAssignFnsToMap, WindGeneratingUnit::addClassAssignFnsToMap, WindGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGeneratingUnit_factory() + { + return new WindGeneratingUnit; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp new file mode 100644 index 000000000..9ab3810cd --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp @@ -0,0 +1,41 @@ +#ifndef WindGeneratingUnit_H +#define WindGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" +#include "WindGenUnitKind.hpp" + +namespace CIMPP +{ + + /* + A wind driven generating unit. May be used to represent a single turbine or an aggregation. + */ + class WindGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + WindGeneratingUnit(); + ~WindGeneratingUnit() override; + + CIMPP::WindGenUnitKind windGenUnitType; /* The kind of wind generating unit Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp new file mode 100644 index 000000000..1cd506474 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindLVRTQcontrolModesKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindLVRTQcontrolModesKind& WindLVRTQcontrolModesKind::operator=(WindLVRTQcontrolModesKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindLVRTQcontrolModesKind::operator WindLVRTQcontrolModesKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindLVRTQcontrolModesKind::debugName[] = "WindLVRTQcontrolModesKind"; +const char* WindLVRTQcontrolModesKind::debugString() const +{ + return WindLVRTQcontrolModesKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindLVRTQcontrolModesKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "mode1") + { + rop = WindLVRTQcontrolModesKind::mode1; + return lop; + } + if(EnumSymbol == "mode2") + { + rop = WindLVRTQcontrolModesKind::mode2; + return lop; + } + if(EnumSymbol == "mode3") + { + rop = WindLVRTQcontrolModesKind::mode3; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindLVRTQcontrolModesKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindLVRTQcontrolModesKind::mode1) + { + EnumSymbol = "mode1"; + } + if (obj.value == WindLVRTQcontrolModesKind::mode2) + { + EnumSymbol = "mode2"; + } + if (obj.value == WindLVRTQcontrolModesKind::mode3) + { + EnumSymbol = "mode3"; + } + + if (!EnumSymbol.empty()) + { + os << "WindLVRTQcontrolModesKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp new file mode 100644 index 000000000..7b731082a --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp @@ -0,0 +1,50 @@ +#ifndef WindLVRTQcontrolModesKind_H +#define WindLVRTQcontrolModesKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + LVRT Q control modes . + */ + class WindLVRTQcontrolModesKind + { + public: + enum WindLVRTQcontrolModesKind_ENUM + { + /** + * Voltage dependent reactive current injection (). + */ + mode1, + /** + * 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 (). + */ + mode3, + }; + + WindLVRTQcontrolModesKind() : value(), initialized(false) {} + WindLVRTQcontrolModesKind(WindLVRTQcontrolModesKind_ENUM value) : value(value), initialized(true) {} + + WindLVRTQcontrolModesKind& operator=(WindLVRTQcontrolModesKind_ENUM rop); + operator WindLVRTQcontrolModesKind_ENUM() const; + + WindLVRTQcontrolModesKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindLVRTQcontrolModesKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindLVRTQcontrolModesKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp new file mode 100644 index 000000000..e6d94391f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp @@ -0,0 +1,117 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindLookupTableFunctionKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindLookupTableFunctionKind& WindLookupTableFunctionKind::operator=(WindLookupTableFunctionKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindLookupTableFunctionKind::operator WindLookupTableFunctionKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindLookupTableFunctionKind::debugName[] = "WindLookupTableFunctionKind"; +const char* WindLookupTableFunctionKind::debugString() const +{ + return WindLookupTableFunctionKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindLookupTableFunctionKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "fpslip") + { + rop = WindLookupTableFunctionKind::fpslip; + return lop; + } + if(EnumSymbol == "fpomega") + { + rop = WindLookupTableFunctionKind::fpomega; + return lop; + } + if(EnumSymbol == "ipvdl") + { + rop = WindLookupTableFunctionKind::ipvdl; + return lop; + } + if(EnumSymbol == "iqvdl") + { + rop = WindLookupTableFunctionKind::iqvdl; + return lop; + } + if(EnumSymbol == "fdpf") + { + rop = WindLookupTableFunctionKind::fdpf; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindLookupTableFunctionKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindLookupTableFunctionKind::fpslip) + { + EnumSymbol = "fpslip"; + } + if (obj.value == WindLookupTableFunctionKind::fpomega) + { + EnumSymbol = "fpomega"; + } + if (obj.value == WindLookupTableFunctionKind::ipvdl) + { + EnumSymbol = "ipvdl"; + } + if (obj.value == WindLookupTableFunctionKind::iqvdl) + { + EnumSymbol = "iqvdl"; + } + if (obj.value == WindLookupTableFunctionKind::fdpf) + { + EnumSymbol = "fdpf"; + } + + if (!EnumSymbol.empty()) + { + os << "WindLookupTableFunctionKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp new file mode 100644 index 000000000..98f42e4fa --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp @@ -0,0 +1,58 @@ +#ifndef WindLookupTableFunctionKind_H +#define WindLookupTableFunctionKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + fdpf, + }; + + WindLookupTableFunctionKind() : value(), initialized(false) {} + WindLookupTableFunctionKind(WindLookupTableFunctionKind_ENUM value) : value(value), initialized(true) {} + + WindLookupTableFunctionKind& operator=(WindLookupTableFunctionKind_ENUM rop); + operator WindLookupTableFunctionKind_ENUM() const; + + WindLookupTableFunctionKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindLookupTableFunctionKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindLookupTableFunctionKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp b/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp new file mode 100644 index 000000000..baaf7aa19 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp @@ -0,0 +1,171 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindMechIEC.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_WindMechIEC_cdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cdrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindMechIEC_hgen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hgen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindMechIEC_hwtr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hwtr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindMechIEC_kdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindMechIEC* 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_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindMechIEC::debugName[] = "WindMechIEC"; +const char* WindMechIEC::debugString() const +{ + return WindMechIEC::debugName; +} + +void WindMechIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindMechIEC::declare() +{ + return BaseClassDefiner(WindMechIEC::addConstructToMap, WindMechIEC::addPrimitiveAssignFnsToMap, WindMechIEC::addClassAssignFnsToMap, WindMechIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindMechIEC_factory() + { + return new WindMechIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp b/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp new file mode 100644 index 000000000..ae94d37e0 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp @@ -0,0 +1,51 @@ +#ifndef WindMechIEC_H +#define WindMechIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindGenTurbineType3IEC; + class WindTurbineType1or2IEC; + class WindTurbineType4bIEC; + + /* + Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. + */ + class WindMechIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindMechIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp new file mode 100644 index 000000000..560b23032 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPitchContEmulIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindPitchContEmulIEC_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdroop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_kipce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kipce; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->komegaaero; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_kppce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kppce; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_omegaref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegaref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_pimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_pimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContEmulIEC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + +const char WindPitchContEmulIEC::debugName[] = "WindPitchContEmulIEC"; +const char* WindPitchContEmulIEC::debugString() const +{ + return WindPitchContEmulIEC::debugName; +} + +void WindPitchContEmulIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindPitchContEmulIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC"), &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC)); +} + +const BaseClassDefiner WindPitchContEmulIEC::declare() +{ + return BaseClassDefiner(WindPitchContEmulIEC::addConstructToMap, WindPitchContEmulIEC::addPrimitiveAssignFnsToMap, WindPitchContEmulIEC::addClassAssignFnsToMap, WindPitchContEmulIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPitchContEmulIEC_factory() + { + return new WindPitchContEmulIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp new file mode 100644 index 000000000..d8a52e704 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp @@ -0,0 +1,54 @@ +#ifndef WindPitchContEmulIEC_H +#define WindPitchContEmulIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class WindGenTurbineType2IEC; + + /* + Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. + */ + class WindPitchContEmulIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPitchContEmulIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp new file mode 100644 index 000000000..8234ab546 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantDynamics.hpp" + +#include +#include + +#include "RemoteInputSignal.hpp" +#include "WindTurbineType3or4Dynamics.hpp" + +using namespace CIMPP; + +WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {}; +WindPlantDynamics::~WindPlantDynamics() {}; + + + + + +bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass*, BaseClass*); +bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_WindPlantDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass*, BaseClass*); +bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindTurbineType3or4Dynamics.begin(), element->WindTurbineType3or4Dynamics.end(), element2) == element->WindTurbineType3or4Dynamics.end()) + { + element->WindTurbineType3or4Dynamics.push_back(element2); + return assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindPlantDynamics::debugName[] = "WindPlantDynamics"; +const char* WindPlantDynamics::debugString() const +{ + return WindPlantDynamics::debugName; +} + +void WindPlantDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindPlantDynamics"), &WindPlantDynamics_factory)); +} + +void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindPlantDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindPlantDynamics::declare() +{ + return BaseClassDefiner(WindPlantDynamics::addConstructToMap, WindPlantDynamics::addPrimitiveAssignFnsToMap, WindPlantDynamics::addClassAssignFnsToMap, WindPlantDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantDynamics_factory() + { + return new WindPlantDynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp new file mode 100644 index 000000000..a0931f253 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef WindPlantDynamics_H +#define WindPlantDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindPlantDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantDynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp new file mode 100644 index 000000000..8340a1e1b --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp @@ -0,0 +1,247 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantFreqPcontrolIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dprefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dprefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpwpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpft; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twpffilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twppfilt; + if (buffer.fail()) + return false; + else + 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; +} + + + + + + + + + + + +const char WindPlantFreqPcontrolIEC::debugName[] = "WindPlantFreqPcontrolIEC"; +const char* WindPlantFreqPcontrolIEC::debugString() const +{ + return WindPlantFreqPcontrolIEC::debugName; +} + +void WindPlantFreqPcontrolIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindPlantFreqPcontrolIEC::declare() +{ + return BaseClassDefiner(WindPlantFreqPcontrolIEC::addConstructToMap, WindPlantFreqPcontrolIEC::addPrimitiveAssignFnsToMap, WindPlantFreqPcontrolIEC::addClassAssignFnsToMap, WindPlantFreqPcontrolIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantFreqPcontrolIEC_factory() + { + return new WindPlantFreqPcontrolIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp new file mode 100644 index 000000000..5e3c327c9 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp @@ -0,0 +1,56 @@ +#ifndef WindPlantFreqPcontrolIEC_H +#define WindPlantFreqPcontrolIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindPlantIEC; + + /* + Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. + */ + class WindPlantFreqPcontrolIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantFreqPcontrolIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp new file mode 100644 index 000000000..d05195c27 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantIEC.hpp" + +#include +#include + +#include "WindPlantFreqPcontrolIEC.hpp" +#include "WindPlantReactiveControlIEC.hpp" + +using namespace CIMPP; + +WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {}; +WindPlantIEC::~WindPlantIEC() {}; + + + + + +bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass*, BaseClass*); +bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantFreqPcontrolIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantFreqPcontrolIEC != element2) + { + element->WindPlantFreqPcontrolIEC = element2; + return assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass*, BaseClass*); +bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantReactiveControlIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantReactiveControlIEC != element2) + { + element->WindPlantReactiveControlIEC = element2; + return assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindPlantIEC::debugName[] = "WindPlantIEC"; +const char* WindPlantIEC::debugString() const +{ + return WindPlantIEC::debugName; +} + +void WindPlantIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindPlantIEC"), &WindPlantIEC_factory)); +} + +void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindPlantIEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindPlantIEC::declare() +{ + return BaseClassDefiner(WindPlantIEC::addConstructToMap, WindPlantIEC::addPrimitiveAssignFnsToMap, WindPlantIEC::addClassAssignFnsToMap, WindPlantIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantIEC_factory() + { + return new WindPlantIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp new file mode 100644 index 000000000..28e9bf1d6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindPlantIEC_H +#define WindPlantIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindPlantDynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindPlantFreqPcontrolIEC; + class WindPlantReactiveControlIEC; + + /* + Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. + */ + class WindPlantIEC : public WindPlantDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp new file mode 100644 index 000000000..8c885fe24 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp @@ -0,0 +1,275 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantReactiveControlIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwpx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpwpx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kwpqu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwppf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twppfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twpqfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twpufilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_txft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->txft; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->txfv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uwpqdip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + 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; +} + + + + + + + + + + + + + + +const char WindPlantReactiveControlIEC::debugName[] = "WindPlantReactiveControlIEC"; +const char* WindPlantReactiveControlIEC::debugString() const +{ + return WindPlantReactiveControlIEC::debugName; +} + +void WindPlantReactiveControlIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindPlantReactiveControlIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.WindPlantIEC"), &assign_WindPlantReactiveControlIEC_WindPlantIEC)); +} + +const BaseClassDefiner WindPlantReactiveControlIEC::declare() +{ + return BaseClassDefiner(WindPlantReactiveControlIEC::addConstructToMap, WindPlantReactiveControlIEC::addPrimitiveAssignFnsToMap, WindPlantReactiveControlIEC::addClassAssignFnsToMap, WindPlantReactiveControlIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantReactiveControlIEC_factory() + { + return new WindPlantReactiveControlIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp new file mode 100644 index 000000000..cb72971bb --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp @@ -0,0 +1,58 @@ +#ifndef WindPlantReactiveControlIEC_H +#define WindPlantReactiveControlIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Simple_Float.hpp" + +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. + */ + class WindPlantReactiveControlIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantReactiveControlIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp new file mode 100644 index 000000000..443180339 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +WindPlantUserDefined::WindPlantUserDefined() {}; +WindPlantUserDefined::~WindPlantUserDefined() {}; + + + +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) +{ + WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindPlantUserDefined::debugName[] = "WindPlantUserDefined"; +const char* WindPlantUserDefined::debugString() const +{ + return WindPlantUserDefined::debugName; +} + +void WindPlantUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindPlantUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.ProprietaryParameterDynamics"), &assign_WindPlantUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner WindPlantUserDefined::declare() +{ + return BaseClassDefiner(WindPlantUserDefined::addConstructToMap, WindPlantUserDefined::addPrimitiveAssignFnsToMap, WindPlantUserDefined::addClassAssignFnsToMap, WindPlantUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantUserDefined_factory() + { + return new WindPlantUserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp new file mode 100644 index 000000000..c4afa108d --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef WindPlantUserDefined_H +#define WindPlantUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindPlantDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Wind plant function block whose dynamic behaviour is described by + */ + class WindPlantUserDefined : public WindPlantDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantUserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp new file mode 100644 index 000000000..88873297f --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp @@ -0,0 +1,215 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindProtectionIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindProtectionIEC_fover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fover; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_funder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->funder; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_tfover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfover; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_tfunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfunder; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_tuover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuover; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_tuunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuunder; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_uover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uover; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_uunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uunder; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindProtectionIEC* 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_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + + +const char WindProtectionIEC::debugName[] = "WindProtectionIEC"; +const char* WindProtectionIEC::debugString() const +{ + return WindProtectionIEC::debugName; +} + +void WindProtectionIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindProtectionIEC::declare() +{ + return BaseClassDefiner(WindProtectionIEC::addConstructToMap, WindProtectionIEC::addPrimitiveAssignFnsToMap, WindProtectionIEC::addClassAssignFnsToMap, WindProtectionIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindProtectionIEC_factory() + { + return new WindProtectionIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp new file mode 100644 index 000000000..aff760adf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp @@ -0,0 +1,53 @@ +#ifndef WindProtectionIEC_H +#define WindProtectionIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class WindProtectionIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindProtectionIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp new file mode 100644 index 000000000..b5c887e96 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindQcontrolModesKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindQcontrolModesKind& WindQcontrolModesKind::operator=(WindQcontrolModesKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindQcontrolModesKind::operator WindQcontrolModesKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindQcontrolModesKind::debugName[] = "WindQcontrolModesKind"; +const char* WindQcontrolModesKind::debugString() const +{ + return WindQcontrolModesKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindQcontrolModesKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "voltage") + { + rop = WindQcontrolModesKind::voltage; + return lop; + } + if(EnumSymbol == "reactivePower") + { + rop = WindQcontrolModesKind::reactivePower; + return lop; + } + if(EnumSymbol == "openLoopReactivePower") + { + rop = WindQcontrolModesKind::openLoopReactivePower; + return lop; + } + if(EnumSymbol == "powerFactor") + { + rop = WindQcontrolModesKind::powerFactor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindQcontrolModesKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindQcontrolModesKind::voltage) + { + EnumSymbol = "voltage"; + } + if (obj.value == WindQcontrolModesKind::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == WindQcontrolModesKind::openLoopReactivePower) + { + EnumSymbol = "openLoopReactivePower"; + } + if (obj.value == WindQcontrolModesKind::powerFactor) + { + EnumSymbol = "powerFactor"; + } + + if (!EnumSymbol.empty()) + { + os << "WindQcontrolModesKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp new file mode 100644 index 000000000..770a20720 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp @@ -0,0 +1,54 @@ +#ifndef WindQcontrolModesKind_H +#define WindQcontrolModesKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + General wind turbine Q control modes . + */ + class WindQcontrolModesKind + { + public: + enum WindQcontrolModesKind_ENUM + { + /** + * Voltage control (). + */ + voltage, + /** + * Reactive power control (). + */ + reactivePower, + /** + * Open loop reactive power control (only used with closed loop at plant level) (). + */ + openLoopReactivePower, + /** + * Power factor control (). + */ + powerFactor, + }; + + WindQcontrolModesKind() : value(), initialized(false) {} + WindQcontrolModesKind(WindQcontrolModesKind_ENUM value) : value(value), initialized(true) {} + + WindQcontrolModesKind& operator=(WindQcontrolModesKind_ENUM rop); + operator WindQcontrolModesKind_ENUM() const; + + WindQcontrolModesKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindQcontrolModesKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindQcontrolModesKind& obj); + }; +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp new file mode 100644 index 000000000..e406e4c7c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType1or2Dynamics.hpp" + +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {}; +WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {}; + + + + + +bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2Dynamics* 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_WindTurbineType1or2Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType1or2Dynamics::debugName[] = "WindTurbineType1or2Dynamics"; +const char* WindTurbineType1or2Dynamics::debugString() const +{ + return WindTurbineType1or2Dynamics::debugName; +} + +void WindTurbineType1or2Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics"), &WindTurbineType1or2Dynamics_factory)); +} + +void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner WindTurbineType1or2Dynamics::declare() +{ + return BaseClassDefiner(WindTurbineType1or2Dynamics::addConstructToMap, WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap, WindTurbineType1or2Dynamics::addClassAssignFnsToMap, WindTurbineType1or2Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType1or2Dynamics_factory() + { + return new WindTurbineType1or2Dynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp new file mode 100644 index 000000000..7376d2de7 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp @@ -0,0 +1,43 @@ +#ifndef WindTurbineType1or2Dynamics_H +#define WindTurbineType1or2Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AsynchronousMachineDynamics; + class RemoteInputSignal; + + /* + Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. + */ + class WindTurbineType1or2Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType1or2Dynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp new file mode 100644 index 000000000..5b28517df --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType1or2IEC.hpp" + +#include +#include + +#include "WindMechIEC.hpp" +#include "WindProtectionIEC.hpp" + +using namespace CIMPP; + +WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {}; +WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {}; + + + + + +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + WindMechIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindMechIEC != element2) + { + element->WindMechIEC = element2; + return assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + WindProtectionIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindProtectionIEC != element2) + { + element->WindProtectionIEC = element2; + return assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType1or2IEC::debugName[] = "WindTurbineType1or2IEC"; +const char* WindTurbineType1or2IEC::debugString() const +{ + return WindTurbineType1or2IEC::debugName; +} + +void WindTurbineType1or2IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC"), &WindTurbineType1or2IEC_factory)); +} + +void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType1or2IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType1or2IEC::declare() +{ + return BaseClassDefiner(WindTurbineType1or2IEC::addConstructToMap, WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap, WindTurbineType1or2IEC::addClassAssignFnsToMap, WindTurbineType1or2IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType1or2IEC_factory() + { + return new WindTurbineType1or2IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp new file mode 100644 index 000000000..fa28cd1a6 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindTurbineType1or2IEC_H +#define WindTurbineType1or2IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2Dynamics.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindTurbineType1or2IEC : public WindTurbineType1or2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType1or2IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp new file mode 100644 index 000000000..c07dc9b09 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType3or4Dynamics.hpp" + +#include +#include + +#include "EnergySource.hpp" +#include "RemoteInputSignal.hpp" +#include "WindPlantDynamics.hpp" + +using namespace CIMPP; + +WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {}; +WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {}; + + + + + + +bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + EnergySource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergySource != element2) + { + element->EnergySource = element2; + return assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + WindPlantDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantDynamics != element2) + { + element->WindPlantDynamics = element2; + return assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType3or4Dynamics::debugName[] = "WindTurbineType3or4Dynamics"; +const char* WindTurbineType3or4Dynamics::debugString() const +{ + return WindTurbineType3or4Dynamics::debugName; +} + +void WindTurbineType3or4Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics"), &WindTurbineType3or4Dynamics_factory)); +} + +void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner WindTurbineType3or4Dynamics::declare() +{ + return BaseClassDefiner(WindTurbineType3or4Dynamics::addConstructToMap, WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap, WindTurbineType3or4Dynamics::addClassAssignFnsToMap, WindTurbineType3or4Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType3or4Dynamics_factory() + { + return new WindTurbineType3or4Dynamics; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp new file mode 100644 index 000000000..9f217f08c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp @@ -0,0 +1,45 @@ +#ifndef WindTurbineType3or4Dynamics_H +#define WindTurbineType3or4Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class EnergySource; + class RemoteInputSignal; + class WindPlantDynamics; + + /* + Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. + */ + class WindTurbineType3or4Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType3or4Dynamics_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp new file mode 100644 index 000000000..0b04e8254 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType3or4IEC.hpp" + +#include +#include + +#include "WindContQIEC.hpp" +#include "WindContCurrLimIEC.hpp" +#include "WindProtectionIEC.hpp" + +using namespace CIMPP; + +WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {}; +WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {}; + + + + + + +bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindContQIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WIndContQIEC != element2) + { + element->WIndContQIEC = element2; + return assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindContCurrLimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContCurrLimIEC != element2) + { + element->WindContCurrLimIEC = element2; + return assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindProtectionIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindProtectionIEC != element2) + { + element->WindProtectionIEC = element2; + return assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType3or4IEC::debugName[] = "WindTurbineType3or4IEC"; +const char* WindTurbineType3or4IEC::debugString() const +{ + return WindTurbineType3or4IEC::debugName; +} + +void WindTurbineType3or4IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC"), &WindTurbineType3or4IEC_factory)); +} + +void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType3or4IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType3or4IEC::declare() +{ + return BaseClassDefiner(WindTurbineType3or4IEC::addConstructToMap, WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap, WindTurbineType3or4IEC::addClassAssignFnsToMap, WindTurbineType3or4IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType3or4IEC_factory() + { + return new WindTurbineType3or4IEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp new file mode 100644 index 000000000..b85ecab14 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindTurbineType3or4IEC_H +#define WindTurbineType3or4IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4Dynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContCurrLimIEC; + class WindContQIEC; + class WindProtectionIEC; + + /* + Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. + */ + class WindTurbineType3or4IEC : public WindTurbineType3or4Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType3or4IEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp new file mode 100644 index 000000000..ed87fb457 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType4aIEC.hpp" + +#include +#include + +#include "WindContPType4aIEC.hpp" + +using namespace CIMPP; + +WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {}; +WindTurbineType4aIEC::~WindTurbineType4aIEC() {}; + + + + +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindContPType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType4aIEC != element2) + { + element->WindContPType4aIEC = element2; + return assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType4aIEC::debugName[] = "WindTurbineType4aIEC"; +const char* WindTurbineType4aIEC::debugString() const +{ + return WindTurbineType4aIEC::debugName; +} + +void WindTurbineType4aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC"), &WindTurbineType4aIEC_factory)); +} + +void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC.WindContPType4aIEC"), &assign_WindTurbineType4aIEC_WindContPType4aIEC)); +} + +const BaseClassDefiner WindTurbineType4aIEC::declare() +{ + return BaseClassDefiner(WindTurbineType4aIEC::addConstructToMap, WindTurbineType4aIEC::addPrimitiveAssignFnsToMap, WindTurbineType4aIEC::addClassAssignFnsToMap, WindTurbineType4aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType4aIEC_factory() + { + return new WindTurbineType4aIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp new file mode 100644 index 000000000..d8365200e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindTurbineType4aIEC_H +#define WindTurbineType4aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindGenType4IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContPType4aIEC; + + /* + Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. + */ + class WindTurbineType4aIEC : public WindGenType4IEC + { + public: + /* constructor initialising all attributes to null */ + WindTurbineType4aIEC(); + ~WindTurbineType4aIEC() override; + + CIMPP::WindContPType4aIEC* WindContPType4aIEC; /* Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType4aIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp new file mode 100644 index 000000000..d0d665581 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType4bIEC.hpp" + +#include +#include + +#include "WindContPType4bIEC.hpp" +#include "WindMechIEC.hpp" + +using namespace CIMPP; + +WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {}; +WindTurbineType4bIEC::~WindTurbineType4bIEC() {}; + + + + + +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindContPType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType4bIEC != element2) + { + element->WindContPType4bIEC = element2; + return assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindMechIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindMechIEC != element2) + { + element->WindMechIEC = element2; + return assign_WindMechIEC_WindTurbineType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType4bIEC::debugName[] = "WindTurbineType4bIEC"; +const char* WindTurbineType4bIEC::debugString() const +{ + return WindTurbineType4bIEC::debugName; +} + +void WindTurbineType4bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC"), &WindTurbineType4bIEC_factory)); +} + +void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType4bIEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType4bIEC::declare() +{ + return BaseClassDefiner(WindTurbineType4bIEC::addConstructToMap, WindTurbineType4bIEC::addPrimitiveAssignFnsToMap, WindTurbineType4bIEC::addClassAssignFnsToMap, WindTurbineType4bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType4bIEC_factory() + { + return new WindTurbineType4bIEC; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp new file mode 100644 index 000000000..d7f049f14 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindTurbineType4bIEC_H +#define WindTurbineType4bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindGenType4IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContPType4bIEC; + class WindMechIEC; + + /* + Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. + */ + class WindTurbineType4bIEC : public WindGenType4IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType4bIEC_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp new file mode 100644 index 000000000..d17ab6680 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindType1or2UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +WindType1or2UserDefined::WindType1or2UserDefined() {}; +WindType1or2UserDefined::~WindType1or2UserDefined() {}; + + + +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) +{ + WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindType1or2UserDefined::debugName[] = "WindType1or2UserDefined"; +const char* WindType1or2UserDefined::debugString() const +{ + return WindType1or2UserDefined::debugName; +} + +void WindType1or2UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindType1or2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.ProprietaryParameterDynamics"), &assign_WindType1or2UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner WindType1or2UserDefined::declare() +{ + return BaseClassDefiner(WindType1or2UserDefined::addConstructToMap, WindType1or2UserDefined::addPrimitiveAssignFnsToMap, WindType1or2UserDefined::addClassAssignFnsToMap, WindType1or2UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* WindType1or2UserDefined_factory() + { + return new WindType1or2UserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp new file mode 100644 index 000000000..e411af40e --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef WindType1or2UserDefined_H +#define WindType1or2UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Wind Type 1 or Type 2 function block whose dynamic behaviour is described by + */ + class WindType1or2UserDefined : public WindTurbineType1or2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindType1or2UserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp new file mode 100644 index 000000000..1224d7233 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindType3or4UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +WindType3or4UserDefined::WindType3or4UserDefined() {}; +WindType3or4UserDefined::~WindType3or4UserDefined() {}; + + + +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) +{ + WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindType3or4UserDefined::debugName[] = "WindType3or4UserDefined"; +const char* WindType3or4UserDefined::debugString() const +{ + return WindType3or4UserDefined::debugName; +} + +void WindType3or4UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindType3or4UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.ProprietaryParameterDynamics"), &assign_WindType3or4UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner WindType3or4UserDefined::declare() +{ + return BaseClassDefiner(WindType3or4UserDefined::addConstructToMap, WindType3or4UserDefined::addPrimitiveAssignFnsToMap, WindType3or4UserDefined::addClassAssignFnsToMap, WindType3or4UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* WindType3or4UserDefined_factory() + { + return new WindType3or4UserDefined; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp new file mode 100644 index 000000000..32737770c --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef WindType3or4UserDefined_H +#define WindType3or4UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Wind Type 3 or Type 4 function block whose dynamic behaviour is described by + */ + class WindType3or4UserDefined : public WindTurbineType3or4Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindType3or4UserDefined_factory(); +} +#endif diff --git a/CGMES_2.4.13_18DEC2013/WindingConnection.cpp b/CGMES_2.4.13_18DEC2013/WindingConnection.cpp new file mode 100644 index 000000000..498dcbe94 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindingConnection.cpp @@ -0,0 +1,135 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindingConnection.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindingConnection& WindingConnection::operator=(WindingConnection_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindingConnection::operator WindingConnection_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindingConnection::debugName[] = "WindingConnection"; +const char* WindingConnection::debugString() const +{ + return WindingConnection::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindingConnection& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindingConnection") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "D") + { + rop = WindingConnection::D; + return lop; + } + if(EnumSymbol == "Y") + { + rop = WindingConnection::Y; + return lop; + } + if(EnumSymbol == "Z") + { + rop = WindingConnection::Z; + return lop; + } + if(EnumSymbol == "Yn") + { + rop = WindingConnection::Yn; + return lop; + } + if(EnumSymbol == "Zn") + { + rop = WindingConnection::Zn; + return lop; + } + if(EnumSymbol == "A") + { + rop = WindingConnection::A; + return lop; + } + if(EnumSymbol == "I") + { + rop = WindingConnection::I; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindingConnection& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindingConnection::D) + { + EnumSymbol = "D"; + } + if (obj.value == WindingConnection::Y) + { + EnumSymbol = "Y"; + } + if (obj.value == WindingConnection::Z) + { + EnumSymbol = "Z"; + } + if (obj.value == WindingConnection::Yn) + { + EnumSymbol = "Yn"; + } + if (obj.value == WindingConnection::Zn) + { + EnumSymbol = "Zn"; + } + if (obj.value == WindingConnection::A) + { + EnumSymbol = "A"; + } + if (obj.value == WindingConnection::I) + { + EnumSymbol = "I"; + } + + if (!EnumSymbol.empty()) + { + os << "WindingConnection." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_2.4.13_18DEC2013/WindingConnection.hpp b/CGMES_2.4.13_18DEC2013/WindingConnection.hpp new file mode 100644 index 000000000..398f89ecf --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/WindingConnection.hpp @@ -0,0 +1,66 @@ +#ifndef WindingConnection_H +#define WindingConnection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Winding connection type. + */ + class WindingConnection + { + public: + enum WindingConnection_ENUM + { + /** + * Delta + */ + D, + /** + * Wye + */ + Y, + /** + * ZigZag + */ + Z, + /** + * Wye, with neutral brought out for grounding. + */ + Yn, + /** + * ZigZag, with neutral brought out for grounding. + */ + Zn, + /** + * Autotransformer common winding + */ + A, + /** + * Independent winding, for single-phase connections + */ + I, + }; + + WindingConnection() : value(), initialized(false) {} + WindingConnection(WindingConnection_ENUM value) : value(value), initialized(true) {} + + WindingConnection& operator=(WindingConnection_ENUM rop); + operator WindingConnection_ENUM() const; + + WindingConnection_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindingConnection& rop); + friend std::ostream& operator<<(std::ostream& os, const WindingConnection& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ACDCConverter.cpp b/CGMES_3.0.0/ACDCConverter.cpp new file mode 100644 index 000000000..f1d1840de --- /dev/null +++ b/CGMES_3.0.0/ACDCConverter.cpp @@ -0,0 +1,391 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACDCConverter.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_ACDCConverter_baseS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->baseS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_idc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->idc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_idleLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->idleLoss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_maxUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_minUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_numberOfValves(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->numberOfValves; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_poleLossP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->poleLossP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_resistiveLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistiveLoss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_switchingLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->switchingLoss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_targetPpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetPpcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_targetUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetUdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_udc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACDCConverter_valveU0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valveU0; + if (buffer.fail()) + return false; + else + 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) +{ + 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; +} + + + + + + + + + + + + + + + + + + + + +const char ACDCConverter::debugName[] = "ACDCConverter"; +const char* ACDCConverter::debugString() const +{ + return ACDCConverter::debugName; +} + +void ACDCConverter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ACDCConverter::declare() +{ + return BaseClassDefiner(ACDCConverter::addConstructToMap, ACDCConverter::addPrimitiveAssignFnsToMap, ACDCConverter::addClassAssignFnsToMap, ACDCConverter::debugName); +} + +namespace CIMPP +{ + BaseClass* ACDCConverter_factory() + { + return new ACDCConverter; + } +} diff --git a/CGMES_3.0.0/ACDCConverter.hpp b/CGMES_3.0.0/ACDCConverter.hpp new file mode 100644 index 000000000..4e8e8d6fb --- /dev/null +++ b/CGMES_3.0.0/ACDCConverter.hpp @@ -0,0 +1,70 @@ +#ifndef ACDCConverter_H +#define ACDCConverter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ActivePowerPerCurrentFlow.hpp" +#include "ApparentPower.hpp" +#include "CurrentFlow.hpp" +#include "Integer.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +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. + */ + class ACDCConverter : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACDCConverter_factory(); +} +#endif diff --git a/CGMES_3.0.0/ACDCConverterDCTerminal.cpp b/CGMES_3.0.0/ACDCConverterDCTerminal.cpp new file mode 100644 index 000000000..59998ff38 --- /dev/null +++ b/CGMES_3.0.0/ACDCConverterDCTerminal.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACDCConverterDCTerminal.hpp" + +#include +#include + +#include "ACDCConverter.hpp" +#include "DCPolarityKind.hpp" + +using namespace CIMPP; + +ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {}; +ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {}; + + + +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) +{ + ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + ACDCConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCConductingEquipment != element2) + { + element->DCConductingEquipment = element2; + return assign_ACDCConverter_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char ACDCConverterDCTerminal::debugName[] = "ACDCConverterDCTerminal"; +const char* ACDCConverterDCTerminal::debugString() const +{ + return ACDCConverterDCTerminal::debugName; +} + +void ACDCConverterDCTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ACDCConverterDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.DCConductingEquipment"), &assign_ACDCConverterDCTerminal_DCConductingEquipment)); +} + +const BaseClassDefiner ACDCConverterDCTerminal::declare() +{ + return BaseClassDefiner(ACDCConverterDCTerminal::addConstructToMap, ACDCConverterDCTerminal::addPrimitiveAssignFnsToMap, ACDCConverterDCTerminal::addClassAssignFnsToMap, ACDCConverterDCTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* ACDCConverterDCTerminal_factory() + { + return new ACDCConverterDCTerminal; + } +} diff --git a/CGMES_3.0.0/ACDCConverterDCTerminal.hpp b/CGMES_3.0.0/ACDCConverterDCTerminal.hpp new file mode 100644 index 000000000..63099c94d --- /dev/null +++ b/CGMES_3.0.0/ACDCConverterDCTerminal.hpp @@ -0,0 +1,43 @@ +#ifndef ACDCConverterDCTerminal_H +#define ACDCConverterDCTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCBaseTerminal.hpp" +#include "BaseClassDefiner.hpp" +#include "DCPolarityKind.hpp" + +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. + */ + class ACDCConverterDCTerminal : public DCBaseTerminal + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACDCConverterDCTerminal_factory(); +} +#endif diff --git a/CGMES_3.0.0/ACDCTerminal.cpp b/CGMES_3.0.0/ACDCTerminal.cpp new file mode 100644 index 000000000..b1c7a092b --- /dev/null +++ b/CGMES_3.0.0/ACDCTerminal.cpp @@ -0,0 +1,139 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACDCTerminal.hpp" + +#include +#include + +#include "BusNameMarker.hpp" +#include "Measurement.hpp" +#include "OperationalLimitSet.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {}; +ACDCTerminal::~ACDCTerminal() {}; + + + + + +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) +{ + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + BusNameMarker* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BusNameMarker != element2) + { + element->BusNameMarker = element2; + return assign_BusNameMarker_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Measurement_Terminal(BaseClass*, BaseClass*); +bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + Measurement* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Measurement_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimitSet_Terminal(BaseClass*, BaseClass*); +bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->OperationalLimitSet.begin(), element->OperationalLimitSet.end(), element2) == element->OperationalLimitSet.end()) + { + element->OperationalLimitSet.push_back(element2); + return assign_OperationalLimitSet_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char ACDCTerminal::debugName[] = "ACDCTerminal"; +const char* ACDCTerminal::debugString() const +{ + return ACDCTerminal::debugName; +} + +void ACDCTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ACDCTerminal::declare() +{ + return BaseClassDefiner(ACDCTerminal::addConstructToMap, ACDCTerminal::addPrimitiveAssignFnsToMap, ACDCTerminal::addClassAssignFnsToMap, ACDCTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* ACDCTerminal_factory() + { + return new ACDCTerminal; + } +} diff --git a/CGMES_3.0.0/ACDCTerminal.hpp b/CGMES_3.0.0/ACDCTerminal.hpp new file mode 100644 index 000000000..00da5c4a1 --- /dev/null +++ b/CGMES_3.0.0/ACDCTerminal.hpp @@ -0,0 +1,49 @@ +#ifndef ACDCTerminal_H +#define ACDCTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class BusNameMarker; + 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. + */ + class ACDCTerminal : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACDCTerminal_factory(); +} +#endif diff --git a/CGMES_3.0.0/ACLineSegment.cpp b/CGMES_3.0.0/ACLineSegment.cpp new file mode 100644 index 000000000..419076844 --- /dev/null +++ b/CGMES_3.0.0/ACLineSegment.cpp @@ -0,0 +1,231 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ACLineSegment.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_ACLineSegment_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_bch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_gch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->shortCircuitEndTemperature; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ACLineSegment_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_Clamp_ACLineSegment(BaseClass*, BaseClass*); +bool assign_ACLineSegment_Clamp(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + Clamp* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_Cut_ACLineSegment(BaseClass*, BaseClass*); +bool assign_ACLineSegment_Cut(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + Cut* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + + + + + +const char ACLineSegment::debugName[] = "ACLineSegment"; +const char* ACLineSegment::debugString() const +{ + return ACLineSegment::debugName; +} + +void ACLineSegment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ACLineSegment::declare() +{ + return BaseClassDefiner(ACLineSegment::addConstructToMap, ACLineSegment::addPrimitiveAssignFnsToMap, ACLineSegment::addClassAssignFnsToMap, ACLineSegment::debugName); +} + +namespace CIMPP +{ + BaseClass* ACLineSegment_factory() + { + return new ACLineSegment; + } +} diff --git a/CGMES_3.0.0/ACLineSegment.hpp b/CGMES_3.0.0/ACLineSegment.hpp new file mode 100644 index 000000000..8eb407070 --- /dev/null +++ b/CGMES_3.0.0/ACLineSegment.hpp @@ -0,0 +1,57 @@ +#ifndef ACLineSegment_H +#define ACLineSegment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Conductor.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Susceptance.hpp" +#include "Temperature.hpp" + +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. + */ + class ACLineSegment : public Conductor + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ACLineSegment_factory(); +} +#endif diff --git a/CGMES_3.0.0/Accumulator.cpp b/CGMES_3.0.0/Accumulator.cpp new file mode 100644 index 000000000..bc61e4d79 --- /dev/null +++ b/CGMES_3.0.0/Accumulator.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Accumulator.hpp" + +#include +#include + +#include "AccumulatorValue.hpp" +#include "AccumulatorLimitSet.hpp" + +using namespace CIMPP; + +Accumulator::Accumulator() {}; +Accumulator::~Accumulator() {}; + + + + + +bool assign_AccumulatorValue_Accumulator(BaseClass*, BaseClass*); +bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Accumulator* element = dynamic_cast(BaseClass_ptr1); + AccumulatorValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->AccumulatorValues.begin(), element->AccumulatorValues.end(), element2) == element->AccumulatorValues.end()) + { + element->AccumulatorValues.push_back(element2); + return assign_AccumulatorValue_Accumulator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AccumulatorLimitSet_Measurements(BaseClass*, BaseClass*); +bool assign_Accumulator_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Accumulator* element = dynamic_cast(BaseClass_ptr1); + AccumulatorLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->LimitSets.begin(), element->LimitSets.end(), element2) == element->LimitSets.end()) + { + element->LimitSets.push_back(element2); + return assign_AccumulatorLimitSet_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Accumulator::debugName[] = "Accumulator"; +const char* Accumulator::debugString() const +{ + return Accumulator::debugName; +} + +void Accumulator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Accumulator"), &Accumulator_factory)); +} + +void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Accumulator::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Accumulator::declare() +{ + return BaseClassDefiner(Accumulator::addConstructToMap, Accumulator::addPrimitiveAssignFnsToMap, Accumulator::addClassAssignFnsToMap, Accumulator::debugName); +} + +namespace CIMPP +{ + BaseClass* Accumulator_factory() + { + return new Accumulator; + } +} diff --git a/CGMES_3.0.0/Accumulator.hpp b/CGMES_3.0.0/Accumulator.hpp new file mode 100644 index 000000000..db2a5ab1e --- /dev/null +++ b/CGMES_3.0.0/Accumulator.hpp @@ -0,0 +1,43 @@ +#ifndef Accumulator_H +#define Accumulator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AccumulatorLimitSet; + class AccumulatorValue; + + /* + Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. + */ + class Accumulator : public Measurement + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Accumulator_factory(); +} +#endif diff --git a/CGMES_3.0.0/AccumulatorLimit.cpp b/CGMES_3.0.0/AccumulatorLimit.cpp new file mode 100644 index 000000000..93e5dbd54 --- /dev/null +++ b/CGMES_3.0.0/AccumulatorLimit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorLimit.hpp" + +#include +#include + +#include "AccumulatorLimitSet.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {}; +AccumulatorLimit::~AccumulatorLimit() {}; + + + +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) +{ + AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + AccumulatorLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LimitSet != element2) + { + element->LimitSet = element2; + return assign_AccumulatorLimitSet_Limits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AccumulatorLimit::debugName[] = "AccumulatorLimit"; +const char* AccumulatorLimit::debugString() const +{ + return AccumulatorLimit::debugName; +} + +void AccumulatorLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AccumulatorLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.LimitSet"), &assign_AccumulatorLimit_LimitSet)); +} + +const BaseClassDefiner AccumulatorLimit::declare() +{ + return BaseClassDefiner(AccumulatorLimit::addConstructToMap, AccumulatorLimit::addPrimitiveAssignFnsToMap, AccumulatorLimit::addClassAssignFnsToMap, AccumulatorLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorLimit_factory() + { + return new AccumulatorLimit; + } +} diff --git a/CGMES_3.0.0/AccumulatorLimit.hpp b/CGMES_3.0.0/AccumulatorLimit.hpp new file mode 100644 index 000000000..9a64975dc --- /dev/null +++ b/CGMES_3.0.0/AccumulatorLimit.hpp @@ -0,0 +1,43 @@ +#ifndef AccumulatorLimit_H +#define AccumulatorLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Limit.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class AccumulatorLimitSet; + + /* + Limit values for Accumulator measurements. + */ + class AccumulatorLimit : public Limit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/AccumulatorLimitSet.cpp b/CGMES_3.0.0/AccumulatorLimitSet.cpp new file mode 100644 index 000000000..095a74310 --- /dev/null +++ b/CGMES_3.0.0/AccumulatorLimitSet.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorLimitSet.hpp" + +#include +#include + +#include "AccumulatorLimit.hpp" +#include "Accumulator.hpp" + +using namespace CIMPP; + +AccumulatorLimitSet::AccumulatorLimitSet() {}; +AccumulatorLimitSet::~AccumulatorLimitSet() {}; + + + + + +bool assign_AccumulatorLimit_LimitSet(BaseClass*, BaseClass*); +bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + AccumulatorLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Limits.begin(), element->Limits.end(), element2) == element->Limits.end()) + { + element->Limits.push_back(element2); + return assign_AccumulatorLimit_LimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Accumulator_LimitSets(BaseClass*, BaseClass*); +bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + Accumulator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Accumulator_LimitSets(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AccumulatorLimitSet::debugName[] = "AccumulatorLimitSet"; +const char* AccumulatorLimitSet::debugString() const +{ + return AccumulatorLimitSet::debugName; +} + +void AccumulatorLimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet"), &AccumulatorLimitSet_factory)); +} + +void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner AccumulatorLimitSet::declare() +{ + return BaseClassDefiner(AccumulatorLimitSet::addConstructToMap, AccumulatorLimitSet::addPrimitiveAssignFnsToMap, AccumulatorLimitSet::addClassAssignFnsToMap, AccumulatorLimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorLimitSet_factory() + { + return new AccumulatorLimitSet; + } +} diff --git a/CGMES_3.0.0/AccumulatorLimitSet.hpp b/CGMES_3.0.0/AccumulatorLimitSet.hpp new file mode 100644 index 000000000..85115d80f --- /dev/null +++ b/CGMES_3.0.0/AccumulatorLimitSet.hpp @@ -0,0 +1,43 @@ +#ifndef AccumulatorLimitSet_H +#define AccumulatorLimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LimitSet.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Accumulator; + class AccumulatorLimit; + + /* + An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. + */ + class AccumulatorLimitSet : public LimitSet + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorLimitSet_factory(); +} +#endif diff --git a/CGMES_3.0.0/AccumulatorReset.cpp b/CGMES_3.0.0/AccumulatorReset.cpp new file mode 100644 index 000000000..2a11e50b8 --- /dev/null +++ b/CGMES_3.0.0/AccumulatorReset.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorReset.hpp" + +#include +#include + +#include "AccumulatorValue.hpp" + +using namespace CIMPP; + +AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {}; +AccumulatorReset::~AccumulatorReset() {}; + + + + +bool assign_AccumulatorValue_AccumulatorReset(BaseClass*, BaseClass*); +bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorReset* element = dynamic_cast(BaseClass_ptr1); + AccumulatorValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AccumulatorValue != element2) + { + element->AccumulatorValue = element2; + return assign_AccumulatorValue_AccumulatorReset(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AccumulatorReset::debugName[] = "AccumulatorReset"; +const char* AccumulatorReset::debugString() const +{ + return AccumulatorReset::debugName; +} + +void AccumulatorReset::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AccumulatorReset"), &AccumulatorReset_factory)); +} + +void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void AccumulatorReset::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AccumulatorReset.AccumulatorValue"), &assign_AccumulatorReset_AccumulatorValue)); +} + +const BaseClassDefiner AccumulatorReset::declare() +{ + return BaseClassDefiner(AccumulatorReset::addConstructToMap, AccumulatorReset::addPrimitiveAssignFnsToMap, AccumulatorReset::addClassAssignFnsToMap, AccumulatorReset::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorReset_factory() + { + return new AccumulatorReset; + } +} diff --git a/CGMES_3.0.0/AccumulatorReset.hpp b/CGMES_3.0.0/AccumulatorReset.hpp new file mode 100644 index 000000000..84f09fcc1 --- /dev/null +++ b/CGMES_3.0.0/AccumulatorReset.hpp @@ -0,0 +1,41 @@ +#ifndef AccumulatorReset_H +#define AccumulatorReset_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Control.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AccumulatorValue; + + /* + This command resets the counter value to zero. + */ + class AccumulatorReset : public Control + { + public: + /* constructor initialising all attributes to null */ + AccumulatorReset(); + ~AccumulatorReset() override; + + CIMPP::AccumulatorValue* AccumulatorValue; /* The accumulator value that is reset by the command. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorReset_factory(); +} +#endif diff --git a/CGMES_3.0.0/AccumulatorValue.cpp b/CGMES_3.0.0/AccumulatorValue.cpp new file mode 100644 index 000000000..89f762ee1 --- /dev/null +++ b/CGMES_3.0.0/AccumulatorValue.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AccumulatorValue.hpp" + +#include +#include + +#include "Accumulator.hpp" +#include "AccumulatorReset.hpp" + +using namespace CIMPP; + +AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {}; +AccumulatorValue::~AccumulatorValue() {}; + + + + + +bool assign_Accumulator_AccumulatorValues(BaseClass*, BaseClass*); +bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + Accumulator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Accumulator != element2) + { + element->Accumulator = element2; + return assign_Accumulator_AccumulatorValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AccumulatorReset_AccumulatorValue(BaseClass*, BaseClass*); +bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + AccumulatorReset* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AccumulatorReset != element2) + { + element->AccumulatorReset = element2; + return assign_AccumulatorReset_AccumulatorValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AccumulatorValue::debugName[] = "AccumulatorValue"; +const char* AccumulatorValue::debugString() const +{ + return AccumulatorValue::debugName; +} + +void AccumulatorValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AccumulatorValue"), &AccumulatorValue_factory)); +} + +void AccumulatorValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner AccumulatorValue::declare() +{ + return BaseClassDefiner(AccumulatorValue::addConstructToMap, AccumulatorValue::addPrimitiveAssignFnsToMap, AccumulatorValue::addClassAssignFnsToMap, AccumulatorValue::debugName); +} + +namespace CIMPP +{ + BaseClass* AccumulatorValue_factory() + { + return new AccumulatorValue; + } +} diff --git a/CGMES_3.0.0/AccumulatorValue.hpp b/CGMES_3.0.0/AccumulatorValue.hpp new file mode 100644 index 000000000..f2d0b1488 --- /dev/null +++ b/CGMES_3.0.0/AccumulatorValue.hpp @@ -0,0 +1,43 @@ +#ifndef AccumulatorValue_H +#define AccumulatorValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Accumulator; + class AccumulatorReset; + + /* + AccumulatorValue represents an accumulated (counted) MeasurementValue. + */ + class AccumulatorValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AccumulatorValue_factory(); +} +#endif diff --git a/CGMES_3.0.0/ActivePower.cpp b/CGMES_3.0.0/ActivePower.cpp new file mode 100644 index 000000000..d6f48a52a --- /dev/null +++ b/CGMES_3.0.0/ActivePower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ActivePower& ActivePower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ActivePower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ActivePower::debugName[] = "ActivePower"; +const char* ActivePower::debugString() const +{ + return ActivePower::debugName; +} + +ActivePower& ActivePower::operator+=(const ActivePower& rhs) +{ + value += rhs.value; + return *this; +} + +ActivePower& ActivePower::operator-=(const ActivePower& rhs) +{ + value -= rhs.value; + return *this; +} + +ActivePower& ActivePower::operator*=(const ActivePower& rhs) +{ + value *= rhs.value; + return *this; +} + +ActivePower& ActivePower::operator/=(const ActivePower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ActivePower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ActivePower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/ActivePower.hpp b/CGMES_3.0.0/ActivePower.hpp new file mode 100644 index 000000000..d1a142af8 --- /dev/null +++ b/CGMES_3.0.0/ActivePower.hpp @@ -0,0 +1,39 @@ +#ifndef ActivePower_H +#define ActivePower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Product of RMS value of the voltage and the RMS value of the in-phase component of the current. + */ + class ActivePower + { + public: + ActivePower() : value(0.0), initialized(false) {} + ActivePower(long double value) : value(value), initialized(true) {} + + ActivePower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ActivePower& operator+=(const ActivePower& rhs); + ActivePower& operator-=(const ActivePower& rhs); + ActivePower& operator*=(const ActivePower& rhs); + ActivePower& operator/=(const ActivePower& rhs); + + friend std::istream& operator>>(std::istream& lop, ActivePower& rop); + friend std::ostream& operator<<(std::ostream& os, const ActivePower& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ActivePowerLimit.cpp b/CGMES_3.0.0/ActivePowerLimit.cpp new file mode 100644 index 000000000..92b2143d6 --- /dev/null +++ b/CGMES_3.0.0/ActivePowerLimit.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePowerLimit.hpp" + +#include +#include + +#include "ActivePower.hpp" +#include "ActivePower.hpp" + +using namespace CIMPP; + +ActivePowerLimit::ActivePowerLimit() {}; +ActivePowerLimit::~ActivePowerLimit() {}; + + +bool assign_ActivePowerLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ActivePowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char ActivePowerLimit::debugName[] = "ActivePowerLimit"; +const char* ActivePowerLimit::debugString() const +{ + return ActivePowerLimit::debugName; +} + +void ActivePowerLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ActivePowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ActivePowerLimit::declare() +{ + return BaseClassDefiner(ActivePowerLimit::addConstructToMap, ActivePowerLimit::addPrimitiveAssignFnsToMap, ActivePowerLimit::addClassAssignFnsToMap, ActivePowerLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* ActivePowerLimit_factory() + { + return new ActivePowerLimit; + } +} diff --git a/CGMES_3.0.0/ActivePowerLimit.hpp b/CGMES_3.0.0/ActivePowerLimit.hpp new file mode 100644 index 000000000..e3d27cd72 --- /dev/null +++ b/CGMES_3.0.0/ActivePowerLimit.hpp @@ -0,0 +1,42 @@ +#ifndef ActivePowerLimit_H +#define ActivePowerLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" + +namespace CIMPP +{ + + /* + Limit on active power flow. + */ + class ActivePowerLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ActivePowerLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/ActivePowerPerCurrentFlow.cpp b/CGMES_3.0.0/ActivePowerPerCurrentFlow.cpp new file mode 100644 index 000000000..ccc704f3a --- /dev/null +++ b/CGMES_3.0.0/ActivePowerPerCurrentFlow.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePowerPerCurrentFlow.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ActivePowerPerCurrentFlow& ActivePowerPerCurrentFlow::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ActivePowerPerCurrentFlow::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ActivePowerPerCurrentFlow::debugName[] = "ActivePowerPerCurrentFlow"; +const char* ActivePowerPerCurrentFlow::debugString() const +{ + return ActivePowerPerCurrentFlow::debugName; +} + +ActivePowerPerCurrentFlow& ActivePowerPerCurrentFlow::operator+=(const ActivePowerPerCurrentFlow& rhs) +{ + value += rhs.value; + return *this; +} + +ActivePowerPerCurrentFlow& ActivePowerPerCurrentFlow::operator-=(const ActivePowerPerCurrentFlow& rhs) +{ + value -= rhs.value; + return *this; +} + +ActivePowerPerCurrentFlow& ActivePowerPerCurrentFlow::operator*=(const ActivePowerPerCurrentFlow& rhs) +{ + value *= rhs.value; + return *this; +} + +ActivePowerPerCurrentFlow& ActivePowerPerCurrentFlow::operator/=(const ActivePowerPerCurrentFlow& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ActivePowerPerCurrentFlow& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ActivePowerPerCurrentFlow& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp b/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp new file mode 100644 index 000000000..bf8409efa --- /dev/null +++ b/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp @@ -0,0 +1,39 @@ +#ifndef ActivePowerPerCurrentFlow_H +#define ActivePowerPerCurrentFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Active power variation with current flow. + */ + class ActivePowerPerCurrentFlow + { + public: + ActivePowerPerCurrentFlow() : value(0.0), initialized(false) {} + ActivePowerPerCurrentFlow(long double value) : value(value), initialized(true) {} + + ActivePowerPerCurrentFlow& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ActivePowerPerCurrentFlow& operator+=(const ActivePowerPerCurrentFlow& rhs); + ActivePowerPerCurrentFlow& operator-=(const ActivePowerPerCurrentFlow& rhs); + ActivePowerPerCurrentFlow& operator*=(const ActivePowerPerCurrentFlow& rhs); + ActivePowerPerCurrentFlow& operator/=(const ActivePowerPerCurrentFlow& rhs); + + friend std::istream& operator>>(std::istream& lop, ActivePowerPerCurrentFlow& rop); + friend std::ostream& operator<<(std::ostream& os, const ActivePowerPerCurrentFlow& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ActivePowerPerFrequency.cpp b/CGMES_3.0.0/ActivePowerPerFrequency.cpp new file mode 100644 index 000000000..9f3064d3a --- /dev/null +++ b/CGMES_3.0.0/ActivePowerPerFrequency.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ActivePowerPerFrequency.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ActivePowerPerFrequency::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ActivePowerPerFrequency::debugName[] = "ActivePowerPerFrequency"; +const char* ActivePowerPerFrequency::debugString() const +{ + return ActivePowerPerFrequency::debugName; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator+=(const ActivePowerPerFrequency& rhs) +{ + value += rhs.value; + return *this; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator-=(const ActivePowerPerFrequency& rhs) +{ + value -= rhs.value; + return *this; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator*=(const ActivePowerPerFrequency& rhs) +{ + value *= rhs.value; + return *this; +} + +ActivePowerPerFrequency& ActivePowerPerFrequency::operator/=(const ActivePowerPerFrequency& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ActivePowerPerFrequency& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ActivePowerPerFrequency& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/ActivePowerPerFrequency.hpp b/CGMES_3.0.0/ActivePowerPerFrequency.hpp new file mode 100644 index 000000000..f8b5bd3ab --- /dev/null +++ b/CGMES_3.0.0/ActivePowerPerFrequency.hpp @@ -0,0 +1,39 @@ +#ifndef ActivePowerPerFrequency_H +#define ActivePowerPerFrequency_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Active power variation with frequency. + */ + class ActivePowerPerFrequency + { + public: + ActivePowerPerFrequency() : value(0.0), initialized(false) {} + ActivePowerPerFrequency(long double value) : value(value), initialized(true) {} + + ActivePowerPerFrequency& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ActivePowerPerFrequency& operator+=(const ActivePowerPerFrequency& rhs); + ActivePowerPerFrequency& operator-=(const ActivePowerPerFrequency& rhs); + ActivePowerPerFrequency& operator*=(const ActivePowerPerFrequency& rhs); + ActivePowerPerFrequency& operator/=(const ActivePowerPerFrequency& rhs); + + friend std::istream& operator>>(std::istream& lop, ActivePowerPerFrequency& rop); + friend std::ostream& operator<<(std::ostream& os, const ActivePowerPerFrequency& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Analog.cpp b/CGMES_3.0.0/Analog.cpp new file mode 100644 index 000000000..ed286e5f9 --- /dev/null +++ b/CGMES_3.0.0/Analog.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Analog.hpp" + +#include +#include + +#include "AnalogValue.hpp" +#include "AnalogLimitSet.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +Analog::Analog() {}; +Analog::~Analog() {}; + + + + +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) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->AnalogValues.begin(), element->AnalogValues.end(), element2) == element->AnalogValues.end()) + { + element->AnalogValues.push_back(element2); + return assign_AnalogValue_Analog(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AnalogLimitSet_Measurements(BaseClass*, BaseClass*); +bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + AnalogLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->LimitSets.begin(), element->LimitSets.end(), element2) == element->LimitSets.end()) + { + element->LimitSets.push_back(element2); + return assign_AnalogLimitSet_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char Analog::debugName[] = "Analog"; +const char* Analog::debugString() const +{ + return Analog::debugName; +} + +void Analog::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Analog::declare() +{ + return BaseClassDefiner(Analog::addConstructToMap, Analog::addPrimitiveAssignFnsToMap, Analog::addClassAssignFnsToMap, Analog::debugName); +} + +namespace CIMPP +{ + BaseClass* Analog_factory() + { + return new Analog; + } +} diff --git a/CGMES_3.0.0/Analog.hpp b/CGMES_3.0.0/Analog.hpp new file mode 100644 index 000000000..eb7ecbbef --- /dev/null +++ b/CGMES_3.0.0/Analog.hpp @@ -0,0 +1,45 @@ +#ifndef Analog_H +#define Analog_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class AnalogLimitSet; + class AnalogValue; + + /* + Analog represents an analog Measurement. + */ + class Analog : public Measurement + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Analog_factory(); +} +#endif diff --git a/CGMES_3.0.0/AnalogControl.cpp b/CGMES_3.0.0/AnalogControl.cpp new file mode 100644 index 000000000..742081a10 --- /dev/null +++ b/CGMES_3.0.0/AnalogControl.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogControl.hpp" + +#include +#include + +#include "AnalogValue.hpp" +#include "Float.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +AnalogControl::AnalogControl() : AnalogValue(nullptr) {}; +AnalogControl::~AnalogControl() {}; + + + +bool assign_AnalogControl_maxValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AnalogControl_minValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); +bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AnalogValue != element2) + { + element->AnalogValue = element2; + return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char AnalogControl::debugName[] = "AnalogControl"; +const char* AnalogControl::debugString() const +{ + return AnalogControl::debugName; +} + +void AnalogControl::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AnalogControl::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AnalogControl.AnalogValue"), &assign_AnalogControl_AnalogValue)); +} + +const BaseClassDefiner AnalogControl::declare() +{ + return BaseClassDefiner(AnalogControl::addConstructToMap, AnalogControl::addPrimitiveAssignFnsToMap, AnalogControl::addClassAssignFnsToMap, AnalogControl::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogControl_factory() + { + return new AnalogControl; + } +} diff --git a/CGMES_3.0.0/AnalogControl.hpp b/CGMES_3.0.0/AnalogControl.hpp new file mode 100644 index 000000000..12c4cbed6 --- /dev/null +++ b/CGMES_3.0.0/AnalogControl.hpp @@ -0,0 +1,44 @@ +#ifndef AnalogControl_H +#define AnalogControl_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Control.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + class AnalogValue; + + /* + An analog control used for supervisory control. + */ + class AnalogControl : public Control + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogControl_factory(); +} +#endif diff --git a/CGMES_3.0.0/AnalogLimit.cpp b/CGMES_3.0.0/AnalogLimit.cpp new file mode 100644 index 000000000..4f9582757 --- /dev/null +++ b/CGMES_3.0.0/AnalogLimit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogLimit.hpp" + +#include +#include + +#include "AnalogLimitSet.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +AnalogLimit::AnalogLimit() : LimitSet(nullptr) {}; +AnalogLimit::~AnalogLimit() {}; + + + +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) +{ + AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + AnalogLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LimitSet != element2) + { + element->LimitSet = element2; + return assign_AnalogLimitSet_Limits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AnalogLimit::debugName[] = "AnalogLimit"; +const char* AnalogLimit::debugString() const +{ + return AnalogLimit::debugName; +} + +void AnalogLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AnalogLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.LimitSet"), &assign_AnalogLimit_LimitSet)); +} + +const BaseClassDefiner AnalogLimit::declare() +{ + return BaseClassDefiner(AnalogLimit::addConstructToMap, AnalogLimit::addPrimitiveAssignFnsToMap, AnalogLimit::addClassAssignFnsToMap, AnalogLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogLimit_factory() + { + return new AnalogLimit; + } +} diff --git a/CGMES_3.0.0/AnalogLimit.hpp b/CGMES_3.0.0/AnalogLimit.hpp new file mode 100644 index 000000000..226b924fc --- /dev/null +++ b/CGMES_3.0.0/AnalogLimit.hpp @@ -0,0 +1,43 @@ +#ifndef AnalogLimit_H +#define AnalogLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Limit.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + class AnalogLimitSet; + + /* + Limit values for Analog measurements. + */ + class AnalogLimit : public Limit + { + public: + /* constructor initialising all attributes to null */ + AnalogLimit(); + ~AnalogLimit() override; + + CIMPP::AnalogLimitSet* LimitSet; /* The set of limits. Default: 0 */ + CIMPP::Float value; /* The value to supervise against. Default: 0.0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/AnalogLimitSet.cpp b/CGMES_3.0.0/AnalogLimitSet.cpp new file mode 100644 index 000000000..242bdb236 --- /dev/null +++ b/CGMES_3.0.0/AnalogLimitSet.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogLimitSet.hpp" + +#include +#include + +#include "AnalogLimit.hpp" +#include "Analog.hpp" + +using namespace CIMPP; + +AnalogLimitSet::AnalogLimitSet() {}; +AnalogLimitSet::~AnalogLimitSet() {}; + + + + + +bool assign_AnalogLimit_LimitSet(BaseClass*, BaseClass*); +bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + AnalogLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Limits.begin(), element->Limits.end(), element2) == element->Limits.end()) + { + element->Limits.push_back(element2); + return assign_AnalogLimit_LimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Analog_LimitSets(BaseClass*, BaseClass*); +bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + Analog* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Analog_LimitSets(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AnalogLimitSet::debugName[] = "AnalogLimitSet"; +const char* AnalogLimitSet::debugString() const +{ + return AnalogLimitSet::debugName; +} + +void AnalogLimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AnalogLimitSet"), &AnalogLimitSet_factory)); +} + +void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner AnalogLimitSet::declare() +{ + return BaseClassDefiner(AnalogLimitSet::addConstructToMap, AnalogLimitSet::addPrimitiveAssignFnsToMap, AnalogLimitSet::addClassAssignFnsToMap, AnalogLimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogLimitSet_factory() + { + return new AnalogLimitSet; + } +} diff --git a/CGMES_3.0.0/AnalogLimitSet.hpp b/CGMES_3.0.0/AnalogLimitSet.hpp new file mode 100644 index 000000000..433b2492a --- /dev/null +++ b/CGMES_3.0.0/AnalogLimitSet.hpp @@ -0,0 +1,43 @@ +#ifndef AnalogLimitSet_H +#define AnalogLimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LimitSet.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Analog; + class AnalogLimit; + + /* + An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. + */ + class AnalogLimitSet : public LimitSet + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogLimitSet_factory(); +} +#endif diff --git a/CGMES_3.0.0/AnalogValue.cpp b/CGMES_3.0.0/AnalogValue.cpp new file mode 100644 index 000000000..d12d81640 --- /dev/null +++ b/CGMES_3.0.0/AnalogValue.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AnalogValue.hpp" + +#include +#include + +#include "Analog.hpp" +#include "AnalogControl.hpp" + +using namespace CIMPP; + +AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {}; +AnalogValue::~AnalogValue() {}; + + + + + +bool assign_Analog_AnalogValues(BaseClass*, BaseClass*); +bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + Analog* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Analog != element2) + { + element->Analog = element2; + return assign_Analog_AnalogValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_AnalogControl_AnalogValue(BaseClass*, BaseClass*); +bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + AnalogControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AnalogControl != element2) + { + element->AnalogControl = element2; + return assign_AnalogControl_AnalogValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AnalogValue::debugName[] = "AnalogValue"; +const char* AnalogValue::debugString() const +{ + return AnalogValue::debugName; +} + +void AnalogValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AnalogValue"), &AnalogValue_factory)); +} + +void AnalogValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner AnalogValue::declare() +{ + return BaseClassDefiner(AnalogValue::addConstructToMap, AnalogValue::addPrimitiveAssignFnsToMap, AnalogValue::addClassAssignFnsToMap, AnalogValue::debugName); +} + +namespace CIMPP +{ + BaseClass* AnalogValue_factory() + { + return new AnalogValue; + } +} diff --git a/CGMES_3.0.0/AnalogValue.hpp b/CGMES_3.0.0/AnalogValue.hpp new file mode 100644 index 000000000..892ec92dd --- /dev/null +++ b/CGMES_3.0.0/AnalogValue.hpp @@ -0,0 +1,43 @@ +#ifndef AnalogValue_H +#define AnalogValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Analog; + class AnalogControl; + + /* + AnalogValue represents an analog MeasurementValue. + */ + class AnalogValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AnalogValue_factory(); +} +#endif diff --git a/CGMES_3.0.0/AngleDegrees.cpp b/CGMES_3.0.0/AngleDegrees.cpp new file mode 100644 index 000000000..01475444f --- /dev/null +++ b/CGMES_3.0.0/AngleDegrees.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AngleDegrees.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +AngleDegrees& AngleDegrees::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +AngleDegrees::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char AngleDegrees::debugName[] = "AngleDegrees"; +const char* AngleDegrees::debugString() const +{ + return AngleDegrees::debugName; +} + +AngleDegrees& AngleDegrees::operator+=(const AngleDegrees& rhs) +{ + value += rhs.value; + return *this; +} + +AngleDegrees& AngleDegrees::operator-=(const AngleDegrees& rhs) +{ + value -= rhs.value; + return *this; +} + +AngleDegrees& AngleDegrees::operator*=(const AngleDegrees& rhs) +{ + value *= rhs.value; + return *this; +} + +AngleDegrees& AngleDegrees::operator/=(const AngleDegrees& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, AngleDegrees& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const AngleDegrees& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/AngleDegrees.hpp b/CGMES_3.0.0/AngleDegrees.hpp new file mode 100644 index 000000000..39204363b --- /dev/null +++ b/CGMES_3.0.0/AngleDegrees.hpp @@ -0,0 +1,39 @@ +#ifndef AngleDegrees_H +#define AngleDegrees_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Measurement of angle in degrees. + */ + class AngleDegrees + { + public: + AngleDegrees() : value(0.0), initialized(false) {} + AngleDegrees(long double value) : value(value), initialized(true) {} + + AngleDegrees& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + AngleDegrees& operator+=(const AngleDegrees& rhs); + AngleDegrees& operator-=(const AngleDegrees& rhs); + AngleDegrees& operator*=(const AngleDegrees& rhs); + AngleDegrees& operator/=(const AngleDegrees& rhs); + + friend std::istream& operator>>(std::istream& lop, AngleDegrees& rop); + friend std::ostream& operator<<(std::ostream& os, const AngleDegrees& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/AngleRadians.cpp b/CGMES_3.0.0/AngleRadians.cpp new file mode 100644 index 000000000..bd1b77dbb --- /dev/null +++ b/CGMES_3.0.0/AngleRadians.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AngleRadians.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +AngleRadians& AngleRadians::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +AngleRadians::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char AngleRadians::debugName[] = "AngleRadians"; +const char* AngleRadians::debugString() const +{ + return AngleRadians::debugName; +} + +AngleRadians& AngleRadians::operator+=(const AngleRadians& rhs) +{ + value += rhs.value; + return *this; +} + +AngleRadians& AngleRadians::operator-=(const AngleRadians& rhs) +{ + value -= rhs.value; + return *this; +} + +AngleRadians& AngleRadians::operator*=(const AngleRadians& rhs) +{ + value *= rhs.value; + return *this; +} + +AngleRadians& AngleRadians::operator/=(const AngleRadians& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, AngleRadians& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const AngleRadians& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/AngleRadians.hpp b/CGMES_3.0.0/AngleRadians.hpp new file mode 100644 index 000000000..2ac29ff28 --- /dev/null +++ b/CGMES_3.0.0/AngleRadians.hpp @@ -0,0 +1,39 @@ +#ifndef AngleRadians_H +#define AngleRadians_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Phase angle in radians. + */ + class AngleRadians + { + public: + AngleRadians() : value(0.0), initialized(false) {} + AngleRadians(long double value) : value(value), initialized(true) {} + + AngleRadians& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + AngleRadians& operator+=(const AngleRadians& rhs); + AngleRadians& operator-=(const AngleRadians& rhs); + AngleRadians& operator*=(const AngleRadians& rhs); + AngleRadians& operator/=(const AngleRadians& rhs); + + friend std::istream& operator>>(std::istream& lop, AngleRadians& rop); + friend std::ostream& operator<<(std::ostream& os, const AngleRadians& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ApparentPower.cpp b/CGMES_3.0.0/ApparentPower.cpp new file mode 100644 index 000000000..0b8976a61 --- /dev/null +++ b/CGMES_3.0.0/ApparentPower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ApparentPower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ApparentPower& ApparentPower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ApparentPower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ApparentPower::debugName[] = "ApparentPower"; +const char* ApparentPower::debugString() const +{ + return ApparentPower::debugName; +} + +ApparentPower& ApparentPower::operator+=(const ApparentPower& rhs) +{ + value += rhs.value; + return *this; +} + +ApparentPower& ApparentPower::operator-=(const ApparentPower& rhs) +{ + value -= rhs.value; + return *this; +} + +ApparentPower& ApparentPower::operator*=(const ApparentPower& rhs) +{ + value *= rhs.value; + return *this; +} + +ApparentPower& ApparentPower::operator/=(const ApparentPower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ApparentPower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ApparentPower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/ApparentPower.hpp b/CGMES_3.0.0/ApparentPower.hpp new file mode 100644 index 000000000..bcb8201e6 --- /dev/null +++ b/CGMES_3.0.0/ApparentPower.hpp @@ -0,0 +1,39 @@ +#ifndef ApparentPower_H +#define ApparentPower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Product of the RMS value of the voltage and the RMS value of the current. + */ + class ApparentPower + { + public: + ApparentPower() : value(0.0), initialized(false) {} + ApparentPower(long double value) : value(value), initialized(true) {} + + ApparentPower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ApparentPower& operator+=(const ApparentPower& rhs); + ApparentPower& operator-=(const ApparentPower& rhs); + ApparentPower& operator*=(const ApparentPower& rhs); + ApparentPower& operator/=(const ApparentPower& rhs); + + friend std::istream& operator>>(std::istream& lop, ApparentPower& rop); + friend std::ostream& operator<<(std::ostream& os, const ApparentPower& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ApparentPowerLimit.cpp b/CGMES_3.0.0/ApparentPowerLimit.cpp new file mode 100644 index 000000000..09b4337f6 --- /dev/null +++ b/CGMES_3.0.0/ApparentPowerLimit.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ApparentPowerLimit.hpp" + +#include +#include + +#include "ApparentPower.hpp" +#include "ApparentPower.hpp" + +using namespace CIMPP; + +ApparentPowerLimit::ApparentPowerLimit() {}; +ApparentPowerLimit::~ApparentPowerLimit() {}; + + +bool assign_ApparentPowerLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ApparentPowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char ApparentPowerLimit::debugName[] = "ApparentPowerLimit"; +const char* ApparentPowerLimit::debugString() const +{ + return ApparentPowerLimit::debugName; +} + +void ApparentPowerLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ApparentPowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ApparentPowerLimit::declare() +{ + return BaseClassDefiner(ApparentPowerLimit::addConstructToMap, ApparentPowerLimit::addPrimitiveAssignFnsToMap, ApparentPowerLimit::addClassAssignFnsToMap, ApparentPowerLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* ApparentPowerLimit_factory() + { + return new ApparentPowerLimit; + } +} diff --git a/CGMES_3.0.0/ApparentPowerLimit.hpp b/CGMES_3.0.0/ApparentPowerLimit.hpp new file mode 100644 index 000000000..e4c81af58 --- /dev/null +++ b/CGMES_3.0.0/ApparentPowerLimit.hpp @@ -0,0 +1,42 @@ +#ifndef ApparentPowerLimit_H +#define ApparentPowerLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "ApparentPower.hpp" + +namespace CIMPP +{ + + /* + Apparent power limit. + */ + class ApparentPowerLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ApparentPowerLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/Area.cpp b/CGMES_3.0.0/Area.cpp new file mode 100644 index 000000000..4a7457802 --- /dev/null +++ b/CGMES_3.0.0/Area.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Area.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Area& Area::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Area::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Area::debugName[] = "Area"; +const char* Area::debugString() const +{ + return Area::debugName; +} + +Area& Area::operator+=(const Area& rhs) +{ + value += rhs.value; + return *this; +} + +Area& Area::operator-=(const Area& rhs) +{ + value -= rhs.value; + return *this; +} + +Area& Area::operator*=(const Area& rhs) +{ + value *= rhs.value; + return *this; +} + +Area& Area::operator/=(const Area& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Area& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Area& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Area.hpp b/CGMES_3.0.0/Area.hpp new file mode 100644 index 000000000..681c909b6 --- /dev/null +++ b/CGMES_3.0.0/Area.hpp @@ -0,0 +1,39 @@ +#ifndef Area_H +#define Area_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Area. + */ + class Area + { + public: + Area() : value(0.0), initialized(false) {} + Area(long double value) : value(value), initialized(true) {} + + Area& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Area& operator+=(const Area& rhs); + Area& operator-=(const Area& rhs); + Area& operator*=(const Area& rhs); + Area& operator/=(const Area& rhs); + + friend std::istream& operator>>(std::istream& lop, Area& rop); + friend std::ostream& operator<<(std::ostream& os, const Area& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/AsynchronousMachine.cpp b/CGMES_3.0.0/AsynchronousMachine.cpp new file mode 100644 index 000000000..47582731a --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachine.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachine.hpp" + +#include +#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() {}; + + + +bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->asynchronousMachineType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_converterFedDrive(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->converterFedDrive; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_efficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efficiency; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_iaIrRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iaIrRatio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_nominalFrequency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalFrequency; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_nominalSpeed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalSpeed; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_polePairNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->polePairNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedMechanicalPower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_reversible(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->reversible; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rxLockedRotorRatio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + +const char AsynchronousMachine::debugName[] = "AsynchronousMachine"; +const char* AsynchronousMachine::debugString() const +{ + return AsynchronousMachine::debugName; +} + +void AsynchronousMachine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.AsynchronousMachineDynamics"), &assign_AsynchronousMachine_AsynchronousMachineDynamics)); +} + +const BaseClassDefiner AsynchronousMachine::declare() +{ + return BaseClassDefiner(AsynchronousMachine::addConstructToMap, AsynchronousMachine::addPrimitiveAssignFnsToMap, AsynchronousMachine::addClassAssignFnsToMap, AsynchronousMachine::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachine_factory() + { + return new AsynchronousMachine; + } +} diff --git a/CGMES_3.0.0/AsynchronousMachine.hpp b/CGMES_3.0.0/AsynchronousMachine.hpp new file mode 100644 index 000000000..fd5178665 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachine.hpp @@ -0,0 +1,59 @@ +#ifndef AsynchronousMachine_H +#define AsynchronousMachine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachine.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "AsynchronousMachineKind.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "Integer.hpp" +#include "PerCent.hpp" +#include "RotationSpeed.hpp" + +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. + */ + class AsynchronousMachine : public RotatingMachine + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachine_factory(); +} +#endif diff --git a/CGMES_3.0.0/AsynchronousMachineDynamics.cpp b/CGMES_3.0.0/AsynchronousMachineDynamics.cpp new file mode 100644 index 000000000..f811c69f4 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineDynamics.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineDynamics.hpp" + +#include +#include + +#include "AsynchronousMachine.hpp" +#include "MechanicalLoadDynamics.hpp" +#include "TurbineGovernorDynamics.hpp" +#include "WindTurbineType1or2Dynamics.hpp" + +using namespace CIMPP; + +AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {}; +AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {}; + + + + + + + +bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachine != element2) + { + element->AsynchronousMachine = element2; + return assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + MechanicalLoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MechanicalLoadDynamics != element2) + { + element->MechanicalLoadDynamics = element2; + return assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineGovernorDynamics != element2) + { + element->TurbineGovernorDynamics = element2; + return assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2Dynamics != element2) + { + element->WindTurbineType1or2Dynamics = element2; + return assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AsynchronousMachineDynamics::debugName[] = "AsynchronousMachineDynamics"; +const char* AsynchronousMachineDynamics::debugString() const +{ + return AsynchronousMachineDynamics::debugName; +} + +void AsynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics"), &AsynchronousMachineDynamics_factory)); +} + +void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner AsynchronousMachineDynamics::declare() +{ + return BaseClassDefiner(AsynchronousMachineDynamics::addConstructToMap, AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap, AsynchronousMachineDynamics::addClassAssignFnsToMap, AsynchronousMachineDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineDynamics_factory() + { + return new AsynchronousMachineDynamics; + } +} diff --git a/CGMES_3.0.0/AsynchronousMachineDynamics.hpp b/CGMES_3.0.0/AsynchronousMachineDynamics.hpp new file mode 100644 index 000000000..c70a820f3 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineDynamics.hpp @@ -0,0 +1,47 @@ +#ifndef AsynchronousMachineDynamics_H +#define AsynchronousMachineDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AsynchronousMachine; + class MechanicalLoadDynamics; + 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.
+ */ + class AsynchronousMachineDynamics : public RotatingMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp new file mode 100644 index 000000000..b9fb954b4 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineEquivalentCircuit.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {}; +AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {}; + + +bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xlr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xlr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char AsynchronousMachineEquivalentCircuit::debugName[] = "AsynchronousMachineEquivalentCircuit"; +const char* AsynchronousMachineEquivalentCircuit::debugString() const +{ + return AsynchronousMachineEquivalentCircuit::debugName; +} + +void AsynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner AsynchronousMachineEquivalentCircuit::declare() +{ + return BaseClassDefiner(AsynchronousMachineEquivalentCircuit::addConstructToMap, AsynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap, AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap, AsynchronousMachineEquivalentCircuit::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineEquivalentCircuit_factory() + { + return new AsynchronousMachineEquivalentCircuit; + } +} diff --git a/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp new file mode 100644 index 000000000..1711ab460 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp @@ -0,0 +1,45 @@ +#ifndef AsynchronousMachineEquivalentCircuit_H +#define AsynchronousMachineEquivalentCircuit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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). + */ + class AsynchronousMachineEquivalentCircuit : public AsynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineEquivalentCircuit_factory(); +} +#endif diff --git a/CGMES_3.0.0/AsynchronousMachineKind.cpp b/CGMES_3.0.0/AsynchronousMachineKind.cpp new file mode 100644 index 000000000..d9b39ecb0 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +AsynchronousMachineKind& AsynchronousMachineKind::operator=(AsynchronousMachineKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +AsynchronousMachineKind::operator AsynchronousMachineKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char AsynchronousMachineKind::debugName[] = "AsynchronousMachineKind"; +const char* AsynchronousMachineKind::debugString() const +{ + return AsynchronousMachineKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, AsynchronousMachineKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = AsynchronousMachineKind::generator; + return lop; + } + if(EnumSymbol == "motor") + { + rop = AsynchronousMachineKind::motor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const AsynchronousMachineKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == AsynchronousMachineKind::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == AsynchronousMachineKind::motor) + { + EnumSymbol = "motor"; + } + + if (!EnumSymbol.empty()) + { + os << "AsynchronousMachineKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/AsynchronousMachineKind.hpp b/CGMES_3.0.0/AsynchronousMachineKind.hpp new file mode 100644 index 000000000..8b8e54e57 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineKind.hpp @@ -0,0 +1,46 @@ +#ifndef AsynchronousMachineKind_H +#define AsynchronousMachineKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Kind of Asynchronous Machine. + */ + class AsynchronousMachineKind + { + public: + enum AsynchronousMachineKind_ENUM + { + /** + * The Asynchronous Machine is a generator. + */ + generator, + /** + * The Asynchronous Machine is a motor. + */ + motor, + }; + + AsynchronousMachineKind() : value(), initialized(false) {} + AsynchronousMachineKind(AsynchronousMachineKind_ENUM value) : value(value), initialized(true) {} + + AsynchronousMachineKind& operator=(AsynchronousMachineKind_ENUM rop); + operator AsynchronousMachineKind_ENUM() const; + + AsynchronousMachineKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, AsynchronousMachineKind& rop); + friend std::ostream& operator<<(std::ostream& os, const AsynchronousMachineKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp new file mode 100644 index 000000000..94ba0f056 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineTimeConstantReactance.hpp" + +#include +#include + +#include "Seconds.hpp" +#include "Seconds.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {}; +AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {}; + + +bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char AsynchronousMachineTimeConstantReactance::debugName[] = "AsynchronousMachineTimeConstantReactance"; +const char* AsynchronousMachineTimeConstantReactance::debugString() const +{ + return AsynchronousMachineTimeConstantReactance::debugName; +} + +void AsynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner AsynchronousMachineTimeConstantReactance::declare() +{ + return BaseClassDefiner(AsynchronousMachineTimeConstantReactance::addConstructToMap, AsynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap, AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap, AsynchronousMachineTimeConstantReactance::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineTimeConstantReactance_factory() + { + return new AsynchronousMachineTimeConstantReactance; + } +} diff --git a/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp new file mode 100644 index 000000000..a25548336 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp @@ -0,0 +1,46 @@ +#ifndef AsynchronousMachineTimeConstantReactance_H +#define AsynchronousMachineTimeConstantReactance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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). + */ + class AsynchronousMachineTimeConstantReactance : public AsynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineTimeConstantReactance_factory(); +} +#endif diff --git a/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp b/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp new file mode 100644 index 000000000..d156c07b9 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AsynchronousMachineUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {}; +AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {}; + + + +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) +{ + AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char AsynchronousMachineUserDefined::debugName[] = "AsynchronousMachineUserDefined"; +const char* AsynchronousMachineUserDefined::debugString() const +{ + return AsynchronousMachineUserDefined::debugName; +} + +void AsynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void AsynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner AsynchronousMachineUserDefined::declare() +{ + return BaseClassDefiner(AsynchronousMachineUserDefined::addConstructToMap, AsynchronousMachineUserDefined::addPrimitiveAssignFnsToMap, AsynchronousMachineUserDefined::addClassAssignFnsToMap, AsynchronousMachineUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* AsynchronousMachineUserDefined_factory() + { + return new AsynchronousMachineUserDefined; + } +} diff --git a/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp b/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp new file mode 100644 index 000000000..14a2bdfa2 --- /dev/null +++ b/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef AsynchronousMachineUserDefined_H +#define AsynchronousMachineUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Asynchronous machine whose dynamic behaviour is described by a user-defined model. + */ + class AsynchronousMachineUserDefined : public AsynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AsynchronousMachineUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/AuxiliaryEquipment.cpp b/CGMES_3.0.0/AuxiliaryEquipment.cpp new file mode 100644 index 000000000..19ff0f0fa --- /dev/null +++ b/CGMES_3.0.0/AuxiliaryEquipment.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "AuxiliaryEquipment.hpp" + +#include +#include + +#include "Terminal.hpp" + +using namespace CIMPP; + +AuxiliaryEquipment::AuxiliaryEquipment() : Terminal(nullptr) {}; +AuxiliaryEquipment::~AuxiliaryEquipment() {}; + + + + +bool assign_Terminal_AuxiliaryEquipment(BaseClass*, BaseClass*); +bool assign_AuxiliaryEquipment_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AuxiliaryEquipment* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_AuxiliaryEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char AuxiliaryEquipment::debugName[] = "AuxiliaryEquipment"; +const char* AuxiliaryEquipment::debugString() const +{ + return AuxiliaryEquipment::debugName; +} + +void AuxiliaryEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:AuxiliaryEquipment"), &AuxiliaryEquipment_factory)); +} + +void AuxiliaryEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void AuxiliaryEquipment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:AuxiliaryEquipment.Terminal"), &assign_AuxiliaryEquipment_Terminal)); +} + +const BaseClassDefiner AuxiliaryEquipment::declare() +{ + return BaseClassDefiner(AuxiliaryEquipment::addConstructToMap, AuxiliaryEquipment::addPrimitiveAssignFnsToMap, AuxiliaryEquipment::addClassAssignFnsToMap, AuxiliaryEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* AuxiliaryEquipment_factory() + { + return new AuxiliaryEquipment; + } +} diff --git a/CGMES_3.0.0/AuxiliaryEquipment.hpp b/CGMES_3.0.0/AuxiliaryEquipment.hpp new file mode 100644 index 000000000..582832269 --- /dev/null +++ b/CGMES_3.0.0/AuxiliaryEquipment.hpp @@ -0,0 +1,41 @@ +#ifndef AuxiliaryEquipment_H +#define AuxiliaryEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class AuxiliaryEquipment : public Equipment + { + public: + /* constructor initialising all attributes to null */ + AuxiliaryEquipment(); + ~AuxiliaryEquipment() override; + + CIMPP::Terminal* Terminal; /* The Terminal at the equipment where the AuxiliaryEquipment is attached. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* AuxiliaryEquipment_factory(); +} +#endif diff --git a/CGMES_3.0.0/BaseVoltage.cpp b/CGMES_3.0.0/BaseVoltage.cpp new file mode 100644 index 000000000..606b000c3 --- /dev/null +++ b/CGMES_3.0.0/BaseVoltage.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BaseVoltage.hpp" + +#include +#include + +#include "ConductingEquipment.hpp" +#include "TopologicalNode.hpp" +#include "TransformerEnd.hpp" +#include "VoltageLevel.hpp" +#include "Voltage.hpp" + +using namespace CIMPP; + +BaseVoltage::BaseVoltage() {}; +BaseVoltage::~BaseVoltage() {}; + + + + + + +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) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + ConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConductingEquipment.begin(), element->ConductingEquipment.end(), element2) == element->ConductingEquipment.end()) + { + element->ConductingEquipment.push_back(element2); + return assign_ConductingEquipment_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_BaseVoltage(BaseClass*, BaseClass*); +bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNode.begin(), element->TopologicalNode.end(), element2) == element->TopologicalNode.end()) + { + element->TopologicalNode.push_back(element2); + return assign_TopologicalNode_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TransformerEnd_BaseVoltage(BaseClass*, BaseClass*); +bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TransformerEnds.begin(), element->TransformerEnds.end(), element2) == element->TransformerEnds.end()) + { + element->TransformerEnds.push_back(element2); + return assign_TransformerEnd_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageLevel_BaseVoltage(BaseClass*, BaseClass*); +bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + VoltageLevel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VoltageLevel.begin(), element->VoltageLevel.end(), element2) == element->VoltageLevel.end()) + { + element->VoltageLevel.push_back(element2); + return assign_VoltageLevel_BaseVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char BaseVoltage::debugName[] = "BaseVoltage"; +const char* BaseVoltage::debugString() const +{ + return BaseVoltage::debugName; +} + +void BaseVoltage::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner BaseVoltage::declare() +{ + return BaseClassDefiner(BaseVoltage::addConstructToMap, BaseVoltage::addPrimitiveAssignFnsToMap, BaseVoltage::addClassAssignFnsToMap, BaseVoltage::debugName); +} + +namespace CIMPP +{ + BaseClass* BaseVoltage_factory() + { + return new BaseVoltage; + } +} diff --git a/CGMES_3.0.0/BaseVoltage.hpp b/CGMES_3.0.0/BaseVoltage.hpp new file mode 100644 index 000000000..05c20f476 --- /dev/null +++ b/CGMES_3.0.0/BaseVoltage.hpp @@ -0,0 +1,49 @@ +#ifndef BaseVoltage_H +#define BaseVoltage_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class ConductingEquipment; + class TopologicalNode; + class TransformerEnd; + class VoltageLevel; + + /* + Defines a system base voltage which is referenced. + */ + class BaseVoltage : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BaseVoltage_factory(); +} +#endif diff --git a/CGMES_3.0.0/BasicIntervalSchedule.cpp b/CGMES_3.0.0/BasicIntervalSchedule.cpp new file mode 100644 index 000000000..a860a0268 --- /dev/null +++ b/CGMES_3.0.0/BasicIntervalSchedule.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BasicIntervalSchedule.hpp" + +#include +#include + +#include "DateTime.hpp" +#include "UnitSymbol.hpp" +#include "UnitSymbol.hpp" + +using namespace CIMPP; + +BasicIntervalSchedule::BasicIntervalSchedule() {}; +BasicIntervalSchedule::~BasicIntervalSchedule() {}; + + +bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + element->startTime = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BasicIntervalSchedule_value1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value1Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BasicIntervalSchedule_value2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value2Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char BasicIntervalSchedule::debugName[] = "BasicIntervalSchedule"; +const char* BasicIntervalSchedule::debugString() const +{ + return BasicIntervalSchedule::debugName; +} + +void BasicIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void BasicIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner BasicIntervalSchedule::declare() +{ + return BaseClassDefiner(BasicIntervalSchedule::addConstructToMap, BasicIntervalSchedule::addPrimitiveAssignFnsToMap, BasicIntervalSchedule::addClassAssignFnsToMap, BasicIntervalSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* BasicIntervalSchedule_factory() + { + return new BasicIntervalSchedule; + } +} diff --git a/CGMES_3.0.0/BasicIntervalSchedule.hpp b/CGMES_3.0.0/BasicIntervalSchedule.hpp new file mode 100644 index 000000000..ceb2b0597 --- /dev/null +++ b/CGMES_3.0.0/BasicIntervalSchedule.hpp @@ -0,0 +1,44 @@ +#ifndef BasicIntervalSchedule_H +#define BasicIntervalSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "UnitSymbol.hpp" + +namespace CIMPP +{ + + /* + Schedule of values at points in time. + */ + class BasicIntervalSchedule : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BasicIntervalSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/BatteryStateKind.cpp b/CGMES_3.0.0/BatteryStateKind.cpp new file mode 100644 index 000000000..2ec96ea87 --- /dev/null +++ b/CGMES_3.0.0/BatteryStateKind.cpp @@ -0,0 +1,117 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BatteryStateKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +BatteryStateKind& BatteryStateKind::operator=(BatteryStateKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +BatteryStateKind::operator BatteryStateKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char BatteryStateKind::debugName[] = "BatteryStateKind"; +const char* BatteryStateKind::debugString() const +{ + return BatteryStateKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, BatteryStateKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "BatteryStateKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "discharging") + { + rop = BatteryStateKind::discharging; + return lop; + } + if(EnumSymbol == "full") + { + rop = BatteryStateKind::full; + return lop; + } + if(EnumSymbol == "waiting") + { + rop = BatteryStateKind::waiting; + return lop; + } + if(EnumSymbol == "charging") + { + rop = BatteryStateKind::charging; + return lop; + } + if(EnumSymbol == "empty") + { + rop = BatteryStateKind::empty; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const BatteryStateKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == BatteryStateKind::discharging) + { + EnumSymbol = "discharging"; + } + if (obj.value == BatteryStateKind::full) + { + EnumSymbol = "full"; + } + if (obj.value == BatteryStateKind::waiting) + { + EnumSymbol = "waiting"; + } + if (obj.value == BatteryStateKind::charging) + { + EnumSymbol = "charging"; + } + if (obj.value == BatteryStateKind::empty) + { + EnumSymbol = "empty"; + } + + if (!EnumSymbol.empty()) + { + os << "BatteryStateKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/BatteryStateKind.hpp b/CGMES_3.0.0/BatteryStateKind.hpp new file mode 100644 index 000000000..ba3f22d4f --- /dev/null +++ b/CGMES_3.0.0/BatteryStateKind.hpp @@ -0,0 +1,58 @@ +#ifndef BatteryStateKind_H +#define BatteryStateKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The state of the battery unit. + */ + class BatteryStateKind + { + public: + enum BatteryStateKind_ENUM + { + /** + * Stored energy is decreasing. + */ + discharging, + /** + * Unable to charge, and not discharging. + */ + full, + /** + * Neither charging nor discharging, but able to do so. + */ + waiting, + /** + * Stored energy is increasing. + */ + charging, + /** + * Unable to discharge, and not charging. + */ + empty, + }; + + BatteryStateKind() : value(), initialized(false) {} + BatteryStateKind(BatteryStateKind_ENUM value) : value(value), initialized(true) {} + + BatteryStateKind& operator=(BatteryStateKind_ENUM rop); + operator BatteryStateKind_ENUM() const; + + BatteryStateKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, BatteryStateKind& rop); + friend std::ostream& operator<<(std::ostream& os, const BatteryStateKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/BatteryUnit.cpp b/CGMES_3.0.0/BatteryUnit.cpp new file mode 100644 index 000000000..af4ec7534 --- /dev/null +++ b/CGMES_3.0.0/BatteryUnit.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BatteryUnit.hpp" + +#include +#include + +#include "BatteryStateKind.hpp" +#include "RealEnergy.hpp" +#include "RealEnergy.hpp" + +using namespace CIMPP; + +BatteryUnit::BatteryUnit() {}; +BatteryUnit::~BatteryUnit() {}; + + +bool assign_BatteryUnit_batteryState(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->batteryState; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BatteryUnit_ratedE(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedE; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BatteryUnit_storedE(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->storedE; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char BatteryUnit::debugName[] = "BatteryUnit"; +const char* BatteryUnit::debugString() const +{ + return BatteryUnit::debugName; +} + +void BatteryUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void BatteryUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner BatteryUnit::declare() +{ + return BaseClassDefiner(BatteryUnit::addConstructToMap, BatteryUnit::addPrimitiveAssignFnsToMap, BatteryUnit::addClassAssignFnsToMap, BatteryUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* BatteryUnit_factory() + { + return new BatteryUnit; + } +} diff --git a/CGMES_3.0.0/BatteryUnit.hpp b/CGMES_3.0.0/BatteryUnit.hpp new file mode 100644 index 000000000..5497bf5f0 --- /dev/null +++ b/CGMES_3.0.0/BatteryUnit.hpp @@ -0,0 +1,44 @@ +#ifndef BatteryUnit_H +#define BatteryUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerElectronicsUnit.hpp" +#include "BaseClassDefiner.hpp" +#include "BatteryStateKind.hpp" +#include "RealEnergy.hpp" + +namespace CIMPP +{ + + /* + An electrochemical energy storage device. + */ + class BatteryUnit : public PowerElectronicsUnit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BatteryUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/Bay.cpp b/CGMES_3.0.0/Bay.cpp new file mode 100644 index 000000000..0213393ce --- /dev/null +++ b/CGMES_3.0.0/Bay.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Bay.hpp" + +#include +#include + +#include "VoltageLevel.hpp" + +using namespace CIMPP; + +Bay::Bay() : VoltageLevel(nullptr) {}; +Bay::~Bay() {}; + + + + +bool assign_VoltageLevel_Bays(BaseClass*, BaseClass*); +bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Bay* element = dynamic_cast(BaseClass_ptr1); + VoltageLevel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageLevel != element2) + { + element->VoltageLevel = element2; + return assign_VoltageLevel_Bays(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Bay::debugName[] = "Bay"; +const char* Bay::debugString() const +{ + return Bay::debugName; +} + +void Bay::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Bay"), &Bay_factory)); +} + +void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Bay::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Bay.VoltageLevel"), &assign_Bay_VoltageLevel)); +} + +const BaseClassDefiner Bay::declare() +{ + return BaseClassDefiner(Bay::addConstructToMap, Bay::addPrimitiveAssignFnsToMap, Bay::addClassAssignFnsToMap, Bay::debugName); +} + +namespace CIMPP +{ + BaseClass* Bay_factory() + { + return new Bay; + } +} diff --git a/CGMES_3.0.0/Bay.hpp b/CGMES_3.0.0/Bay.hpp new file mode 100644 index 000000000..4f08b2d5e --- /dev/null +++ b/CGMES_3.0.0/Bay.hpp @@ -0,0 +1,41 @@ +#ifndef Bay_H +#define Bay_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Bay : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + Bay(); + ~Bay() override; + + CIMPP::VoltageLevel* VoltageLevel; /* The voltage level containing this bay. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Bay_factory(); +} +#endif diff --git a/CGMES_3.0.0/BoundaryPoint.cpp b/CGMES_3.0.0/BoundaryPoint.cpp new file mode 100644 index 000000000..79f7f4619 --- /dev/null +++ b/CGMES_3.0.0/BoundaryPoint.cpp @@ -0,0 +1,195 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BoundaryPoint.hpp" + +#include +#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() {}; + + + +bool assign_BoundaryPoint_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->fromEndIsoCode = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->fromEndName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->fromEndNameTso = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_isDirectCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isDirectCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_isExcludedFromAreaInterchange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isExcludedFromAreaInterchange; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->toEndIsoCode = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->toEndName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_BoundaryPoint_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->toEndNameTso = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + +const char BoundaryPoint::debugName[] = "BoundaryPoint"; +const char* BoundaryPoint::debugString() const +{ + return BoundaryPoint::debugName; +} + +void BoundaryPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void BoundaryPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.ConnectivityNode"), &assign_BoundaryPoint_ConnectivityNode)); +} + +const BaseClassDefiner BoundaryPoint::declare() +{ + return BaseClassDefiner(BoundaryPoint::addConstructToMap, BoundaryPoint::addPrimitiveAssignFnsToMap, BoundaryPoint::addClassAssignFnsToMap, BoundaryPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* BoundaryPoint_factory() + { + return new BoundaryPoint; + } +} diff --git a/CGMES_3.0.0/BoundaryPoint.hpp b/CGMES_3.0.0/BoundaryPoint.hpp new file mode 100644 index 000000000..67e1819de --- /dev/null +++ b/CGMES_3.0.0/BoundaryPoint.hpp @@ -0,0 +1,51 @@ +#ifndef BoundaryPoint_H +#define BoundaryPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "String.hpp" + +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. + */ + class BoundaryPoint : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BoundaryPoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/Breaker.cpp b/CGMES_3.0.0/Breaker.cpp new file mode 100644 index 000000000..ecee41d5b --- /dev/null +++ b/CGMES_3.0.0/Breaker.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Breaker.hpp" + +#include +#include + + +using namespace CIMPP; + +Breaker::Breaker() {}; +Breaker::~Breaker() {}; + + + +const char Breaker::debugName[] = "Breaker"; +const char* Breaker::debugString() const +{ + return Breaker::debugName; +} + +void Breaker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Breaker"), &Breaker_factory)); +} + +void Breaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Breaker::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Breaker::declare() +{ + return BaseClassDefiner(Breaker::addConstructToMap, Breaker::addPrimitiveAssignFnsToMap, Breaker::addClassAssignFnsToMap, Breaker::debugName); +} + +namespace CIMPP +{ + BaseClass* Breaker_factory() + { + return new Breaker; + } +} diff --git a/CGMES_3.0.0/Breaker.hpp b/CGMES_3.0.0/Breaker.hpp new file mode 100644 index 000000000..b1047a3fd --- /dev/null +++ b/CGMES_3.0.0/Breaker.hpp @@ -0,0 +1,39 @@ +#ifndef Breaker_H +#define Breaker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ProtectedSwitch.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Breaker : public ProtectedSwitch + { + public: + /* constructor initialising all attributes to null */ + Breaker(); + ~Breaker() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Breaker_factory(); +} +#endif diff --git a/CGMES_3.0.0/BusNameMarker.cpp b/CGMES_3.0.0/BusNameMarker.cpp new file mode 100644 index 000000000..a3e65dbd1 --- /dev/null +++ b/CGMES_3.0.0/BusNameMarker.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BusNameMarker.hpp" + +#include +#include + +#include "ReportingGroup.hpp" +#include "ACDCTerminal.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {}; +BusNameMarker::~BusNameMarker() {}; + + + + +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) +{ + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + ReportingGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReportingGroup != element2) + { + element->ReportingGroup = element2; + return assign_ReportingGroup_BusNameMarker(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCTerminal_BusNameMarker(BaseClass*, BaseClass*); +bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Terminal.begin(), element->Terminal.end(), element2) == element->Terminal.end()) + { + element->Terminal.push_back(element2); + return assign_ACDCTerminal_BusNameMarker(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char BusNameMarker::debugName[] = "BusNameMarker"; +const char* BusNameMarker::debugString() const +{ + return BusNameMarker::debugName; +} + +void BusNameMarker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner BusNameMarker::declare() +{ + return BaseClassDefiner(BusNameMarker::addConstructToMap, BusNameMarker::addPrimitiveAssignFnsToMap, BusNameMarker::addClassAssignFnsToMap, BusNameMarker::debugName); +} + +namespace CIMPP +{ + BaseClass* BusNameMarker_factory() + { + return new BusNameMarker; + } +} diff --git a/CGMES_3.0.0/BusNameMarker.hpp b/CGMES_3.0.0/BusNameMarker.hpp new file mode 100644 index 000000000..664b55718 --- /dev/null +++ b/CGMES_3.0.0/BusNameMarker.hpp @@ -0,0 +1,45 @@ +#ifndef BusNameMarker_H +#define BusNameMarker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +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. + */ + class BusNameMarker : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BusNameMarker_factory(); +} +#endif diff --git a/CGMES_3.0.0/BusbarSection.cpp b/CGMES_3.0.0/BusbarSection.cpp new file mode 100644 index 000000000..eff584525 --- /dev/null +++ b/CGMES_3.0.0/BusbarSection.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "BusbarSection.hpp" + +#include +#include + +#include "CurrentFlow.hpp" + +using namespace CIMPP; + +BusbarSection::BusbarSection() {}; +BusbarSection::~BusbarSection() {}; + + +bool assign_BusbarSection_ipMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ipMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char BusbarSection::debugName[] = "BusbarSection"; +const char* BusbarSection::debugString() const +{ + return BusbarSection::debugName; +} + +void BusbarSection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void BusbarSection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner BusbarSection::declare() +{ + return BaseClassDefiner(BusbarSection::addConstructToMap, BusbarSection::addPrimitiveAssignFnsToMap, BusbarSection::addClassAssignFnsToMap, BusbarSection::debugName); +} + +namespace CIMPP +{ + BaseClass* BusbarSection_factory() + { + return new BusbarSection; + } +} diff --git a/CGMES_3.0.0/BusbarSection.hpp b/CGMES_3.0.0/BusbarSection.hpp new file mode 100644 index 000000000..fe4d30c44 --- /dev/null +++ b/CGMES_3.0.0/BusbarSection.hpp @@ -0,0 +1,41 @@ +#ifndef BusbarSection_H +#define BusbarSection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Connector.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" + +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. + */ + class BusbarSection : public Connector + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* BusbarSection_factory(); +} +#endif diff --git a/CGMES_3.0.0/CAESPlant.cpp b/CGMES_3.0.0/CAESPlant.cpp new file mode 100644 index 000000000..17282b6c6 --- /dev/null +++ b/CGMES_3.0.0/CAESPlant.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CAESPlant.hpp" + +#include +#include + +#include "ThermalGeneratingUnit.hpp" + +using namespace CIMPP; + +CAESPlant::CAESPlant() : ThermalGeneratingUnit(nullptr) {}; +CAESPlant::~CAESPlant() {}; + + + + +bool assign_ThermalGeneratingUnit_CAESPlant(BaseClass*, BaseClass*); +bool assign_CAESPlant_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CAESPlant* element = dynamic_cast(BaseClass_ptr1); + ThermalGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ThermalGeneratingUnit != element2) + { + element->ThermalGeneratingUnit = element2; + return assign_ThermalGeneratingUnit_CAESPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char CAESPlant::debugName[] = "CAESPlant"; +const char* CAESPlant::debugString() const +{ + return CAESPlant::debugName; +} + +void CAESPlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:CAESPlant"), &CAESPlant_factory)); +} + +void CAESPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void CAESPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CAESPlant.ThermalGeneratingUnit"), &assign_CAESPlant_ThermalGeneratingUnit)); +} + +const BaseClassDefiner CAESPlant::declare() +{ + return BaseClassDefiner(CAESPlant::addConstructToMap, CAESPlant::addPrimitiveAssignFnsToMap, CAESPlant::addClassAssignFnsToMap, CAESPlant::debugName); +} + +namespace CIMPP +{ + BaseClass* CAESPlant_factory() + { + return new CAESPlant; + } +} diff --git a/CGMES_3.0.0/CAESPlant.hpp b/CGMES_3.0.0/CAESPlant.hpp new file mode 100644 index 000000000..85b8b06cd --- /dev/null +++ b/CGMES_3.0.0/CAESPlant.hpp @@ -0,0 +1,41 @@ +#ifndef CAESPlant_H +#define CAESPlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ThermalGeneratingUnit; + + /* + Compressed air energy storage plant. + */ + class CAESPlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + CAESPlant(); + ~CAESPlant() override; + + CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; /* A thermal generating unit may be a member of a compressed air energy storage plant. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CAESPlant_factory(); +} +#endif diff --git a/CGMES_3.0.0/CIMClassList.hpp b/CGMES_3.0.0/CIMClassList.hpp new file mode 100644 index 000000000..4d71fe359 --- /dev/null +++ b/CGMES_3.0.0/CIMClassList.hpp @@ -0,0 +1,452 @@ +#ifndef CIMCLASSLIST_H +#define CIMCLASSLIST_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include +#include "IEC61970.hpp" +using namespace CIMPP; +static std::list CIMClassList = +{ + ACDCConverter::declare(), + ACDCConverterDCTerminal::declare(), + ACDCTerminal::declare(), + ACLineSegment::declare(), + Accumulator::declare(), + AccumulatorLimit::declare(), + AccumulatorLimitSet::declare(), + AccumulatorReset::declare(), + AccumulatorValue::declare(), + ActivePowerLimit::declare(), + Analog::declare(), + AnalogControl::declare(), + AnalogLimit::declare(), + AnalogLimitSet::declare(), + AnalogValue::declare(), + ApparentPowerLimit::declare(), + AsynchronousMachine::declare(), + AsynchronousMachineDynamics::declare(), + AsynchronousMachineEquivalentCircuit::declare(), + AsynchronousMachineTimeConstantReactance::declare(), + AsynchronousMachineUserDefined::declare(), + AuxiliaryEquipment::declare(), + BaseVoltage::declare(), + BasicIntervalSchedule::declare(), + BatteryUnit::declare(), + Bay::declare(), + BoundaryPoint::declare(), + Breaker::declare(), + BusNameMarker::declare(), + BusbarSection::declare(), + CAESPlant::declare(), + CSCDynamics::declare(), + CSCUserDefined::declare(), + Clamp::declare(), + CogenerationPlant::declare(), + CombinedCyclePlant::declare(), + Command::declare(), + ConductingEquipment::declare(), + Conductor::declare(), + ConformLoad::declare(), + ConformLoadGroup::declare(), + ConformLoadSchedule::declare(), + ConnectivityNode::declare(), + ConnectivityNodeContainer::declare(), + Connector::declare(), + Control::declare(), + ControlArea::declare(), + ControlAreaGeneratingUnit::declare(), + CoordinateSystem::declare(), + CrossCompoundTurbineGovernorDynamics::declare(), + CsConverter::declare(), + CurrentLimit::declare(), + CurrentTransformer::declare(), + Curve::declare(), + CurveData::declare(), + Cut::declare(), + DCBaseTerminal::declare(), + DCBreaker::declare(), + DCBusbar::declare(), + DCChopper::declare(), + DCConductingEquipment::declare(), + DCConverterUnit::declare(), + DCDisconnector::declare(), + DCEquipmentContainer::declare(), + DCGround::declare(), + DCLine::declare(), + DCLineSegment::declare(), + DCNode::declare(), + DCSeriesDevice::declare(), + DCShunt::declare(), + DCSwitch::declare(), + DCTerminal::declare(), + DCTopologicalIsland::declare(), + DCTopologicalNode::declare(), + DayType::declare(), + Diagram::declare(), + DiagramObject::declare(), + DiagramObjectGluePoint::declare(), + DiagramObjectPoint::declare(), + DiagramObjectStyle::declare(), + DiagramStyle::declare(), + DiscExcContIEEEDEC1A::declare(), + DiscExcContIEEEDEC2A::declare(), + DiscExcContIEEEDEC3A::declare(), + DisconnectingCircuitBreaker::declare(), + Disconnector::declare(), + DiscontinuousExcitationControlDynamics::declare(), + DiscontinuousExcitationControlUserDefined::declare(), + Discrete::declare(), + DiscreteValue::declare(), + DynamicsFunctionBlock::declare(), + EarthFaultCompensator::declare(), + EnergyArea::declare(), + EnergyConnection::declare(), + EnergyConsumer::declare(), + EnergySchedulingType::declare(), + EnergySource::declare(), + Equipment::declare(), + EquipmentContainer::declare(), + EquivalentBranch::declare(), + EquivalentEquipment::declare(), + EquivalentInjection::declare(), + EquivalentNetwork::declare(), + EquivalentShunt::declare(), + ExcAC1A::declare(), + ExcAC2A::declare(), + ExcAC3A::declare(), + ExcAC4A::declare(), + ExcAC5A::declare(), + ExcAC6A::declare(), + ExcAC8B::declare(), + ExcANS::declare(), + ExcAVR1::declare(), + ExcAVR2::declare(), + ExcAVR3::declare(), + ExcAVR4::declare(), + ExcAVR5::declare(), + ExcAVR7::declare(), + ExcBBC::declare(), + ExcCZ::declare(), + ExcDC1A::declare(), + ExcDC2A::declare(), + ExcDC3A::declare(), + ExcDC3A1::declare(), + ExcELIN1::declare(), + ExcELIN2::declare(), + ExcHU::declare(), + ExcIEEEAC1A::declare(), + ExcIEEEAC2A::declare(), + ExcIEEEAC3A::declare(), + ExcIEEEAC4A::declare(), + ExcIEEEAC5A::declare(), + ExcIEEEAC6A::declare(), + ExcIEEEAC7B::declare(), + ExcIEEEAC8B::declare(), + ExcIEEEDC1A::declare(), + ExcIEEEDC2A::declare(), + ExcIEEEDC3A::declare(), + ExcIEEEDC4B::declare(), + ExcIEEEST1A::declare(), + ExcIEEEST2A::declare(), + ExcIEEEST3A::declare(), + ExcIEEEST4B::declare(), + ExcIEEEST5B::declare(), + ExcIEEEST6B::declare(), + ExcIEEEST7B::declare(), + ExcNI::declare(), + ExcOEX3T::declare(), + ExcPIC::declare(), + ExcREXS::declare(), + ExcRQB::declare(), + ExcSCRX::declare(), + ExcSEXS::declare(), + ExcSK::declare(), + ExcST1A::declare(), + ExcST2A::declare(), + ExcST3A::declare(), + ExcST4B::declare(), + ExcST6B::declare(), + ExcST7B::declare(), + ExcitationSystemDynamics::declare(), + ExcitationSystemUserDefined::declare(), + ExternalNetworkInjection::declare(), + FaultIndicator::declare(), + FossilFuel::declare(), + Fuse::declare(), + GenICompensationForGenJ::declare(), + GeneratingUnit::declare(), + GeographicalRegion::declare(), + GovCT1::declare(), + GovCT2::declare(), + GovGAST::declare(), + GovGAST1::declare(), + GovGAST2::declare(), + GovGAST3::declare(), + GovGAST4::declare(), + GovGASTWD::declare(), + GovHydro1::declare(), + GovHydro2::declare(), + GovHydro3::declare(), + GovHydro4::declare(), + GovHydroDD::declare(), + GovHydroFrancis::declare(), + GovHydroIEEE0::declare(), + GovHydroIEEE2::declare(), + GovHydroPID::declare(), + GovHydroPID2::declare(), + GovHydroPelton::declare(), + GovHydroR::declare(), + GovHydroWEH::declare(), + GovHydroWPID::declare(), + GovSteam0::declare(), + GovSteam1::declare(), + GovSteam2::declare(), + GovSteamBB::declare(), + GovSteamCC::declare(), + GovSteamEU::declare(), + GovSteamFV2::declare(), + GovSteamFV3::declare(), + GovSteamFV4::declare(), + GovSteamIEEE1::declare(), + GovSteamSGO::declare(), + GrossToNetActivePowerCurve::declare(), + Ground::declare(), + GroundDisconnector::declare(), + GroundingImpedance::declare(), + HVDCDynamics::declare(), + HydroGeneratingUnit::declare(), + HydroPowerPlant::declare(), + HydroPump::declare(), + IOPoint::declare(), + IdentifiedObject::declare(), + Jumper::declare(), + Junction::declare(), + Limit::declare(), + LimitSet::declare(), + Line::declare(), + LinearShuntCompensator::declare(), + LoadAggregate::declare(), + LoadArea::declare(), + LoadBreakSwitch::declare(), + LoadComposite::declare(), + LoadDynamics::declare(), + LoadGenericNonLinear::declare(), + LoadGroup::declare(), + LoadMotor::declare(), + LoadResponseCharacteristic::declare(), + LoadStatic::declare(), + LoadUserDefined::declare(), + Location::declare(), + Measurement::declare(), + MeasurementValue::declare(), + MeasurementValueQuality::declare(), + MeasurementValueSource::declare(), + MechLoad1::declare(), + MechanicalLoadDynamics::declare(), + MechanicalLoadUserDefined::declare(), + MutualCoupling::declare(), + NonConformLoad::declare(), + NonConformLoadGroup::declare(), + NonConformLoadSchedule::declare(), + NonlinearShuntCompensator::declare(), + NonlinearShuntCompensatorPoint::declare(), + NuclearGeneratingUnit::declare(), + OperationalLimit::declare(), + OperationalLimitSet::declare(), + OperationalLimitType::declare(), + OverexcLim2::declare(), + OverexcLimIEEE::declare(), + OverexcLimX1::declare(), + OverexcLimX2::declare(), + OverexcitationLimiterDynamics::declare(), + OverexcitationLimiterUserDefined::declare(), + PFVArControllerType1Dynamics::declare(), + PFVArControllerType1UserDefined::declare(), + PFVArControllerType2Dynamics::declare(), + PFVArControllerType2UserDefined::declare(), + PFVArType1IEEEPFController::declare(), + PFVArType1IEEEVArController::declare(), + PFVArType2Common1::declare(), + PFVArType2IEEEPFController::declare(), + PFVArType2IEEEVArController::declare(), + PetersenCoil::declare(), + PhaseTapChanger::declare(), + PhaseTapChangerAsymmetrical::declare(), + PhaseTapChangerLinear::declare(), + PhaseTapChangerNonLinear::declare(), + PhaseTapChangerSymmetrical::declare(), + PhaseTapChangerTable::declare(), + PhaseTapChangerTablePoint::declare(), + PhaseTapChangerTabular::declare(), + PhotoVoltaicUnit::declare(), + PositionPoint::declare(), + PostLineSensor::declare(), + PotentialTransformer::declare(), + PowerElectronicsConnection::declare(), + PowerElectronicsUnit::declare(), + PowerElectronicsWindUnit::declare(), + PowerSystemResource::declare(), + PowerSystemStabilizerDynamics::declare(), + PowerSystemStabilizerUserDefined::declare(), + PowerTransformer::declare(), + PowerTransformerEnd::declare(), + ProprietaryParameterDynamics::declare(), + ProtectedSwitch::declare(), + Pss1::declare(), + Pss1A::declare(), + Pss2B::declare(), + Pss2ST::declare(), + Pss5::declare(), + PssELIN2::declare(), + PssIEEE1A::declare(), + PssIEEE2B::declare(), + PssIEEE3B::declare(), + PssIEEE4B::declare(), + PssPTIST1::declare(), + PssPTIST3::declare(), + PssRQB::declare(), + PssSB4::declare(), + PssSH::declare(), + PssSK::declare(), + PssSTAB2A::declare(), + PssWECC::declare(), + Quality61850::declare(), + RaiseLowerCommand::declare(), + RatioTapChanger::declare(), + RatioTapChangerTable::declare(), + RatioTapChangerTablePoint::declare(), + ReactiveCapabilityCurve::declare(), + RegularIntervalSchedule::declare(), + RegularTimePoint::declare(), + RegulatingCondEq::declare(), + RegulatingControl::declare(), + RegulationSchedule::declare(), + RemoteInputSignal::declare(), + ReportingGroup::declare(), + RotatingMachine::declare(), + RotatingMachineDynamics::declare(), + SVCUserDefined::declare(), + Season::declare(), + SeasonDayTypeSchedule::declare(), + Sensor::declare(), + SeriesCompensator::declare(), + ServiceLocation::declare(), + SetPoint::declare(), + ShuntCompensator::declare(), + SolarGeneratingUnit::declare(), + SolarPowerPlant::declare(), + StaticVarCompensator::declare(), + StaticVarCompensatorDynamics::declare(), + StationSupply::declare(), + Status::declare(), + StreetAddress::declare(), + StreetDetail::declare(), + StringMeasurement::declare(), + StringMeasurementValue::declare(), + SubGeographicalRegion::declare(), + SubLoadArea::declare(), + Substation::declare(), + SurgeArrester::declare(), + SvInjection::declare(), + SvPowerFlow::declare(), + SvShuntCompensatorSections::declare(), + SvStatus::declare(), + SvSwitch::declare(), + SvTapStep::declare(), + SvVoltage::declare(), + Switch::declare(), + SwitchSchedule::declare(), + SynchronousMachine::declare(), + SynchronousMachineDetailed::declare(), + SynchronousMachineDynamics::declare(), + SynchronousMachineEquivalentCircuit::declare(), + SynchronousMachineSimplified::declare(), + SynchronousMachineTimeConstantReactance::declare(), + SynchronousMachineUserDefined::declare(), + TapChanger::declare(), + TapChangerControl::declare(), + TapChangerTablePoint::declare(), + TapSchedule::declare(), + Terminal::declare(), + TextDiagramObject::declare(), + ThermalGeneratingUnit::declare(), + TieFlow::declare(), + TopologicalIsland::declare(), + TopologicalNode::declare(), + TownDetail::declare(), + TransformerEnd::declare(), + TurbLCFB1::declare(), + TurbineGovernorDynamics::declare(), + TurbineGovernorUserDefined::declare(), + TurbineLoadControllerDynamics::declare(), + TurbineLoadControllerUserDefined::declare(), + UnderexcLim2Simplified::declare(), + UnderexcLimIEEE1::declare(), + UnderexcLimIEEE2::declare(), + UnderexcLimX1::declare(), + UnderexcLimX2::declare(), + UnderexcitationLimiterDynamics::declare(), + UnderexcitationLimiterUserDefined::declare(), + VAdjIEEE::declare(), + VCompIEEEType1::declare(), + VCompIEEEType2::declare(), + VSCDynamics::declare(), + VSCUserDefined::declare(), + ValueAliasSet::declare(), + ValueToAlias::declare(), + VisibilityLayer::declare(), + VoltageAdjusterDynamics::declare(), + VoltageAdjusterUserDefined::declare(), + VoltageCompensatorDynamics::declare(), + VoltageCompensatorUserDefined::declare(), + VoltageLevel::declare(), + VoltageLimit::declare(), + VsCapabilityCurve::declare(), + VsConverter::declare(), + WaveTrap::declare(), + WindAeroConstIEC::declare(), + WindAeroOneDimIEC::declare(), + WindAeroTwoDimIEC::declare(), + WindContCurrLimIEC::declare(), + WindContPType3IEC::declare(), + WindContPType4aIEC::declare(), + WindContPType4bIEC::declare(), + WindContPitchAngleIEC::declare(), + WindContQIEC::declare(), + WindContQLimIEC::declare(), + WindContQPQULimIEC::declare(), + WindContRotorRIEC::declare(), + WindDynamicsLookupTable::declare(), + WindGenTurbineType1aIEC::declare(), + WindGenTurbineType1bIEC::declare(), + WindGenTurbineType2IEC::declare(), + WindGenType3IEC::declare(), + WindGenType3aIEC::declare(), + WindGenType3bIEC::declare(), + WindGenType4IEC::declare(), + WindGeneratingUnit::declare(), + WindMechIEC::declare(), + WindPitchContPowerIEC::declare(), + WindPlantDynamics::declare(), + WindPlantFreqPcontrolIEC::declare(), + WindPlantIEC::declare(), + WindPlantReactiveControlIEC::declare(), + WindPlantUserDefined::declare(), + WindPowerPlant::declare(), + WindProtectionIEC::declare(), + WindRefFrameRotIEC::declare(), + WindTurbineType1or2Dynamics::declare(), + WindTurbineType1or2IEC::declare(), + WindTurbineType3IEC::declare(), + WindTurbineType3or4Dynamics::declare(), + WindTurbineType3or4IEC::declare(), + WindTurbineType4IEC::declare(), + WindTurbineType4aIEC::declare(), + WindTurbineType4bIEC::declare(), + WindType1or2UserDefined::declare(), + WindType3or4UserDefined::declare(), + WorkLocation::declare(), + UnknownType::declare(), +}; +#endif // CIMCLASSLIST_H diff --git a/CGMES_3.0.0/CSCDynamics.cpp b/CGMES_3.0.0/CSCDynamics.cpp new file mode 100644 index 000000000..6a0d7ef40 --- /dev/null +++ b/CGMES_3.0.0/CSCDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CSCDynamics.hpp" + +#include +#include + +#include "CsConverter.hpp" + +using namespace CIMPP; + +CSCDynamics::CSCDynamics() : CSConverter(nullptr) {}; +CSCDynamics::~CSCDynamics() {}; + + + + +bool assign_CsConverter_CSCDynamics(BaseClass*, BaseClass*); +bool assign_CSCDynamics_CSConverter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CSCDynamics* element = dynamic_cast(BaseClass_ptr1); + CsConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CSConverter != element2) + { + element->CSConverter = element2; + return assign_CsConverter_CSCDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char CSCDynamics::debugName[] = "CSCDynamics"; +const char* CSCDynamics::debugString() const +{ + return CSCDynamics::debugName; +} + +void CSCDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:CSCDynamics"), &CSCDynamics_factory)); +} + +void CSCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void CSCDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CSCDynamics.CSConverter"), &assign_CSCDynamics_CSConverter)); +} + +const BaseClassDefiner CSCDynamics::declare() +{ + return BaseClassDefiner(CSCDynamics::addConstructToMap, CSCDynamics::addPrimitiveAssignFnsToMap, CSCDynamics::addClassAssignFnsToMap, CSCDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* CSCDynamics_factory() + { + return new CSCDynamics; + } +} diff --git a/CGMES_3.0.0/CSCDynamics.hpp b/CGMES_3.0.0/CSCDynamics.hpp new file mode 100644 index 000000000..f5cf5e00d --- /dev/null +++ b/CGMES_3.0.0/CSCDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef CSCDynamics_H +#define CSCDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "HVDCDynamics.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class CSCDynamics : public HVDCDynamics + { + public: + /* constructor initialising all attributes to null */ + CSCDynamics(); + ~CSCDynamics() override; + + CIMPP::CsConverter* CSConverter; /* Current source converter to which current source converter dynamics model applies. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CSCDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/CSCUserDefined.cpp b/CGMES_3.0.0/CSCUserDefined.cpp new file mode 100644 index 000000000..32ca4193a --- /dev/null +++ b/CGMES_3.0.0/CSCUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CSCUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +CSCUserDefined::CSCUserDefined() {}; +CSCUserDefined::~CSCUserDefined() {}; + + + +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) +{ + CSCUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_CSCUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char CSCUserDefined::debugName[] = "CSCUserDefined"; +const char* CSCUserDefined::debugString() const +{ + return CSCUserDefined::debugName; +} + +void CSCUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CSCUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CSCUserDefined.ProprietaryParameterDynamics"), &assign_CSCUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner CSCUserDefined::declare() +{ + return BaseClassDefiner(CSCUserDefined::addConstructToMap, CSCUserDefined::addPrimitiveAssignFnsToMap, CSCUserDefined::addClassAssignFnsToMap, CSCUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* CSCUserDefined_factory() + { + return new CSCUserDefined; + } +} diff --git a/CGMES_3.0.0/CSCUserDefined.hpp b/CGMES_3.0.0/CSCUserDefined.hpp new file mode 100644 index 000000000..82d10841a --- /dev/null +++ b/CGMES_3.0.0/CSCUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef CSCUserDefined_H +#define CSCUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "CSCDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Current source converter (CSC) function block whose dynamic behaviour is described by a user-defined model. + */ + class CSCUserDefined : public CSCDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CSCUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/Capacitance.cpp b/CGMES_3.0.0/Capacitance.cpp new file mode 100644 index 000000000..79261bc63 --- /dev/null +++ b/CGMES_3.0.0/Capacitance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Capacitance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Capacitance& Capacitance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Capacitance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Capacitance::debugName[] = "Capacitance"; +const char* Capacitance::debugString() const +{ + return Capacitance::debugName; +} + +Capacitance& Capacitance::operator+=(const Capacitance& rhs) +{ + value += rhs.value; + return *this; +} + +Capacitance& Capacitance::operator-=(const Capacitance& rhs) +{ + value -= rhs.value; + return *this; +} + +Capacitance& Capacitance::operator*=(const Capacitance& rhs) +{ + value *= rhs.value; + return *this; +} + +Capacitance& Capacitance::operator/=(const Capacitance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Capacitance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Capacitance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Capacitance.hpp b/CGMES_3.0.0/Capacitance.hpp new file mode 100644 index 000000000..0f2f8bad2 --- /dev/null +++ b/CGMES_3.0.0/Capacitance.hpp @@ -0,0 +1,39 @@ +#ifndef Capacitance_H +#define Capacitance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Capacitive part of reactance (imaginary part of impedance), at rated frequency. + */ + class Capacitance + { + public: + Capacitance() : value(0.0), initialized(false) {} + Capacitance(long double value) : value(value), initialized(true) {} + + Capacitance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Capacitance& operator+=(const Capacitance& rhs); + Capacitance& operator-=(const Capacitance& rhs); + Capacitance& operator*=(const Capacitance& rhs); + Capacitance& operator/=(const Capacitance& rhs); + + friend std::istream& operator>>(std::istream& lop, Capacitance& rop); + friend std::ostream& operator<<(std::ostream& os, const Capacitance& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Clamp.cpp b/CGMES_3.0.0/Clamp.cpp new file mode 100644 index 000000000..0f58cd717 --- /dev/null +++ b/CGMES_3.0.0/Clamp.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Clamp.hpp" + +#include +#include + +#include "ACLineSegment.hpp" +#include "Length.hpp" + +using namespace CIMPP; + +Clamp::Clamp() : ACLineSegment(nullptr) {}; +Clamp::~Clamp() {}; + + + +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) +{ + Clamp* element = dynamic_cast(BaseClass_ptr1); + ACLineSegment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ACLineSegment != element2) + { + element->ACLineSegment = element2; + return assign_ACLineSegment_Clamp(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char Clamp::debugName[] = "Clamp"; +const char* Clamp::debugString() const +{ + return Clamp::debugName; +} + +void Clamp::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Clamp::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Clamp.ACLineSegment"), &assign_Clamp_ACLineSegment)); +} + +const BaseClassDefiner Clamp::declare() +{ + return BaseClassDefiner(Clamp::addConstructToMap, Clamp::addPrimitiveAssignFnsToMap, Clamp::addClassAssignFnsToMap, Clamp::debugName); +} + +namespace CIMPP +{ + BaseClass* Clamp_factory() + { + return new Clamp; + } +} diff --git a/CGMES_3.0.0/Clamp.hpp b/CGMES_3.0.0/Clamp.hpp new file mode 100644 index 000000000..bba73fe93 --- /dev/null +++ b/CGMES_3.0.0/Clamp.hpp @@ -0,0 +1,43 @@ +#ifndef Clamp_H +#define Clamp_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Length.hpp" + +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. + */ + class Clamp : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Clamp_factory(); +} +#endif diff --git a/CGMES_3.0.0/CogenerationPlant.cpp b/CGMES_3.0.0/CogenerationPlant.cpp new file mode 100644 index 000000000..b240aec63 --- /dev/null +++ b/CGMES_3.0.0/CogenerationPlant.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CogenerationPlant.hpp" + +#include +#include + +#include "ThermalGeneratingUnit.hpp" + +using namespace CIMPP; + +CogenerationPlant::CogenerationPlant() {}; +CogenerationPlant::~CogenerationPlant() {}; + + + + +bool assign_ThermalGeneratingUnit_CogenerationPlant(BaseClass*, BaseClass*); +bool assign_CogenerationPlant_ThermalGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CogenerationPlant* element = dynamic_cast(BaseClass_ptr1); + ThermalGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ThermalGeneratingUnits.begin(), element->ThermalGeneratingUnits.end(), element2) == element->ThermalGeneratingUnits.end()) + { + element->ThermalGeneratingUnits.push_back(element2); + return assign_ThermalGeneratingUnit_CogenerationPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char CogenerationPlant::debugName[] = "CogenerationPlant"; +const char* CogenerationPlant::debugString() const +{ + return CogenerationPlant::debugName; +} + +void CogenerationPlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:CogenerationPlant"), &CogenerationPlant_factory)); +} + +void CogenerationPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void CogenerationPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CogenerationPlant.ThermalGeneratingUnits"), &assign_CogenerationPlant_ThermalGeneratingUnits)); +} + +const BaseClassDefiner CogenerationPlant::declare() +{ + return BaseClassDefiner(CogenerationPlant::addConstructToMap, CogenerationPlant::addPrimitiveAssignFnsToMap, CogenerationPlant::addClassAssignFnsToMap, CogenerationPlant::debugName); +} + +namespace CIMPP +{ + BaseClass* CogenerationPlant_factory() + { + return new CogenerationPlant; + } +} diff --git a/CGMES_3.0.0/CogenerationPlant.hpp b/CGMES_3.0.0/CogenerationPlant.hpp new file mode 100644 index 000000000..a698dc3f6 --- /dev/null +++ b/CGMES_3.0.0/CogenerationPlant.hpp @@ -0,0 +1,41 @@ +#ifndef CogenerationPlant_H +#define CogenerationPlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class CogenerationPlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + CogenerationPlant(); + ~CogenerationPlant() override; + + std::list ThermalGeneratingUnits; /* A thermal generating unit may be a member of a cogeneration plant. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CogenerationPlant_factory(); +} +#endif diff --git a/CGMES_3.0.0/CombinedCyclePlant.cpp b/CGMES_3.0.0/CombinedCyclePlant.cpp new file mode 100644 index 000000000..0f34abb5f --- /dev/null +++ b/CGMES_3.0.0/CombinedCyclePlant.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CombinedCyclePlant.hpp" + +#include +#include + +#include "ThermalGeneratingUnit.hpp" + +using namespace CIMPP; + +CombinedCyclePlant::CombinedCyclePlant() {}; +CombinedCyclePlant::~CombinedCyclePlant() {}; + + + + +bool assign_ThermalGeneratingUnit_CombinedCyclePlant(BaseClass*, BaseClass*); +bool assign_CombinedCyclePlant_ThermalGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CombinedCyclePlant* element = dynamic_cast(BaseClass_ptr1); + ThermalGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ThermalGeneratingUnits.begin(), element->ThermalGeneratingUnits.end(), element2) == element->ThermalGeneratingUnits.end()) + { + element->ThermalGeneratingUnits.push_back(element2); + return assign_ThermalGeneratingUnit_CombinedCyclePlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char CombinedCyclePlant::debugName[] = "CombinedCyclePlant"; +const char* CombinedCyclePlant::debugString() const +{ + return CombinedCyclePlant::debugName; +} + +void CombinedCyclePlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:CombinedCyclePlant"), &CombinedCyclePlant_factory)); +} + +void CombinedCyclePlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void CombinedCyclePlant::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CombinedCyclePlant.ThermalGeneratingUnits"), &assign_CombinedCyclePlant_ThermalGeneratingUnits)); +} + +const BaseClassDefiner CombinedCyclePlant::declare() +{ + return BaseClassDefiner(CombinedCyclePlant::addConstructToMap, CombinedCyclePlant::addPrimitiveAssignFnsToMap, CombinedCyclePlant::addClassAssignFnsToMap, CombinedCyclePlant::debugName); +} + +namespace CIMPP +{ + BaseClass* CombinedCyclePlant_factory() + { + return new CombinedCyclePlant; + } +} diff --git a/CGMES_3.0.0/CombinedCyclePlant.hpp b/CGMES_3.0.0/CombinedCyclePlant.hpp new file mode 100644 index 000000000..2fcf12d62 --- /dev/null +++ b/CGMES_3.0.0/CombinedCyclePlant.hpp @@ -0,0 +1,41 @@ +#ifndef CombinedCyclePlant_H +#define CombinedCyclePlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class CombinedCyclePlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + CombinedCyclePlant(); + ~CombinedCyclePlant() override; + + std::list ThermalGeneratingUnits; /* A thermal generating unit may be a member of a combined cycle plant. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CombinedCyclePlant_factory(); +} +#endif diff --git a/CGMES_3.0.0/Command.cpp b/CGMES_3.0.0/Command.cpp new file mode 100644 index 000000000..3c4de5e5f --- /dev/null +++ b/CGMES_3.0.0/Command.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Command.hpp" + +#include +#include + +#include "DiscreteValue.hpp" +#include "ValueAliasSet.hpp" +#include "Integer.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {}; +Command::~Command() {}; + + + + +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) +{ + Command* element = dynamic_cast(BaseClass_ptr1); + DiscreteValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscreteValue != element2) + { + element->DiscreteValue = element2; + return assign_DiscreteValue_Command(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ValueAliasSet_Commands(BaseClass*, BaseClass*); +bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Command* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_Commands(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char Command::debugName[] = "Command"; +const char* Command::debugString() const +{ + return Command::debugName; +} + +void Command::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Command::declare() +{ + return BaseClassDefiner(Command::addConstructToMap, Command::addPrimitiveAssignFnsToMap, Command::addClassAssignFnsToMap, Command::debugName); +} + +namespace CIMPP +{ + BaseClass* Command_factory() + { + return new Command; + } +} diff --git a/CGMES_3.0.0/Command.hpp b/CGMES_3.0.0/Command.hpp new file mode 100644 index 000000000..3b3df20ed --- /dev/null +++ b/CGMES_3.0.0/Command.hpp @@ -0,0 +1,46 @@ +#ifndef Command_H +#define Command_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Control.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class DiscreteValue; + class ValueAliasSet; + + /* + A Command is a discrete control used for supervisory control. + */ + class Command : public Control + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Command_factory(); +} +#endif diff --git a/CGMES_3.0.0/Conductance.cpp b/CGMES_3.0.0/Conductance.cpp new file mode 100644 index 000000000..a9bb89d1f --- /dev/null +++ b/CGMES_3.0.0/Conductance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Conductance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Conductance& Conductance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Conductance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Conductance::debugName[] = "Conductance"; +const char* Conductance::debugString() const +{ + return Conductance::debugName; +} + +Conductance& Conductance::operator+=(const Conductance& rhs) +{ + value += rhs.value; + return *this; +} + +Conductance& Conductance::operator-=(const Conductance& rhs) +{ + value -= rhs.value; + return *this; +} + +Conductance& Conductance::operator*=(const Conductance& rhs) +{ + value *= rhs.value; + return *this; +} + +Conductance& Conductance::operator/=(const Conductance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Conductance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Conductance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Conductance.hpp b/CGMES_3.0.0/Conductance.hpp new file mode 100644 index 000000000..6a99df04e --- /dev/null +++ b/CGMES_3.0.0/Conductance.hpp @@ -0,0 +1,39 @@ +#ifndef Conductance_H +#define Conductance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. + */ + class Conductance + { + public: + Conductance() : value(0.0), initialized(false) {} + Conductance(long double value) : value(value), initialized(true) {} + + Conductance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Conductance& operator+=(const Conductance& rhs); + Conductance& operator-=(const Conductance& rhs); + Conductance& operator*=(const Conductance& rhs); + Conductance& operator/=(const Conductance& rhs); + + friend std::istream& operator>>(std::istream& lop, Conductance& rop); + friend std::ostream& operator<<(std::ostream& os, const Conductance& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ConductingEquipment.cpp b/CGMES_3.0.0/ConductingEquipment.cpp new file mode 100644 index 000000000..75fda89e3 --- /dev/null +++ b/CGMES_3.0.0/ConductingEquipment.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConductingEquipment.hpp" + +#include +#include + +#include "BaseVoltage.hpp" +#include "SvStatus.hpp" +#include "Terminal.hpp" + +using namespace CIMPP; + +ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {}; +ConductingEquipment::~ConductingEquipment() {}; + + + + + + +bool assign_BaseVoltage_ConductingEquipment(BaseClass*, BaseClass*); +bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_ConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvStatus_ConductingEquipment(BaseClass*, BaseClass*); +bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + SvStatus* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvStatus != element2) + { + element->SvStatus = element2; + return assign_SvStatus_ConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_ConductingEquipment(BaseClass*, BaseClass*); +bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + { + element->Terminals.push_back(element2); + return assign_Terminal_ConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConductingEquipment::debugName[] = "ConductingEquipment"; +const char* ConductingEquipment::debugString() const +{ + return ConductingEquipment::debugName; +} + +void ConductingEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConductingEquipment"), &ConductingEquipment_factory)); +} + +void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConductingEquipment::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConductingEquipment::declare() +{ + return BaseClassDefiner(ConductingEquipment::addConstructToMap, ConductingEquipment::addPrimitiveAssignFnsToMap, ConductingEquipment::addClassAssignFnsToMap, ConductingEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* ConductingEquipment_factory() + { + return new ConductingEquipment; + } +} diff --git a/CGMES_3.0.0/ConductingEquipment.hpp b/CGMES_3.0.0/ConductingEquipment.hpp new file mode 100644 index 000000000..e9e44657c --- /dev/null +++ b/CGMES_3.0.0/ConductingEquipment.hpp @@ -0,0 +1,45 @@ +#ifndef ConductingEquipment_H +#define ConductingEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class BaseVoltage; + class SvStatus; + class Terminal; + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConductingEquipment_factory(); +} +#endif diff --git a/CGMES_3.0.0/Conductor.cpp b/CGMES_3.0.0/Conductor.cpp new file mode 100644 index 000000000..f91f1c615 --- /dev/null +++ b/CGMES_3.0.0/Conductor.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Conductor.hpp" + +#include +#include + +#include "Length.hpp" + +using namespace CIMPP; + +Conductor::Conductor() {}; +Conductor::~Conductor() {}; + + +bool assign_Conductor_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Conductor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->length; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char Conductor::debugName[] = "Conductor"; +const char* Conductor::debugString() const +{ + return Conductor::debugName; +} + +void Conductor::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Conductor::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Conductor::declare() +{ + return BaseClassDefiner(Conductor::addConstructToMap, Conductor::addPrimitiveAssignFnsToMap, Conductor::addClassAssignFnsToMap, Conductor::debugName); +} + +namespace CIMPP +{ + BaseClass* Conductor_factory() + { + return new Conductor; + } +} diff --git a/CGMES_3.0.0/Conductor.hpp b/CGMES_3.0.0/Conductor.hpp new file mode 100644 index 000000000..35a3cbff2 --- /dev/null +++ b/CGMES_3.0.0/Conductor.hpp @@ -0,0 +1,41 @@ +#ifndef Conductor_H +#define Conductor_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Length.hpp" + +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. + */ + class Conductor : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + Conductor(); + ~Conductor() override; + + CIMPP::Length length; /* Segment length for calculating line section capabilities. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Conductor_factory(); +} +#endif diff --git a/CGMES_3.0.0/ConformLoad.cpp b/CGMES_3.0.0/ConformLoad.cpp new file mode 100644 index 000000000..068ca38a5 --- /dev/null +++ b/CGMES_3.0.0/ConformLoad.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConformLoad.hpp" + +#include +#include + +#include "ConformLoadGroup.hpp" + +using namespace CIMPP; + +ConformLoad::ConformLoad() : LoadGroup(nullptr) {}; +ConformLoad::~ConformLoad() {}; + + + + +bool assign_ConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); +bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoad* element = dynamic_cast(BaseClass_ptr1); + ConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadGroup != element2) + { + element->LoadGroup = element2; + return assign_ConformLoadGroup_EnergyConsumers(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConformLoad::debugName[] = "ConformLoad"; +const char* ConformLoad::debugString() const +{ + return ConformLoad::debugName; +} + +void ConformLoad::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConformLoad"), &ConformLoad_factory)); +} + +void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConformLoad::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ConformLoad.LoadGroup"), &assign_ConformLoad_LoadGroup)); +} + +const BaseClassDefiner ConformLoad::declare() +{ + return BaseClassDefiner(ConformLoad::addConstructToMap, ConformLoad::addPrimitiveAssignFnsToMap, ConformLoad::addClassAssignFnsToMap, ConformLoad::debugName); +} + +namespace CIMPP +{ + BaseClass* ConformLoad_factory() + { + return new ConformLoad; + } +} diff --git a/CGMES_3.0.0/ConformLoad.hpp b/CGMES_3.0.0/ConformLoad.hpp new file mode 100644 index 000000000..d124b28eb --- /dev/null +++ b/CGMES_3.0.0/ConformLoad.hpp @@ -0,0 +1,41 @@ +#ifndef ConformLoad_H +#define ConformLoad_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConsumer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ConformLoad : public EnergyConsumer + { + public: + /* constructor initialising all attributes to null */ + ConformLoad(); + ~ConformLoad() override; + + CIMPP::ConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConformLoad_factory(); +} +#endif diff --git a/CGMES_3.0.0/ConformLoadGroup.cpp b/CGMES_3.0.0/ConformLoadGroup.cpp new file mode 100644 index 000000000..de8dedb23 --- /dev/null +++ b/CGMES_3.0.0/ConformLoadGroup.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConformLoadGroup.hpp" + +#include +#include + +#include "ConformLoadSchedule.hpp" +#include "ConformLoad.hpp" + +using namespace CIMPP; + +ConformLoadGroup::ConformLoadGroup() {}; +ConformLoadGroup::~ConformLoadGroup() {}; + + + + + +bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass*, BaseClass*); +bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + ConformLoadSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConformLoadSchedules.begin(), element->ConformLoadSchedules.end(), element2) == element->ConformLoadSchedules.end()) + { + element->ConformLoadSchedules.push_back(element2); + return assign_ConformLoadSchedule_ConformLoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConformLoad_LoadGroup(BaseClass*, BaseClass*); +bool assign_ConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + ConformLoad* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumers.begin(), element->EnergyConsumers.end(), element2) == element->EnergyConsumers.end()) + { + element->EnergyConsumers.push_back(element2); + return assign_ConformLoad_LoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConformLoadGroup::debugName[] = "ConformLoadGroup"; +const char* ConformLoadGroup::debugString() const +{ + return ConformLoadGroup::debugName; +} + +void ConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConformLoadGroup"), &ConformLoadGroup_factory)); +} + +void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConformLoadGroup::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConformLoadGroup::declare() +{ + return BaseClassDefiner(ConformLoadGroup::addConstructToMap, ConformLoadGroup::addPrimitiveAssignFnsToMap, ConformLoadGroup::addClassAssignFnsToMap, ConformLoadGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* ConformLoadGroup_factory() + { + return new ConformLoadGroup; + } +} diff --git a/CGMES_3.0.0/ConformLoadGroup.hpp b/CGMES_3.0.0/ConformLoadGroup.hpp new file mode 100644 index 000000000..0ea15d628 --- /dev/null +++ b/CGMES_3.0.0/ConformLoadGroup.hpp @@ -0,0 +1,43 @@ +#ifndef ConformLoadGroup_H +#define ConformLoadGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadGroup.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ConformLoad; + class ConformLoadSchedule; + + /* + A group of loads conforming to an allocation pattern. + */ + class ConformLoadGroup : public LoadGroup + { + public: + /* constructor initialising all attributes to null */ + ConformLoadGroup(); + ~ConformLoadGroup() override; + + std::list ConformLoadSchedules; /* The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConformLoadGroup_factory(); +} +#endif diff --git a/CGMES_3.0.0/ConformLoadSchedule.cpp b/CGMES_3.0.0/ConformLoadSchedule.cpp new file mode 100644 index 000000000..e3f173e5e --- /dev/null +++ b/CGMES_3.0.0/ConformLoadSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConformLoadSchedule.hpp" + +#include +#include + +#include "ConformLoadGroup.hpp" + +using namespace CIMPP; + +ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {}; +ConformLoadSchedule::~ConformLoadSchedule() {}; + + + + +bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass*, BaseClass*); +bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + ConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConformLoadGroup != element2) + { + element->ConformLoadGroup = element2; + return assign_ConformLoadGroup_ConformLoadSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConformLoadSchedule::debugName[] = "ConformLoadSchedule"; +const char* ConformLoadSchedule::debugString() const +{ + return ConformLoadSchedule::debugName; +} + +void ConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule"), &ConformLoadSchedule_factory)); +} + +void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConformLoadSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule.ConformLoadGroup"), &assign_ConformLoadSchedule_ConformLoadGroup)); +} + +const BaseClassDefiner ConformLoadSchedule::declare() +{ + return BaseClassDefiner(ConformLoadSchedule::addConstructToMap, ConformLoadSchedule::addPrimitiveAssignFnsToMap, ConformLoadSchedule::addClassAssignFnsToMap, ConformLoadSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* ConformLoadSchedule_factory() + { + return new ConformLoadSchedule; + } +} diff --git a/CGMES_3.0.0/ConformLoadSchedule.hpp b/CGMES_3.0.0/ConformLoadSchedule.hpp new file mode 100644 index 000000000..6d7a42782 --- /dev/null +++ b/CGMES_3.0.0/ConformLoadSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef ConformLoadSchedule_H +#define ConformLoadSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ConformLoadSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + ConformLoadSchedule(); + ~ConformLoadSchedule() override; + + CIMPP::ConformLoadGroup* ConformLoadGroup; /* The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConformLoadSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/ConnectivityNode.cpp b/CGMES_3.0.0/ConnectivityNode.cpp new file mode 100644 index 000000000..286c1698b --- /dev/null +++ b/CGMES_3.0.0/ConnectivityNode.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConnectivityNode.hpp" + +#include +#include + +#include "BoundaryPoint.hpp" +#include "ConnectivityNodeContainer.hpp" +#include "Terminal.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +ConnectivityNode::ConnectivityNode() : BoundaryPoint(nullptr), ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {}; +ConnectivityNode::~ConnectivityNode() {}; + + + + + + + +bool assign_BoundaryPoint_ConnectivityNode(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_BoundaryPoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + BoundaryPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BoundaryPoint != element2) + { + element->BoundaryPoint = element2; + return assign_BoundaryPoint_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +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_Terminal_ConnectivityNode(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConnectivityNode::debugName[] = "ConnectivityNode"; +const char* ConnectivityNode::debugString() const +{ + return ConnectivityNode::debugName; +} + +void ConnectivityNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConnectivityNode"), &ConnectivityNode_factory)); +} + +void ConnectivityNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConnectivityNode::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConnectivityNode::declare() +{ + return BaseClassDefiner(ConnectivityNode::addConstructToMap, ConnectivityNode::addPrimitiveAssignFnsToMap, ConnectivityNode::addClassAssignFnsToMap, ConnectivityNode::debugName); +} + +namespace CIMPP +{ + BaseClass* ConnectivityNode_factory() + { + return new ConnectivityNode; + } +} diff --git a/CGMES_3.0.0/ConnectivityNode.hpp b/CGMES_3.0.0/ConnectivityNode.hpp new file mode 100644 index 000000000..aeb53ce66 --- /dev/null +++ b/CGMES_3.0.0/ConnectivityNode.hpp @@ -0,0 +1,47 @@ +#ifndef ConnectivityNode_H +#define ConnectivityNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class BoundaryPoint; + class ConnectivityNodeContainer; + class Terminal; + class TopologicalNode; + + /* + Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. + */ + class ConnectivityNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConnectivityNode_factory(); +} +#endif diff --git a/CGMES_3.0.0/ConnectivityNodeContainer.cpp b/CGMES_3.0.0/ConnectivityNodeContainer.cpp new file mode 100644 index 000000000..a5ed6251f --- /dev/null +++ b/CGMES_3.0.0/ConnectivityNodeContainer.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ConnectivityNodeContainer.hpp" + +#include +#include + +#include "ConnectivityNode.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +ConnectivityNodeContainer::ConnectivityNodeContainer() {}; +ConnectivityNodeContainer::~ConnectivityNodeContainer() {}; + + + + + +bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); +bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNodeContainer* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConnectivityNodes.begin(), element->ConnectivityNodes.end(), element2) == element->ConnectivityNodes.end()) + { + element->ConnectivityNodes.push_back(element2); + return assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); +bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNodeContainer* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNode.begin(), element->TopologicalNode.end(), element2) == element->TopologicalNode.end()) + { + element->TopologicalNode.push_back(element2); + return assign_TopologicalNode_ConnectivityNodeContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ConnectivityNodeContainer::debugName[] = "ConnectivityNodeContainer"; +const char* ConnectivityNodeContainer::debugString() const +{ + return ConnectivityNodeContainer::debugName; +} + +void ConnectivityNodeContainer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer"), &ConnectivityNodeContainer_factory)); +} + +void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ConnectivityNodeContainer::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ConnectivityNodeContainer::declare() +{ + return BaseClassDefiner(ConnectivityNodeContainer::addConstructToMap, ConnectivityNodeContainer::addPrimitiveAssignFnsToMap, ConnectivityNodeContainer::addClassAssignFnsToMap, ConnectivityNodeContainer::debugName); +} + +namespace CIMPP +{ + BaseClass* ConnectivityNodeContainer_factory() + { + return new ConnectivityNodeContainer; + } +} diff --git a/CGMES_3.0.0/ConnectivityNodeContainer.hpp b/CGMES_3.0.0/ConnectivityNodeContainer.hpp new file mode 100644 index 000000000..0b188b41b --- /dev/null +++ b/CGMES_3.0.0/ConnectivityNodeContainer.hpp @@ -0,0 +1,43 @@ +#ifndef ConnectivityNodeContainer_H +#define ConnectivityNodeContainer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ConnectivityNode; + class TopologicalNode; + + /* + A base class for all objects that may contain connectivity nodes or topological nodes. + */ + class ConnectivityNodeContainer : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ConnectivityNodeContainer_factory(); +} +#endif diff --git a/CGMES_3.0.0/Connector.cpp b/CGMES_3.0.0/Connector.cpp new file mode 100644 index 000000000..55025d4c6 --- /dev/null +++ b/CGMES_3.0.0/Connector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Connector.hpp" + +#include +#include + + +using namespace CIMPP; + +Connector::Connector() {}; +Connector::~Connector() {}; + + + +const char Connector::debugName[] = "Connector"; +const char* Connector::debugString() const +{ + return Connector::debugName; +} + +void Connector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Connector"), &Connector_factory)); +} + +void Connector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Connector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Connector::declare() +{ + return BaseClassDefiner(Connector::addConstructToMap, Connector::addPrimitiveAssignFnsToMap, Connector::addClassAssignFnsToMap, Connector::debugName); +} + +namespace CIMPP +{ + BaseClass* Connector_factory() + { + return new Connector; + } +} diff --git a/CGMES_3.0.0/Connector.hpp b/CGMES_3.0.0/Connector.hpp new file mode 100644 index 000000000..9c7e0b2a4 --- /dev/null +++ b/CGMES_3.0.0/Connector.hpp @@ -0,0 +1,39 @@ +#ifndef Connector_H +#define Connector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Connector : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + Connector(); + ~Connector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Connector_factory(); +} +#endif diff --git a/CGMES_3.0.0/Control.cpp b/CGMES_3.0.0/Control.cpp new file mode 100644 index 000000000..9aba93e37 --- /dev/null +++ b/CGMES_3.0.0/Control.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Control.hpp" + +#include +#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() {}; + + + +bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + element->controlType = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_operationInProgress(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operationInProgress; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + element->timeStamp = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->unitMultiplier; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Control_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Control* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->unitSymbol; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + +const char Control::debugName[] = "Control"; +const char* Control::debugString() const +{ + return Control::debugName; +} + +void Control::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Control::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Control.PowerSystemResource"), &assign_Control_PowerSystemResource)); +} + +const BaseClassDefiner Control::declare() +{ + return BaseClassDefiner(Control::addConstructToMap, Control::addPrimitiveAssignFnsToMap, Control::addClassAssignFnsToMap, Control::debugName); +} + +namespace CIMPP +{ + BaseClass* Control_factory() + { + return new Control; + } +} diff --git a/CGMES_3.0.0/Control.hpp b/CGMES_3.0.0/Control.hpp new file mode 100644 index 000000000..00f603056 --- /dev/null +++ b/CGMES_3.0.0/Control.hpp @@ -0,0 +1,51 @@ +#ifndef Control_H +#define Control_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IOPoint.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "DateTime.hpp" +#include "String.hpp" +#include "UnitMultiplier.hpp" +#include "UnitSymbol.hpp" + +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. + */ + class Control : public IOPoint + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Control_factory(); +} +#endif diff --git a/CGMES_3.0.0/ControlArea.cpp b/CGMES_3.0.0/ControlArea.cpp new file mode 100644 index 000000000..81143d238 --- /dev/null +++ b/CGMES_3.0.0/ControlArea.cpp @@ -0,0 +1,155 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ControlArea.hpp" + +#include +#include + +#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() {}; + + + + + +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) +{ + ControlArea* 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_ControlArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_EnergyArea_ControlArea(BaseClass*, BaseClass*); +bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + EnergyArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergyArea != element2) + { + element->EnergyArea = element2; + return assign_EnergyArea_ControlArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TieFlow_ControlArea(BaseClass*, BaseClass*); +bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + TieFlow* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TieFlow.begin(), element->TieFlow.end(), element2) == element->TieFlow.end()) + { + element->TieFlow.push_back(element2); + return assign_TieFlow_ControlArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char ControlArea::debugName[] = "ControlArea"; +const char* ControlArea::debugString() const +{ + return ControlArea::debugName; +} + +void ControlArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ControlArea::declare() +{ + return BaseClassDefiner(ControlArea::addConstructToMap, ControlArea::addPrimitiveAssignFnsToMap, ControlArea::addClassAssignFnsToMap, ControlArea::debugName); +} + +namespace CIMPP +{ + BaseClass* ControlArea_factory() + { + return new ControlArea; + } +} diff --git a/CGMES_3.0.0/ControlArea.hpp b/CGMES_3.0.0/ControlArea.hpp new file mode 100644 index 000000000..c8c93cbdf --- /dev/null +++ b/CGMES_3.0.0/ControlArea.hpp @@ -0,0 +1,50 @@ +#ifndef ControlArea_H +#define ControlArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ControlAreaTypeKind.hpp" + +namespace CIMPP +{ + class ControlAreaGeneratingUnit; + 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. + */ + class ControlArea : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ControlArea_factory(); +} +#endif diff --git a/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp b/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp new file mode 100644 index 000000000..40ad5b42f --- /dev/null +++ b/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ControlAreaGeneratingUnit.hpp" + +#include +#include + +#include "ControlArea.hpp" +#include "GeneratingUnit.hpp" + +using namespace CIMPP; + +ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {}; +ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {}; + + + + + +bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + ControlArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ControlArea != element2) + { + element->ControlArea = element2; + return assign_ControlArea_ControlAreaGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ControlAreaGeneratingUnit* 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_ControlAreaGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ControlAreaGeneratingUnit::debugName[] = "ControlAreaGeneratingUnit"; +const char* ControlAreaGeneratingUnit::debugString() const +{ + return ControlAreaGeneratingUnit::debugName; +} + +void ControlAreaGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit"), &ControlAreaGeneratingUnit_factory)); +} + +void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ControlAreaGeneratingUnit::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ControlAreaGeneratingUnit::declare() +{ + return BaseClassDefiner(ControlAreaGeneratingUnit::addConstructToMap, ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap, ControlAreaGeneratingUnit::addClassAssignFnsToMap, ControlAreaGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* ControlAreaGeneratingUnit_factory() + { + return new ControlAreaGeneratingUnit; + } +} diff --git a/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp b/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp new file mode 100644 index 000000000..b03501eb0 --- /dev/null +++ b/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp @@ -0,0 +1,43 @@ +#ifndef ControlAreaGeneratingUnit_H +#define ControlAreaGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ControlAreaGeneratingUnit : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ControlAreaGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/ControlAreaTypeKind.cpp b/CGMES_3.0.0/ControlAreaTypeKind.cpp new file mode 100644 index 000000000..48f6c0cb5 --- /dev/null +++ b/CGMES_3.0.0/ControlAreaTypeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ControlAreaTypeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ControlAreaTypeKind& ControlAreaTypeKind::operator=(ControlAreaTypeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ControlAreaTypeKind::operator ControlAreaTypeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ControlAreaTypeKind::debugName[] = "ControlAreaTypeKind"; +const char* ControlAreaTypeKind::debugString() const +{ + return ControlAreaTypeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ControlAreaTypeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "AGC") + { + rop = ControlAreaTypeKind::AGC; + return lop; + } + if(EnumSymbol == "Forecast") + { + rop = ControlAreaTypeKind::Forecast; + return lop; + } + if(EnumSymbol == "Interchange") + { + rop = ControlAreaTypeKind::Interchange; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ControlAreaTypeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ControlAreaTypeKind::AGC) + { + EnumSymbol = "AGC"; + } + if (obj.value == ControlAreaTypeKind::Forecast) + { + EnumSymbol = "Forecast"; + } + if (obj.value == ControlAreaTypeKind::Interchange) + { + EnumSymbol = "Interchange"; + } + + if (!EnumSymbol.empty()) + { + os << "ControlAreaTypeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ControlAreaTypeKind.hpp b/CGMES_3.0.0/ControlAreaTypeKind.hpp new file mode 100644 index 000000000..025df1d5c --- /dev/null +++ b/CGMES_3.0.0/ControlAreaTypeKind.hpp @@ -0,0 +1,50 @@ +#ifndef ControlAreaTypeKind_H +#define ControlAreaTypeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The type of control area. + */ + class ControlAreaTypeKind + { + public: + enum ControlAreaTypeKind_ENUM + { + /** + * Used for automatic generation control. + */ + AGC, + /** + * Used for load forecast. + */ + Forecast, + /** + * Used for interchange specification or control. + */ + Interchange, + }; + + ControlAreaTypeKind() : value(), initialized(false) {} + ControlAreaTypeKind(ControlAreaTypeKind_ENUM value) : value(value), initialized(true) {} + + ControlAreaTypeKind& operator=(ControlAreaTypeKind_ENUM rop); + operator ControlAreaTypeKind_ENUM() const; + + ControlAreaTypeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ControlAreaTypeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ControlAreaTypeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/CoordinateSystem.cpp b/CGMES_3.0.0/CoordinateSystem.cpp new file mode 100644 index 000000000..a7fd8fb0f --- /dev/null +++ b/CGMES_3.0.0/CoordinateSystem.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CoordinateSystem.hpp" + +#include +#include + +#include "Location.hpp" +#include "String.hpp" + +using namespace CIMPP; + +CoordinateSystem::CoordinateSystem() {}; +CoordinateSystem::~CoordinateSystem() {}; + + + +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) +{ + CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + Location* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Locations.begin(), element->Locations.end(), element2) == element->Locations.end()) + { + element->Locations.push_back(element2); + return assign_Location_CoordinateSystem(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char CoordinateSystem::debugName[] = "CoordinateSystem"; +const char* CoordinateSystem::debugString() const +{ + return CoordinateSystem::debugName; +} + +void CoordinateSystem::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CoordinateSystem::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.Locations"), &assign_CoordinateSystem_Locations)); +} + +const BaseClassDefiner CoordinateSystem::declare() +{ + return BaseClassDefiner(CoordinateSystem::addConstructToMap, CoordinateSystem::addPrimitiveAssignFnsToMap, CoordinateSystem::addClassAssignFnsToMap, CoordinateSystem::debugName); +} + +namespace CIMPP +{ + BaseClass* CoordinateSystem_factory() + { + return new CoordinateSystem; + } +} diff --git a/CGMES_3.0.0/CoordinateSystem.hpp b/CGMES_3.0.0/CoordinateSystem.hpp new file mode 100644 index 000000000..f670ef662 --- /dev/null +++ b/CGMES_3.0.0/CoordinateSystem.hpp @@ -0,0 +1,43 @@ +#ifndef CoordinateSystem_H +#define CoordinateSystem_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class Location; + + /* + Coordinate reference system. + */ + class CoordinateSystem : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CoordinateSystem_factory(); +} +#endif diff --git a/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp new file mode 100644 index 000000000..650333fc8 --- /dev/null +++ b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CrossCompoundTurbineGovernorDynamics.hpp" + +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" + +using namespace CIMPP; + +CrossCompoundTurbineGovernorDynamics::CrossCompoundTurbineGovernorDynamics() : HighPressureSynchronousMachineDynamics(nullptr), LowPressureSynchronousMachineDynamics(nullptr) {}; +CrossCompoundTurbineGovernorDynamics::~CrossCompoundTurbineGovernorDynamics() {}; + + + + + +bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics(BaseClass*, BaseClass*); +bool assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CrossCompoundTurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HighPressureSynchronousMachineDynamics != element2) + { + element->HighPressureSynchronousMachineDynamics = element2; + return assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CrossCompoundTurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LowPressureSynchronousMachineDynamics != element2) + { + element->LowPressureSynchronousMachineDynamics = element2; + return assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char CrossCompoundTurbineGovernorDynamics::debugName[] = "CrossCompoundTurbineGovernorDynamics"; +const char* CrossCompoundTurbineGovernorDynamics::debugString() const +{ + return CrossCompoundTurbineGovernorDynamics::debugName; +} + +void CrossCompoundTurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:CrossCompoundTurbineGovernorDynamics"), &CrossCompoundTurbineGovernorDynamics_factory)); +} + +void CrossCompoundTurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner CrossCompoundTurbineGovernorDynamics::declare() +{ + return BaseClassDefiner(CrossCompoundTurbineGovernorDynamics::addConstructToMap, CrossCompoundTurbineGovernorDynamics::addPrimitiveAssignFnsToMap, CrossCompoundTurbineGovernorDynamics::addClassAssignFnsToMap, CrossCompoundTurbineGovernorDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* CrossCompoundTurbineGovernorDynamics_factory() + { + return new CrossCompoundTurbineGovernorDynamics; + } +} diff --git a/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp new file mode 100644 index 000000000..1ddc1992d --- /dev/null +++ b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp @@ -0,0 +1,42 @@ +#ifndef CrossCompoundTurbineGovernorDynamics_H +#define CrossCompoundTurbineGovernorDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class CrossCompoundTurbineGovernorDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CrossCompoundTurbineGovernorDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/CsConverter.cpp b/CGMES_3.0.0/CsConverter.cpp new file mode 100644 index 000000000..df18e6712 --- /dev/null +++ b/CGMES_3.0.0/CsConverter.cpp @@ -0,0 +1,291 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CsConverter.hpp" + +#include +#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() {}; + + + +bool assign_CsConverter_alpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->alpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_gamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gamma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_maxAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxAlpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_maxGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxGamma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_maxIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxIdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_minAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minAlpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_minGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minGamma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_minIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minIdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operatingMode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pPccControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_ratedIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedIdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_targetAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetAlpha; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CsConverter_targetGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetGamma; + if (buffer.fail()) + return false; + else + 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) +{ + 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; +} + + + + + + + + + + + + + + + +const char CsConverter::debugName[] = "CsConverter"; +const char* CsConverter::debugString() const +{ + return CsConverter::debugName; +} + +void CsConverter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CsConverter.CSCDynamics"), &assign_CsConverter_CSCDynamics)); +} + +const BaseClassDefiner CsConverter::declare() +{ + return BaseClassDefiner(CsConverter::addConstructToMap, CsConverter::addPrimitiveAssignFnsToMap, CsConverter::addClassAssignFnsToMap, CsConverter::debugName); +} + +namespace CIMPP +{ + BaseClass* CsConverter_factory() + { + return new CsConverter; + } +} diff --git a/CGMES_3.0.0/CsConverter.hpp b/CGMES_3.0.0/CsConverter.hpp new file mode 100644 index 000000000..758f63e14 --- /dev/null +++ b/CGMES_3.0.0/CsConverter.hpp @@ -0,0 +1,59 @@ +#ifndef CsConverter_H +#define CsConverter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCConverter.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "CsOperatingModeKind.hpp" +#include "CsPpccControlKind.hpp" +#include "CurrentFlow.hpp" + +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. + */ + class CsConverter : public ACDCConverter + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CsConverter_factory(); +} +#endif diff --git a/CGMES_3.0.0/CsOperatingModeKind.cpp b/CGMES_3.0.0/CsOperatingModeKind.cpp new file mode 100644 index 000000000..61074c399 --- /dev/null +++ b/CGMES_3.0.0/CsOperatingModeKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CsOperatingModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CsOperatingModeKind& CsOperatingModeKind::operator=(CsOperatingModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +CsOperatingModeKind::operator CsOperatingModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CsOperatingModeKind::debugName[] = "CsOperatingModeKind"; +const char* CsOperatingModeKind::debugString() const +{ + return CsOperatingModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CsOperatingModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "CsOperatingModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "inverter") + { + rop = CsOperatingModeKind::inverter; + return lop; + } + if(EnumSymbol == "rectifier") + { + rop = CsOperatingModeKind::rectifier; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CsOperatingModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == CsOperatingModeKind::inverter) + { + EnumSymbol = "inverter"; + } + if (obj.value == CsOperatingModeKind::rectifier) + { + EnumSymbol = "rectifier"; + } + + if (!EnumSymbol.empty()) + { + os << "CsOperatingModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/CsOperatingModeKind.hpp b/CGMES_3.0.0/CsOperatingModeKind.hpp new file mode 100644 index 000000000..0f855a35c --- /dev/null +++ b/CGMES_3.0.0/CsOperatingModeKind.hpp @@ -0,0 +1,46 @@ +#ifndef CsOperatingModeKind_H +#define CsOperatingModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + inverter, + /** + * Operating as rectifier, which is the power sending end. + */ + rectifier, + }; + + CsOperatingModeKind() : value(), initialized(false) {} + CsOperatingModeKind(CsOperatingModeKind_ENUM value) : value(value), initialized(true) {} + + CsOperatingModeKind& operator=(CsOperatingModeKind_ENUM rop); + operator CsOperatingModeKind_ENUM() const; + + CsOperatingModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, CsOperatingModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const CsOperatingModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/CsPpccControlKind.cpp b/CGMES_3.0.0/CsPpccControlKind.cpp new file mode 100644 index 000000000..e4e9aa9b2 --- /dev/null +++ b/CGMES_3.0.0/CsPpccControlKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CsPpccControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CsPpccControlKind& CsPpccControlKind::operator=(CsPpccControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +CsPpccControlKind::operator CsPpccControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CsPpccControlKind::debugName[] = "CsPpccControlKind"; +const char* CsPpccControlKind::debugString() const +{ + return CsPpccControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CsPpccControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "CsPpccControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "activePower") + { + rop = CsPpccControlKind::activePower; + return lop; + } + if(EnumSymbol == "dcVoltage") + { + rop = CsPpccControlKind::dcVoltage; + return lop; + } + if(EnumSymbol == "dcCurrent") + { + rop = CsPpccControlKind::dcCurrent; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CsPpccControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == CsPpccControlKind::activePower) + { + EnumSymbol = "activePower"; + } + if (obj.value == CsPpccControlKind::dcVoltage) + { + EnumSymbol = "dcVoltage"; + } + if (obj.value == CsPpccControlKind::dcCurrent) + { + EnumSymbol = "dcCurrent"; + } + + if (!EnumSymbol.empty()) + { + os << "CsPpccControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/CsPpccControlKind.hpp b/CGMES_3.0.0/CsPpccControlKind.hpp new file mode 100644 index 000000000..6ddd26742 --- /dev/null +++ b/CGMES_3.0.0/CsPpccControlKind.hpp @@ -0,0 +1,50 @@ +#ifndef CsPpccControlKind_H +#define CsPpccControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + activePower, + /** + * Control is DC voltage with target value provided by ACDCConverter.targetUdc. + */ + dcVoltage, + /** + * Control is DC current with target value provided by CsConverter.targetIdc. + */ + dcCurrent, + }; + + CsPpccControlKind() : value(), initialized(false) {} + CsPpccControlKind(CsPpccControlKind_ENUM value) : value(value), initialized(true) {} + + CsPpccControlKind& operator=(CsPpccControlKind_ENUM rop); + operator CsPpccControlKind_ENUM() const; + + CsPpccControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, CsPpccControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const CsPpccControlKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Currency.cpp b/CGMES_3.0.0/Currency.cpp new file mode 100644 index 000000000..42d2e490d --- /dev/null +++ b/CGMES_3.0.0/Currency.cpp @@ -0,0 +1,1521 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Currency.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Currency& Currency::operator=(Currency_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +Currency::operator Currency_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Currency::debugName[] = "Currency"; +const char* Currency::debugString() const +{ + return Currency::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Currency& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "Currency") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "AED") + { + rop = Currency::AED; + return lop; + } + if(EnumSymbol == "AFN") + { + rop = Currency::AFN; + return lop; + } + if(EnumSymbol == "ALL") + { + rop = Currency::ALL; + return lop; + } + if(EnumSymbol == "AMD") + { + rop = Currency::AMD; + return lop; + } + if(EnumSymbol == "ANG") + { + rop = Currency::ANG; + return lop; + } + if(EnumSymbol == "AOA") + { + rop = Currency::AOA; + return lop; + } + if(EnumSymbol == "ARS") + { + rop = Currency::ARS; + return lop; + } + if(EnumSymbol == "AUD") + { + rop = Currency::AUD; + return lop; + } + if(EnumSymbol == "AWG") + { + rop = Currency::AWG; + return lop; + } + if(EnumSymbol == "AZN") + { + rop = Currency::AZN; + return lop; + } + if(EnumSymbol == "BAM") + { + rop = Currency::BAM; + return lop; + } + if(EnumSymbol == "BBD") + { + rop = Currency::BBD; + return lop; + } + if(EnumSymbol == "BDT") + { + rop = Currency::BDT; + return lop; + } + if(EnumSymbol == "BGN") + { + rop = Currency::BGN; + return lop; + } + if(EnumSymbol == "BHD") + { + rop = Currency::BHD; + return lop; + } + if(EnumSymbol == "BIF") + { + rop = Currency::BIF; + return lop; + } + if(EnumSymbol == "BMD") + { + rop = Currency::BMD; + return lop; + } + if(EnumSymbol == "BND") + { + rop = Currency::BND; + return lop; + } + if(EnumSymbol == "BOB") + { + rop = Currency::BOB; + return lop; + } + if(EnumSymbol == "BOV") + { + rop = Currency::BOV; + return lop; + } + if(EnumSymbol == "BRL") + { + rop = Currency::BRL; + return lop; + } + if(EnumSymbol == "BSD") + { + rop = Currency::BSD; + return lop; + } + if(EnumSymbol == "BTN") + { + rop = Currency::BTN; + return lop; + } + if(EnumSymbol == "BWP") + { + rop = Currency::BWP; + return lop; + } + if(EnumSymbol == "BYR") + { + rop = Currency::BYR; + return lop; + } + if(EnumSymbol == "BZD") + { + rop = Currency::BZD; + return lop; + } + if(EnumSymbol == "CAD") + { + rop = Currency::CAD; + return lop; + } + if(EnumSymbol == "CDF") + { + rop = Currency::CDF; + return lop; + } + if(EnumSymbol == "CHF") + { + rop = Currency::CHF; + return lop; + } + if(EnumSymbol == "CLF") + { + rop = Currency::CLF; + return lop; + } + if(EnumSymbol == "CLP") + { + rop = Currency::CLP; + return lop; + } + if(EnumSymbol == "CNY") + { + rop = Currency::CNY; + return lop; + } + if(EnumSymbol == "COP") + { + rop = Currency::COP; + return lop; + } + if(EnumSymbol == "COU") + { + rop = Currency::COU; + return lop; + } + if(EnumSymbol == "CRC") + { + rop = Currency::CRC; + return lop; + } + if(EnumSymbol == "CUC") + { + rop = Currency::CUC; + return lop; + } + if(EnumSymbol == "CUP") + { + rop = Currency::CUP; + return lop; + } + if(EnumSymbol == "CVE") + { + rop = Currency::CVE; + return lop; + } + if(EnumSymbol == "CZK") + { + rop = Currency::CZK; + return lop; + } + if(EnumSymbol == "DJF") + { + rop = Currency::DJF; + return lop; + } + if(EnumSymbol == "DKK") + { + rop = Currency::DKK; + return lop; + } + if(EnumSymbol == "DOP") + { + rop = Currency::DOP; + return lop; + } + if(EnumSymbol == "DZD") + { + rop = Currency::DZD; + return lop; + } + if(EnumSymbol == "EEK") + { + rop = Currency::EEK; + return lop; + } + if(EnumSymbol == "EGP") + { + rop = Currency::EGP; + return lop; + } + if(EnumSymbol == "ERN") + { + rop = Currency::ERN; + return lop; + } + if(EnumSymbol == "ETB") + { + rop = Currency::ETB; + return lop; + } + if(EnumSymbol == "EUR") + { + rop = Currency::EUR; + return lop; + } + if(EnumSymbol == "FJD") + { + rop = Currency::FJD; + return lop; + } + if(EnumSymbol == "FKP") + { + rop = Currency::FKP; + return lop; + } + if(EnumSymbol == "GBP") + { + rop = Currency::GBP; + return lop; + } + if(EnumSymbol == "GEL") + { + rop = Currency::GEL; + return lop; + } + if(EnumSymbol == "GHS") + { + rop = Currency::GHS; + return lop; + } + if(EnumSymbol == "GIP") + { + rop = Currency::GIP; + return lop; + } + if(EnumSymbol == "GMD") + { + rop = Currency::GMD; + return lop; + } + if(EnumSymbol == "GNF") + { + rop = Currency::GNF; + return lop; + } + if(EnumSymbol == "GTQ") + { + rop = Currency::GTQ; + return lop; + } + if(EnumSymbol == "GYD") + { + rop = Currency::GYD; + return lop; + } + if(EnumSymbol == "HKD") + { + rop = Currency::HKD; + return lop; + } + if(EnumSymbol == "HNL") + { + rop = Currency::HNL; + return lop; + } + if(EnumSymbol == "HRK") + { + rop = Currency::HRK; + return lop; + } + if(EnumSymbol == "HTG") + { + rop = Currency::HTG; + return lop; + } + if(EnumSymbol == "HUF") + { + rop = Currency::HUF; + return lop; + } + if(EnumSymbol == "IDR") + { + rop = Currency::IDR; + return lop; + } + if(EnumSymbol == "ILS") + { + rop = Currency::ILS; + return lop; + } + if(EnumSymbol == "INR") + { + rop = Currency::INR; + return lop; + } + if(EnumSymbol == "IQD") + { + rop = Currency::IQD; + return lop; + } + if(EnumSymbol == "IRR") + { + rop = Currency::IRR; + return lop; + } + if(EnumSymbol == "ISK") + { + rop = Currency::ISK; + return lop; + } + if(EnumSymbol == "JMD") + { + rop = Currency::JMD; + return lop; + } + if(EnumSymbol == "JOD") + { + rop = Currency::JOD; + return lop; + } + if(EnumSymbol == "JPY") + { + rop = Currency::JPY; + return lop; + } + if(EnumSymbol == "KES") + { + rop = Currency::KES; + return lop; + } + if(EnumSymbol == "KGS") + { + rop = Currency::KGS; + return lop; + } + if(EnumSymbol == "KHR") + { + rop = Currency::KHR; + return lop; + } + if(EnumSymbol == "KMF") + { + rop = Currency::KMF; + return lop; + } + if(EnumSymbol == "KPW") + { + rop = Currency::KPW; + return lop; + } + if(EnumSymbol == "KRW") + { + rop = Currency::KRW; + return lop; + } + if(EnumSymbol == "KWD") + { + rop = Currency::KWD; + return lop; + } + if(EnumSymbol == "KYD") + { + rop = Currency::KYD; + return lop; + } + if(EnumSymbol == "KZT") + { + rop = Currency::KZT; + return lop; + } + if(EnumSymbol == "LAK") + { + rop = Currency::LAK; + return lop; + } + if(EnumSymbol == "LBP") + { + rop = Currency::LBP; + return lop; + } + if(EnumSymbol == "LKR") + { + rop = Currency::LKR; + return lop; + } + if(EnumSymbol == "LRD") + { + rop = Currency::LRD; + return lop; + } + if(EnumSymbol == "LSL") + { + rop = Currency::LSL; + return lop; + } + if(EnumSymbol == "LTL") + { + rop = Currency::LTL; + return lop; + } + if(EnumSymbol == "LVL") + { + rop = Currency::LVL; + return lop; + } + if(EnumSymbol == "LYD") + { + rop = Currency::LYD; + return lop; + } + if(EnumSymbol == "MAD") + { + rop = Currency::MAD; + return lop; + } + if(EnumSymbol == "MDL") + { + rop = Currency::MDL; + return lop; + } + if(EnumSymbol == "MGA") + { + rop = Currency::MGA; + return lop; + } + if(EnumSymbol == "MKD") + { + rop = Currency::MKD; + return lop; + } + if(EnumSymbol == "MMK") + { + rop = Currency::MMK; + return lop; + } + if(EnumSymbol == "MNT") + { + rop = Currency::MNT; + return lop; + } + if(EnumSymbol == "MOP") + { + rop = Currency::MOP; + return lop; + } + if(EnumSymbol == "MRO") + { + rop = Currency::MRO; + return lop; + } + if(EnumSymbol == "MUR") + { + rop = Currency::MUR; + return lop; + } + if(EnumSymbol == "MVR") + { + rop = Currency::MVR; + return lop; + } + if(EnumSymbol == "MWK") + { + rop = Currency::MWK; + return lop; + } + if(EnumSymbol == "MXN") + { + rop = Currency::MXN; + return lop; + } + if(EnumSymbol == "MYR") + { + rop = Currency::MYR; + return lop; + } + if(EnumSymbol == "MZN") + { + rop = Currency::MZN; + return lop; + } + if(EnumSymbol == "NAD") + { + rop = Currency::NAD; + return lop; + } + if(EnumSymbol == "NGN") + { + rop = Currency::NGN; + return lop; + } + if(EnumSymbol == "NIO") + { + rop = Currency::NIO; + return lop; + } + if(EnumSymbol == "NOK") + { + rop = Currency::NOK; + return lop; + } + if(EnumSymbol == "NPR") + { + rop = Currency::NPR; + return lop; + } + if(EnumSymbol == "NZD") + { + rop = Currency::NZD; + return lop; + } + if(EnumSymbol == "OMR") + { + rop = Currency::OMR; + return lop; + } + if(EnumSymbol == "PAB") + { + rop = Currency::PAB; + return lop; + } + if(EnumSymbol == "PEN") + { + rop = Currency::PEN; + return lop; + } + if(EnumSymbol == "PGK") + { + rop = Currency::PGK; + return lop; + } + if(EnumSymbol == "PHP") + { + rop = Currency::PHP; + return lop; + } + if(EnumSymbol == "PKR") + { + rop = Currency::PKR; + return lop; + } + if(EnumSymbol == "PLN") + { + rop = Currency::PLN; + return lop; + } + if(EnumSymbol == "PYG") + { + rop = Currency::PYG; + return lop; + } + if(EnumSymbol == "QAR") + { + rop = Currency::QAR; + return lop; + } + if(EnumSymbol == "RON") + { + rop = Currency::RON; + return lop; + } + if(EnumSymbol == "RSD") + { + rop = Currency::RSD; + return lop; + } + if(EnumSymbol == "RUB") + { + rop = Currency::RUB; + return lop; + } + if(EnumSymbol == "RWF") + { + rop = Currency::RWF; + return lop; + } + if(EnumSymbol == "SAR") + { + rop = Currency::SAR; + return lop; + } + if(EnumSymbol == "SBD") + { + rop = Currency::SBD; + return lop; + } + if(EnumSymbol == "SCR") + { + rop = Currency::SCR; + return lop; + } + if(EnumSymbol == "SDG") + { + rop = Currency::SDG; + return lop; + } + if(EnumSymbol == "SEK") + { + rop = Currency::SEK; + return lop; + } + if(EnumSymbol == "SGD") + { + rop = Currency::SGD; + return lop; + } + if(EnumSymbol == "SHP") + { + rop = Currency::SHP; + return lop; + } + if(EnumSymbol == "SLL") + { + rop = Currency::SLL; + return lop; + } + if(EnumSymbol == "SOS") + { + rop = Currency::SOS; + return lop; + } + if(EnumSymbol == "SRD") + { + rop = Currency::SRD; + return lop; + } + if(EnumSymbol == "STD") + { + rop = Currency::STD; + return lop; + } + if(EnumSymbol == "SYP") + { + rop = Currency::SYP; + return lop; + } + if(EnumSymbol == "SZL") + { + rop = Currency::SZL; + return lop; + } + if(EnumSymbol == "THB") + { + rop = Currency::THB; + return lop; + } + if(EnumSymbol == "TJS") + { + rop = Currency::TJS; + return lop; + } + if(EnumSymbol == "TMT") + { + rop = Currency::TMT; + return lop; + } + if(EnumSymbol == "TND") + { + rop = Currency::TND; + return lop; + } + if(EnumSymbol == "TOP") + { + rop = Currency::TOP; + return lop; + } + if(EnumSymbol == "TRY") + { + rop = Currency::TRY; + return lop; + } + if(EnumSymbol == "TTD") + { + rop = Currency::TTD; + return lop; + } + if(EnumSymbol == "TWD") + { + rop = Currency::TWD; + return lop; + } + if(EnumSymbol == "TZS") + { + rop = Currency::TZS; + return lop; + } + if(EnumSymbol == "UAH") + { + rop = Currency::UAH; + return lop; + } + if(EnumSymbol == "UGX") + { + rop = Currency::UGX; + return lop; + } + if(EnumSymbol == "USD") + { + rop = Currency::USD; + return lop; + } + if(EnumSymbol == "UYU") + { + rop = Currency::UYU; + return lop; + } + if(EnumSymbol == "UZS") + { + rop = Currency::UZS; + return lop; + } + if(EnumSymbol == "VEF") + { + rop = Currency::VEF; + return lop; + } + if(EnumSymbol == "VND") + { + rop = Currency::VND; + return lop; + } + if(EnumSymbol == "VUV") + { + rop = Currency::VUV; + return lop; + } + if(EnumSymbol == "WST") + { + rop = Currency::WST; + return lop; + } + if(EnumSymbol == "XAF") + { + rop = Currency::XAF; + return lop; + } + if(EnumSymbol == "XCD") + { + rop = Currency::XCD; + return lop; + } + if(EnumSymbol == "XOF") + { + rop = Currency::XOF; + return lop; + } + if(EnumSymbol == "XPF") + { + rop = Currency::XPF; + return lop; + } + if(EnumSymbol == "YER") + { + rop = Currency::YER; + return lop; + } + if(EnumSymbol == "ZAR") + { + rop = Currency::ZAR; + return lop; + } + if(EnumSymbol == "ZMK") + { + rop = Currency::ZMK; + return lop; + } + if(EnumSymbol == "ZWL") + { + rop = Currency::ZWL; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Currency& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == Currency::AED) + { + EnumSymbol = "AED"; + } + if (obj.value == Currency::AFN) + { + EnumSymbol = "AFN"; + } + if (obj.value == Currency::ALL) + { + EnumSymbol = "ALL"; + } + if (obj.value == Currency::AMD) + { + EnumSymbol = "AMD"; + } + if (obj.value == Currency::ANG) + { + EnumSymbol = "ANG"; + } + if (obj.value == Currency::AOA) + { + EnumSymbol = "AOA"; + } + if (obj.value == Currency::ARS) + { + EnumSymbol = "ARS"; + } + if (obj.value == Currency::AUD) + { + EnumSymbol = "AUD"; + } + if (obj.value == Currency::AWG) + { + EnumSymbol = "AWG"; + } + if (obj.value == Currency::AZN) + { + EnumSymbol = "AZN"; + } + if (obj.value == Currency::BAM) + { + EnumSymbol = "BAM"; + } + if (obj.value == Currency::BBD) + { + EnumSymbol = "BBD"; + } + if (obj.value == Currency::BDT) + { + EnumSymbol = "BDT"; + } + if (obj.value == Currency::BGN) + { + EnumSymbol = "BGN"; + } + if (obj.value == Currency::BHD) + { + EnumSymbol = "BHD"; + } + if (obj.value == Currency::BIF) + { + EnumSymbol = "BIF"; + } + if (obj.value == Currency::BMD) + { + EnumSymbol = "BMD"; + } + if (obj.value == Currency::BND) + { + EnumSymbol = "BND"; + } + if (obj.value == Currency::BOB) + { + EnumSymbol = "BOB"; + } + if (obj.value == Currency::BOV) + { + EnumSymbol = "BOV"; + } + if (obj.value == Currency::BRL) + { + EnumSymbol = "BRL"; + } + if (obj.value == Currency::BSD) + { + EnumSymbol = "BSD"; + } + if (obj.value == Currency::BTN) + { + EnumSymbol = "BTN"; + } + if (obj.value == Currency::BWP) + { + EnumSymbol = "BWP"; + } + if (obj.value == Currency::BYR) + { + EnumSymbol = "BYR"; + } + if (obj.value == Currency::BZD) + { + EnumSymbol = "BZD"; + } + if (obj.value == Currency::CAD) + { + EnumSymbol = "CAD"; + } + if (obj.value == Currency::CDF) + { + EnumSymbol = "CDF"; + } + if (obj.value == Currency::CHF) + { + EnumSymbol = "CHF"; + } + if (obj.value == Currency::CLF) + { + EnumSymbol = "CLF"; + } + if (obj.value == Currency::CLP) + { + EnumSymbol = "CLP"; + } + if (obj.value == Currency::CNY) + { + EnumSymbol = "CNY"; + } + if (obj.value == Currency::COP) + { + EnumSymbol = "COP"; + } + if (obj.value == Currency::COU) + { + EnumSymbol = "COU"; + } + if (obj.value == Currency::CRC) + { + EnumSymbol = "CRC"; + } + if (obj.value == Currency::CUC) + { + EnumSymbol = "CUC"; + } + if (obj.value == Currency::CUP) + { + EnumSymbol = "CUP"; + } + if (obj.value == Currency::CVE) + { + EnumSymbol = "CVE"; + } + if (obj.value == Currency::CZK) + { + EnumSymbol = "CZK"; + } + if (obj.value == Currency::DJF) + { + EnumSymbol = "DJF"; + } + if (obj.value == Currency::DKK) + { + EnumSymbol = "DKK"; + } + if (obj.value == Currency::DOP) + { + EnumSymbol = "DOP"; + } + if (obj.value == Currency::DZD) + { + EnumSymbol = "DZD"; + } + if (obj.value == Currency::EEK) + { + EnumSymbol = "EEK"; + } + if (obj.value == Currency::EGP) + { + EnumSymbol = "EGP"; + } + if (obj.value == Currency::ERN) + { + EnumSymbol = "ERN"; + } + if (obj.value == Currency::ETB) + { + EnumSymbol = "ETB"; + } + if (obj.value == Currency::EUR) + { + EnumSymbol = "EUR"; + } + if (obj.value == Currency::FJD) + { + EnumSymbol = "FJD"; + } + if (obj.value == Currency::FKP) + { + EnumSymbol = "FKP"; + } + if (obj.value == Currency::GBP) + { + EnumSymbol = "GBP"; + } + if (obj.value == Currency::GEL) + { + EnumSymbol = "GEL"; + } + if (obj.value == Currency::GHS) + { + EnumSymbol = "GHS"; + } + if (obj.value == Currency::GIP) + { + EnumSymbol = "GIP"; + } + if (obj.value == Currency::GMD) + { + EnumSymbol = "GMD"; + } + if (obj.value == Currency::GNF) + { + EnumSymbol = "GNF"; + } + if (obj.value == Currency::GTQ) + { + EnumSymbol = "GTQ"; + } + if (obj.value == Currency::GYD) + { + EnumSymbol = "GYD"; + } + if (obj.value == Currency::HKD) + { + EnumSymbol = "HKD"; + } + if (obj.value == Currency::HNL) + { + EnumSymbol = "HNL"; + } + if (obj.value == Currency::HRK) + { + EnumSymbol = "HRK"; + } + if (obj.value == Currency::HTG) + { + EnumSymbol = "HTG"; + } + if (obj.value == Currency::HUF) + { + EnumSymbol = "HUF"; + } + if (obj.value == Currency::IDR) + { + EnumSymbol = "IDR"; + } + if (obj.value == Currency::ILS) + { + EnumSymbol = "ILS"; + } + if (obj.value == Currency::INR) + { + EnumSymbol = "INR"; + } + if (obj.value == Currency::IQD) + { + EnumSymbol = "IQD"; + } + if (obj.value == Currency::IRR) + { + EnumSymbol = "IRR"; + } + if (obj.value == Currency::ISK) + { + EnumSymbol = "ISK"; + } + if (obj.value == Currency::JMD) + { + EnumSymbol = "JMD"; + } + if (obj.value == Currency::JOD) + { + EnumSymbol = "JOD"; + } + if (obj.value == Currency::JPY) + { + EnumSymbol = "JPY"; + } + if (obj.value == Currency::KES) + { + EnumSymbol = "KES"; + } + if (obj.value == Currency::KGS) + { + EnumSymbol = "KGS"; + } + if (obj.value == Currency::KHR) + { + EnumSymbol = "KHR"; + } + if (obj.value == Currency::KMF) + { + EnumSymbol = "KMF"; + } + if (obj.value == Currency::KPW) + { + EnumSymbol = "KPW"; + } + if (obj.value == Currency::KRW) + { + EnumSymbol = "KRW"; + } + if (obj.value == Currency::KWD) + { + EnumSymbol = "KWD"; + } + if (obj.value == Currency::KYD) + { + EnumSymbol = "KYD"; + } + if (obj.value == Currency::KZT) + { + EnumSymbol = "KZT"; + } + if (obj.value == Currency::LAK) + { + EnumSymbol = "LAK"; + } + if (obj.value == Currency::LBP) + { + EnumSymbol = "LBP"; + } + if (obj.value == Currency::LKR) + { + EnumSymbol = "LKR"; + } + if (obj.value == Currency::LRD) + { + EnumSymbol = "LRD"; + } + if (obj.value == Currency::LSL) + { + EnumSymbol = "LSL"; + } + if (obj.value == Currency::LTL) + { + EnumSymbol = "LTL"; + } + if (obj.value == Currency::LVL) + { + EnumSymbol = "LVL"; + } + if (obj.value == Currency::LYD) + { + EnumSymbol = "LYD"; + } + if (obj.value == Currency::MAD) + { + EnumSymbol = "MAD"; + } + if (obj.value == Currency::MDL) + { + EnumSymbol = "MDL"; + } + if (obj.value == Currency::MGA) + { + EnumSymbol = "MGA"; + } + if (obj.value == Currency::MKD) + { + EnumSymbol = "MKD"; + } + if (obj.value == Currency::MMK) + { + EnumSymbol = "MMK"; + } + if (obj.value == Currency::MNT) + { + EnumSymbol = "MNT"; + } + if (obj.value == Currency::MOP) + { + EnumSymbol = "MOP"; + } + if (obj.value == Currency::MRO) + { + EnumSymbol = "MRO"; + } + if (obj.value == Currency::MUR) + { + EnumSymbol = "MUR"; + } + if (obj.value == Currency::MVR) + { + EnumSymbol = "MVR"; + } + if (obj.value == Currency::MWK) + { + EnumSymbol = "MWK"; + } + if (obj.value == Currency::MXN) + { + EnumSymbol = "MXN"; + } + if (obj.value == Currency::MYR) + { + EnumSymbol = "MYR"; + } + if (obj.value == Currency::MZN) + { + EnumSymbol = "MZN"; + } + if (obj.value == Currency::NAD) + { + EnumSymbol = "NAD"; + } + if (obj.value == Currency::NGN) + { + EnumSymbol = "NGN"; + } + if (obj.value == Currency::NIO) + { + EnumSymbol = "NIO"; + } + if (obj.value == Currency::NOK) + { + EnumSymbol = "NOK"; + } + if (obj.value == Currency::NPR) + { + EnumSymbol = "NPR"; + } + if (obj.value == Currency::NZD) + { + EnumSymbol = "NZD"; + } + if (obj.value == Currency::OMR) + { + EnumSymbol = "OMR"; + } + if (obj.value == Currency::PAB) + { + EnumSymbol = "PAB"; + } + if (obj.value == Currency::PEN) + { + EnumSymbol = "PEN"; + } + if (obj.value == Currency::PGK) + { + EnumSymbol = "PGK"; + } + if (obj.value == Currency::PHP) + { + EnumSymbol = "PHP"; + } + if (obj.value == Currency::PKR) + { + EnumSymbol = "PKR"; + } + if (obj.value == Currency::PLN) + { + EnumSymbol = "PLN"; + } + if (obj.value == Currency::PYG) + { + EnumSymbol = "PYG"; + } + if (obj.value == Currency::QAR) + { + EnumSymbol = "QAR"; + } + if (obj.value == Currency::RON) + { + EnumSymbol = "RON"; + } + if (obj.value == Currency::RSD) + { + EnumSymbol = "RSD"; + } + if (obj.value == Currency::RUB) + { + EnumSymbol = "RUB"; + } + if (obj.value == Currency::RWF) + { + EnumSymbol = "RWF"; + } + if (obj.value == Currency::SAR) + { + EnumSymbol = "SAR"; + } + if (obj.value == Currency::SBD) + { + EnumSymbol = "SBD"; + } + if (obj.value == Currency::SCR) + { + EnumSymbol = "SCR"; + } + if (obj.value == Currency::SDG) + { + EnumSymbol = "SDG"; + } + if (obj.value == Currency::SEK) + { + EnumSymbol = "SEK"; + } + if (obj.value == Currency::SGD) + { + EnumSymbol = "SGD"; + } + if (obj.value == Currency::SHP) + { + EnumSymbol = "SHP"; + } + if (obj.value == Currency::SLL) + { + EnumSymbol = "SLL"; + } + if (obj.value == Currency::SOS) + { + EnumSymbol = "SOS"; + } + if (obj.value == Currency::SRD) + { + EnumSymbol = "SRD"; + } + if (obj.value == Currency::STD) + { + EnumSymbol = "STD"; + } + if (obj.value == Currency::SYP) + { + EnumSymbol = "SYP"; + } + if (obj.value == Currency::SZL) + { + EnumSymbol = "SZL"; + } + if (obj.value == Currency::THB) + { + EnumSymbol = "THB"; + } + if (obj.value == Currency::TJS) + { + EnumSymbol = "TJS"; + } + if (obj.value == Currency::TMT) + { + EnumSymbol = "TMT"; + } + if (obj.value == Currency::TND) + { + EnumSymbol = "TND"; + } + if (obj.value == Currency::TOP) + { + EnumSymbol = "TOP"; + } + if (obj.value == Currency::TRY) + { + EnumSymbol = "TRY"; + } + if (obj.value == Currency::TTD) + { + EnumSymbol = "TTD"; + } + if (obj.value == Currency::TWD) + { + EnumSymbol = "TWD"; + } + if (obj.value == Currency::TZS) + { + EnumSymbol = "TZS"; + } + if (obj.value == Currency::UAH) + { + EnumSymbol = "UAH"; + } + if (obj.value == Currency::UGX) + { + EnumSymbol = "UGX"; + } + if (obj.value == Currency::USD) + { + EnumSymbol = "USD"; + } + if (obj.value == Currency::UYU) + { + EnumSymbol = "UYU"; + } + if (obj.value == Currency::UZS) + { + EnumSymbol = "UZS"; + } + if (obj.value == Currency::VEF) + { + EnumSymbol = "VEF"; + } + if (obj.value == Currency::VND) + { + EnumSymbol = "VND"; + } + if (obj.value == Currency::VUV) + { + EnumSymbol = "VUV"; + } + if (obj.value == Currency::WST) + { + EnumSymbol = "WST"; + } + if (obj.value == Currency::XAF) + { + EnumSymbol = "XAF"; + } + if (obj.value == Currency::XCD) + { + EnumSymbol = "XCD"; + } + if (obj.value == Currency::XOF) + { + EnumSymbol = "XOF"; + } + if (obj.value == Currency::XPF) + { + EnumSymbol = "XPF"; + } + if (obj.value == Currency::YER) + { + EnumSymbol = "YER"; + } + if (obj.value == Currency::ZAR) + { + EnumSymbol = "ZAR"; + } + if (obj.value == Currency::ZMK) + { + EnumSymbol = "ZMK"; + } + if (obj.value == Currency::ZWL) + { + EnumSymbol = "ZWL"; + } + + if (!EnumSymbol.empty()) + { + os << "Currency." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/Currency.hpp b/CGMES_3.0.0/Currency.hpp new file mode 100644 index 000000000..21cec965c --- /dev/null +++ b/CGMES_3.0.0/Currency.hpp @@ -0,0 +1,682 @@ +#ifndef Currency_H +#define Currency_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Monetary currencies. ISO 4217 standard including 3-character currency code. + */ + class Currency + { + public: + enum Currency_ENUM + { + /** + * United Arab Emirates dirham. + */ + AED, + /** + * Afghan afghani. + */ + AFN, + /** + * Albanian lek. + */ + ALL, + /** + * Armenian dram. + */ + AMD, + /** + * Netherlands Antillean guilder. + */ + ANG, + /** + * Angolan kwanza. + */ + AOA, + /** + * Argentine peso. + */ + ARS, + /** + * Australian dollar. + */ + AUD, + /** + * Aruban florin. + */ + AWG, + /** + * Azerbaijani manat. + */ + AZN, + /** + * Bosnia and Herzegovina convertible mark. + */ + BAM, + /** + * Barbados dollar. + */ + BBD, + /** + * Bangladeshi taka. + */ + BDT, + /** + * Bulgarian lev. + */ + BGN, + /** + * Bahraini dinar. + */ + BHD, + /** + * Burundian franc. + */ + BIF, + /** + * Bermudian dollar (customarily known as Bermuda dollar). + */ + BMD, + /** + * Brunei dollar. + */ + BND, + /** + * Boliviano. + */ + BOB, + /** + * Bolivian Mvdol (funds code). + */ + BOV, + /** + * Brazilian real. + */ + BRL, + /** + * Bahamian dollar. + */ + BSD, + /** + * Bhutanese ngultrum. + */ + BTN, + /** + * Botswana pula. + */ + BWP, + /** + * Belarusian ruble. + */ + BYR, + /** + * Belize dollar. + */ + BZD, + /** + * Canadian dollar. + */ + CAD, + /** + * Congolese franc. + */ + CDF, + /** + * Swiss franc. + */ + CHF, + /** + * Unidad de Fomento (funds code), Chile. + */ + CLF, + /** + * Chilean peso. + */ + CLP, + /** + * Chinese yuan. + */ + CNY, + /** + * Colombian peso. + */ + COP, + /** + * Unidad de Valor Real. + */ + COU, + /** + * Costa Rican colon. + */ + CRC, + /** + * Cuban convertible peso. + */ + CUC, + /** + * Cuban peso. + */ + CUP, + /** + * Cape Verde escudo. + */ + CVE, + /** + * Czech koruna. + */ + CZK, + /** + * Djiboutian franc. + */ + DJF, + /** + * Danish krone. + */ + DKK, + /** + * Dominican peso. + */ + DOP, + /** + * Algerian dinar. + */ + DZD, + /** + * Estonian kroon. + */ + EEK, + /** + * Egyptian pound. + */ + EGP, + /** + * Eritrean nakfa. + */ + ERN, + /** + * Ethiopian birr. + */ + ETB, + /** + * Euro. + */ + EUR, + /** + * Fiji dollar. + */ + FJD, + /** + * Falkland Islands pound. + */ + FKP, + /** + * Pound sterling. + */ + GBP, + /** + * Georgian lari. + */ + GEL, + /** + * Ghanaian cedi. + */ + GHS, + /** + * Gibraltar pound. + */ + GIP, + /** + * Gambian dalasi. + */ + GMD, + /** + * Guinean franc. + */ + GNF, + /** + * Guatemalan quetzal. + */ + GTQ, + /** + * Guyanese dollar. + */ + GYD, + /** + * Hong Kong dollar. + */ + HKD, + /** + * Honduran lempira. + */ + HNL, + /** + * Croatian kuna. + */ + HRK, + /** + * Haitian gourde. + */ + HTG, + /** + * Hungarian forint. + */ + HUF, + /** + * Indonesian rupiah. + */ + IDR, + /** + * Israeli new sheqel. + */ + ILS, + /** + * Indian rupee. + */ + INR, + /** + * Iraqi dinar. + */ + IQD, + /** + * Iranian rial. + */ + IRR, + /** + * Icelandic króna. + */ + ISK, + /** + * Jamaican dollar. + */ + JMD, + /** + * Jordanian dinar. + */ + JOD, + /** + * Japanese yen. + */ + JPY, + /** + * Kenyan shilling. + */ + KES, + /** + * Kyrgyzstani som. + */ + KGS, + /** + * Cambodian riel. + */ + KHR, + /** + * Comoro franc. + */ + KMF, + /** + * North Korean won. + */ + KPW, + /** + * South Korean won. + */ + KRW, + /** + * Kuwaiti dinar. + */ + KWD, + /** + * Cayman Islands dollar. + */ + KYD, + /** + * Kazakhstani tenge. + */ + KZT, + /** + * Lao kip. + */ + LAK, + /** + * Lebanese pound. + */ + LBP, + /** + * Sri Lanka rupee. + */ + LKR, + /** + * Liberian dollar. + */ + LRD, + /** + * Lesotho loti. + */ + LSL, + /** + * Lithuanian litas. + */ + LTL, + /** + * Latvian lats. + */ + LVL, + /** + * Libyan dinar. + */ + LYD, + /** + * Moroccan dirham. + */ + MAD, + /** + * Moldovan leu. + */ + MDL, + /** + * Malagasy ariary. + */ + MGA, + /** + * Macedonian denar. + */ + MKD, + /** + * Myanma kyat. + */ + MMK, + /** + * Mongolian tugrik. + */ + MNT, + /** + * Macanese pataca. + */ + MOP, + /** + * Mauritanian ouguiya. + */ + MRO, + /** + * Mauritian rupee. + */ + MUR, + /** + * Maldivian rufiyaa. + */ + MVR, + /** + * Malawian kwacha. + */ + MWK, + /** + * Mexican peso. + */ + MXN, + /** + * Malaysian ringgit. + */ + MYR, + /** + * Mozambican metical. + */ + MZN, + /** + * Namibian dollar. + */ + NAD, + /** + * Nigerian naira. + */ + NGN, + /** + * Cordoba oro. + */ + NIO, + /** + * Norwegian krone. + */ + NOK, + /** + * Nepalese rupee. + */ + NPR, + /** + * New Zealand dollar. + */ + NZD, + /** + * Omani rial. + */ + OMR, + /** + * Panamanian balboa. + */ + PAB, + /** + * Peruvian nuevo sol. + */ + PEN, + /** + * Papua New Guinean kina. + */ + PGK, + /** + * Philippine peso. + */ + PHP, + /** + * Pakistani rupee. + */ + PKR, + /** + * Polish zloty. + */ + PLN, + /** + * Paraguayan guaraní. + */ + PYG, + /** + * Qatari rial. + */ + QAR, + /** + * Romanian new leu. + */ + RON, + /** + * Serbian dinar. + */ + RSD, + /** + * Russian rouble. + */ + RUB, + /** + * Rwandan franc. + */ + RWF, + /** + * Saudi riyal. + */ + SAR, + /** + * Solomon Islands dollar. + */ + SBD, + /** + * Seychelles rupee. + */ + SCR, + /** + * Sudanese pound. + */ + SDG, + /** + * Swedish krona/kronor. + */ + SEK, + /** + * Singapore dollar. + */ + SGD, + /** + * Saint Helena pound. + */ + SHP, + /** + * Sierra Leonean leone. + */ + SLL, + /** + * Somali shilling. + */ + SOS, + /** + * Surinamese dollar. + */ + SRD, + /** + * São Tomé and Príncipe dobra. + */ + STD, + /** + * Syrian pound. + */ + SYP, + /** + * Lilangeni. + */ + SZL, + /** + * Thai baht. + */ + THB, + /** + * Tajikistani somoni. + */ + TJS, + /** + * Turkmenistani manat. + */ + TMT, + /** + * Tunisian dinar. + */ + TND, + /** + * Tongan pa'anga. + */ + TOP, + /** + * Turkish lira. + */ + TRY, + /** + * Trinidad and Tobago dollar. + */ + TTD, + /** + * New Taiwan dollar. + */ + TWD, + /** + * Tanzanian shilling. + */ + TZS, + /** + * Ukrainian hryvnia. + */ + UAH, + /** + * Ugandan shilling. + */ + UGX, + /** + * United States dollar. + */ + USD, + /** + * Uruguayan peso. + */ + UYU, + /** + * Uzbekistan som. + */ + UZS, + /** + * Venezuelan bolívar fuerte. + */ + VEF, + /** + * Vietnamese Dong. + */ + VND, + /** + * Vanuatu vatu. + */ + VUV, + /** + * Samoan tala. + */ + WST, + /** + * CFA franc BEAC. + */ + XAF, + /** + * East Caribbean dollar. + */ + XCD, + /** + * CFA Franc BCEAO. + */ + XOF, + /** + * CFP franc. + */ + XPF, + /** + * Yemeni rial. + */ + YER, + /** + * South African rand. + */ + ZAR, + /** + * Zambian kwacha. + */ + ZMK, + /** + * Zimbabwe dollar. + */ + ZWL, + }; + + Currency() : value(), initialized(false) {} + Currency(Currency_ENUM value) : value(value), initialized(true) {} + + Currency& operator=(Currency_ENUM rop); + operator Currency_ENUM() const; + + Currency_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Currency& rop); + friend std::ostream& operator<<(std::ostream& os, const Currency& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/CurrentFlow.cpp b/CGMES_3.0.0/CurrentFlow.cpp new file mode 100644 index 000000000..56f73af6e --- /dev/null +++ b/CGMES_3.0.0/CurrentFlow.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurrentFlow.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CurrentFlow& CurrentFlow::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +CurrentFlow::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CurrentFlow::debugName[] = "CurrentFlow"; +const char* CurrentFlow::debugString() const +{ + return CurrentFlow::debugName; +} + +CurrentFlow& CurrentFlow::operator+=(const CurrentFlow& rhs) +{ + value += rhs.value; + return *this; +} + +CurrentFlow& CurrentFlow::operator-=(const CurrentFlow& rhs) +{ + value -= rhs.value; + return *this; +} + +CurrentFlow& CurrentFlow::operator*=(const CurrentFlow& rhs) +{ + value *= rhs.value; + return *this; +} + +CurrentFlow& CurrentFlow::operator/=(const CurrentFlow& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CurrentFlow& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CurrentFlow& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/CurrentFlow.hpp b/CGMES_3.0.0/CurrentFlow.hpp new file mode 100644 index 000000000..0f38f0f07 --- /dev/null +++ b/CGMES_3.0.0/CurrentFlow.hpp @@ -0,0 +1,39 @@ +#ifndef CurrentFlow_H +#define CurrentFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +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. + */ + class CurrentFlow + { + public: + CurrentFlow() : value(0.0), initialized(false) {} + CurrentFlow(long double value) : value(value), initialized(true) {} + + CurrentFlow& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + CurrentFlow& operator+=(const CurrentFlow& rhs); + CurrentFlow& operator-=(const CurrentFlow& rhs); + CurrentFlow& operator*=(const CurrentFlow& rhs); + CurrentFlow& operator/=(const CurrentFlow& rhs); + + friend std::istream& operator>>(std::istream& lop, CurrentFlow& rop); + friend std::ostream& operator<<(std::ostream& os, const CurrentFlow& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/CurrentLimit.cpp b/CGMES_3.0.0/CurrentLimit.cpp new file mode 100644 index 000000000..1090e8ad4 --- /dev/null +++ b/CGMES_3.0.0/CurrentLimit.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurrentLimit.hpp" + +#include +#include + +#include "CurrentFlow.hpp" +#include "CurrentFlow.hpp" + +using namespace CIMPP; + +CurrentLimit::CurrentLimit() {}; +CurrentLimit::~CurrentLimit() {}; + + +bool assign_CurrentLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CurrentLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char CurrentLimit::debugName[] = "CurrentLimit"; +const char* CurrentLimit::debugString() const +{ + return CurrentLimit::debugName; +} + +void CurrentLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CurrentLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner CurrentLimit::declare() +{ + return BaseClassDefiner(CurrentLimit::addConstructToMap, CurrentLimit::addPrimitiveAssignFnsToMap, CurrentLimit::addClassAssignFnsToMap, CurrentLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* CurrentLimit_factory() + { + return new CurrentLimit; + } +} diff --git a/CGMES_3.0.0/CurrentLimit.hpp b/CGMES_3.0.0/CurrentLimit.hpp new file mode 100644 index 000000000..1da5d73a6 --- /dev/null +++ b/CGMES_3.0.0/CurrentLimit.hpp @@ -0,0 +1,42 @@ +#ifndef CurrentLimit_H +#define CurrentLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" + +namespace CIMPP +{ + + /* + Operational limit on current. + */ + class CurrentLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CurrentLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/CurrentTransformer.cpp b/CGMES_3.0.0/CurrentTransformer.cpp new file mode 100644 index 000000000..c82b7f48b --- /dev/null +++ b/CGMES_3.0.0/CurrentTransformer.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurrentTransformer.hpp" + +#include +#include + + +using namespace CIMPP; + +CurrentTransformer::CurrentTransformer() {}; +CurrentTransformer::~CurrentTransformer() {}; + + + +const char CurrentTransformer::debugName[] = "CurrentTransformer"; +const char* CurrentTransformer::debugString() const +{ + return CurrentTransformer::debugName; +} + +void CurrentTransformer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:CurrentTransformer"), &CurrentTransformer_factory)); +} + +void CurrentTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void CurrentTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner CurrentTransformer::declare() +{ + return BaseClassDefiner(CurrentTransformer::addConstructToMap, CurrentTransformer::addPrimitiveAssignFnsToMap, CurrentTransformer::addClassAssignFnsToMap, CurrentTransformer::debugName); +} + +namespace CIMPP +{ + BaseClass* CurrentTransformer_factory() + { + return new CurrentTransformer; + } +} diff --git a/CGMES_3.0.0/CurrentTransformer.hpp b/CGMES_3.0.0/CurrentTransformer.hpp new file mode 100644 index 000000000..3bcebd25b --- /dev/null +++ b/CGMES_3.0.0/CurrentTransformer.hpp @@ -0,0 +1,39 @@ +#ifndef CurrentTransformer_H +#define CurrentTransformer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Sensor.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class CurrentTransformer : public Sensor + { + public: + /* constructor initialising all attributes to null */ + CurrentTransformer(); + ~CurrentTransformer() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CurrentTransformer_factory(); +} +#endif diff --git a/CGMES_3.0.0/Curve.cpp b/CGMES_3.0.0/Curve.cpp new file mode 100644 index 000000000..e25ece428 --- /dev/null +++ b/CGMES_3.0.0/Curve.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Curve.hpp" + +#include +#include + +#include "CurveData.hpp" +#include "CurveStyle.hpp" +#include "UnitSymbol.hpp" +#include "UnitSymbol.hpp" +#include "UnitSymbol.hpp" + +using namespace CIMPP; + +Curve::Curve() {}; +Curve::~Curve() {}; + + + +bool assign_Curve_curveStyle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->curveStyle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Curve_xUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xUnit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Curve_y1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y1Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Curve_y2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Curve* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y2Unit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_CurveData_Curve(BaseClass*, BaseClass*); +bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Curve* element = dynamic_cast(BaseClass_ptr1); + CurveData* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + +const char Curve::debugName[] = "Curve"; +const char* Curve::debugString() const +{ + return Curve::debugName; +} + +void Curve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Curve::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Curve.CurveDatas"), &assign_Curve_CurveDatas)); +} + +const BaseClassDefiner Curve::declare() +{ + return BaseClassDefiner(Curve::addConstructToMap, Curve::addPrimitiveAssignFnsToMap, Curve::addClassAssignFnsToMap, Curve::debugName); +} + +namespace CIMPP +{ + BaseClass* Curve_factory() + { + return new Curve; + } +} diff --git a/CGMES_3.0.0/Curve.hpp b/CGMES_3.0.0/Curve.hpp new file mode 100644 index 000000000..16be4e46a --- /dev/null +++ b/CGMES_3.0.0/Curve.hpp @@ -0,0 +1,47 @@ +#ifndef Curve_H +#define Curve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "CurveStyle.hpp" +#include "UnitSymbol.hpp" + +namespace CIMPP +{ + class CurveData; + + /* + A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. + */ + class Curve : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Curve_factory(); +} +#endif diff --git a/CGMES_3.0.0/CurveData.cpp b/CGMES_3.0.0/CurveData.cpp new file mode 100644 index 000000000..64a11437d --- /dev/null +++ b/CGMES_3.0.0/CurveData.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurveData.hpp" + +#include +#include + +#include "Curve.hpp" +#include "Float.hpp" +#include "Float.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +CurveData::CurveData() : Curve(nullptr) {}; +CurveData::~CurveData() {}; + + + +bool assign_CurveData_xvalue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xvalue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CurveData_y1value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y1value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_CurveData_y2value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y2value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + +const char CurveData::debugName[] = "CurveData"; +const char* CurveData::debugString() const +{ + return CurveData::debugName; +} + +void CurveData::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void CurveData::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:CurveData.Curve"), &assign_CurveData_Curve)); +} + +const BaseClassDefiner CurveData::declare() +{ + return BaseClassDefiner(CurveData::addConstructToMap, CurveData::addPrimitiveAssignFnsToMap, CurveData::addClassAssignFnsToMap, CurveData::debugName); +} + +namespace CIMPP +{ + BaseClass* CurveData_factory() + { + return new CurveData; + } +} diff --git a/CGMES_3.0.0/CurveData.hpp b/CGMES_3.0.0/CurveData.hpp new file mode 100644 index 000000000..daea126f3 --- /dev/null +++ b/CGMES_3.0.0/CurveData.hpp @@ -0,0 +1,45 @@ +#ifndef CurveData_H +#define CurveData_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +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. + */ + class CurveData : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* CurveData_factory(); +} +#endif diff --git a/CGMES_3.0.0/CurveStyle.cpp b/CGMES_3.0.0/CurveStyle.cpp new file mode 100644 index 000000000..d28696151 --- /dev/null +++ b/CGMES_3.0.0/CurveStyle.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CurveStyle.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +CurveStyle& CurveStyle::operator=(CurveStyle_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +CurveStyle::operator CurveStyle_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char CurveStyle::debugName[] = "CurveStyle"; +const char* CurveStyle::debugString() const +{ + return CurveStyle::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, CurveStyle& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "CurveStyle") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "constantYValue") + { + rop = CurveStyle::constantYValue; + return lop; + } + if(EnumSymbol == "straightLineYValues") + { + rop = CurveStyle::straightLineYValues; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const CurveStyle& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == CurveStyle::constantYValue) + { + EnumSymbol = "constantYValue"; + } + if (obj.value == CurveStyle::straightLineYValues) + { + EnumSymbol = "straightLineYValues"; + } + + if (!EnumSymbol.empty()) + { + os << "CurveStyle." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/CurveStyle.hpp b/CGMES_3.0.0/CurveStyle.hpp new file mode 100644 index 000000000..72f95568c --- /dev/null +++ b/CGMES_3.0.0/CurveStyle.hpp @@ -0,0 +1,46 @@ +#ifndef CurveStyle_H +#define CurveStyle_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + constantYValue, + /** + * The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. + */ + straightLineYValues, + }; + + CurveStyle() : value(), initialized(false) {} + CurveStyle(CurveStyle_ENUM value) : value(value), initialized(true) {} + + CurveStyle& operator=(CurveStyle_ENUM rop); + operator CurveStyle_ENUM() const; + + CurveStyle_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, CurveStyle& rop); + friend std::ostream& operator<<(std::ostream& os, const CurveStyle& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Cut.cpp b/CGMES_3.0.0/Cut.cpp new file mode 100644 index 000000000..c76932845 --- /dev/null +++ b/CGMES_3.0.0/Cut.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Cut.hpp" + +#include +#include + +#include "ACLineSegment.hpp" +#include "Length.hpp" + +using namespace CIMPP; + +Cut::Cut() : ACLineSegment(nullptr) {}; +Cut::~Cut() {}; + + + +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) +{ + Cut* element = dynamic_cast(BaseClass_ptr1); + ACLineSegment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ACLineSegment != element2) + { + element->ACLineSegment = element2; + return assign_ACLineSegment_Cut(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char Cut::debugName[] = "Cut"; +const char* Cut::debugString() const +{ + return Cut::debugName; +} + +void Cut::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Cut::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Cut.ACLineSegment"), &assign_Cut_ACLineSegment)); +} + +const BaseClassDefiner Cut::declare() +{ + return BaseClassDefiner(Cut::addConstructToMap, Cut::addPrimitiveAssignFnsToMap, Cut::addClassAssignFnsToMap, Cut::debugName); +} + +namespace CIMPP +{ + BaseClass* Cut_factory() + { + return new Cut; + } +} diff --git a/CGMES_3.0.0/Cut.hpp b/CGMES_3.0.0/Cut.hpp new file mode 100644 index 000000000..94ad36d28 --- /dev/null +++ b/CGMES_3.0.0/Cut.hpp @@ -0,0 +1,43 @@ +#ifndef Cut_H +#define Cut_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" +#include "Length.hpp" + +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. + */ + class Cut : public Switch + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Cut_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCBaseTerminal.cpp b/CGMES_3.0.0/DCBaseTerminal.cpp new file mode 100644 index 000000000..9f9ea9862 --- /dev/null +++ b/CGMES_3.0.0/DCBaseTerminal.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCBaseTerminal.hpp" + +#include +#include + +#include "DCNode.hpp" +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {}; +DCBaseTerminal::~DCBaseTerminal() {}; + + + + + +bool assign_DCNode_DCTerminals(BaseClass*, BaseClass*); +bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + DCNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCNode != element2) + { + element->DCNode = element2; + return assign_DCNode_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalNode_DCTerminals(BaseClass*, BaseClass*); +bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCTopologicalNode != element2) + { + element->DCTopologicalNode = element2; + return assign_DCTopologicalNode_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCBaseTerminal::debugName[] = "DCBaseTerminal"; +const char* DCBaseTerminal::debugString() const +{ + return DCBaseTerminal::debugName; +} + +void DCBaseTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCBaseTerminal"), &DCBaseTerminal_factory)); +} + +void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCBaseTerminal::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCBaseTerminal::declare() +{ + return BaseClassDefiner(DCBaseTerminal::addConstructToMap, DCBaseTerminal::addPrimitiveAssignFnsToMap, DCBaseTerminal::addClassAssignFnsToMap, DCBaseTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* DCBaseTerminal_factory() + { + return new DCBaseTerminal; + } +} diff --git a/CGMES_3.0.0/DCBaseTerminal.hpp b/CGMES_3.0.0/DCBaseTerminal.hpp new file mode 100644 index 000000000..505971d80 --- /dev/null +++ b/CGMES_3.0.0/DCBaseTerminal.hpp @@ -0,0 +1,43 @@ +#ifndef DCBaseTerminal_H +#define DCBaseTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCTerminal.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCBaseTerminal : public ACDCTerminal + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCBaseTerminal_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCBreaker.cpp b/CGMES_3.0.0/DCBreaker.cpp new file mode 100644 index 000000000..c862f40e9 --- /dev/null +++ b/CGMES_3.0.0/DCBreaker.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCBreaker.hpp" + +#include +#include + + +using namespace CIMPP; + +DCBreaker::DCBreaker() {}; +DCBreaker::~DCBreaker() {}; + + + +const char DCBreaker::debugName[] = "DCBreaker"; +const char* DCBreaker::debugString() const +{ + return DCBreaker::debugName; +} + +void DCBreaker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCBreaker"), &DCBreaker_factory)); +} + +void DCBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCBreaker::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCBreaker::declare() +{ + return BaseClassDefiner(DCBreaker::addConstructToMap, DCBreaker::addPrimitiveAssignFnsToMap, DCBreaker::addClassAssignFnsToMap, DCBreaker::debugName); +} + +namespace CIMPP +{ + BaseClass* DCBreaker_factory() + { + return new DCBreaker; + } +} diff --git a/CGMES_3.0.0/DCBreaker.hpp b/CGMES_3.0.0/DCBreaker.hpp new file mode 100644 index 000000000..a360a1425 --- /dev/null +++ b/CGMES_3.0.0/DCBreaker.hpp @@ -0,0 +1,39 @@ +#ifndef DCBreaker_H +#define DCBreaker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCSwitch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A breaker within a DC system. + */ + class DCBreaker : public DCSwitch + { + public: + /* constructor initialising all attributes to null */ + DCBreaker(); + ~DCBreaker() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCBreaker_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCBusbar.cpp b/CGMES_3.0.0/DCBusbar.cpp new file mode 100644 index 000000000..587b722fb --- /dev/null +++ b/CGMES_3.0.0/DCBusbar.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCBusbar.hpp" + +#include +#include + + +using namespace CIMPP; + +DCBusbar::DCBusbar() {}; +DCBusbar::~DCBusbar() {}; + + + +const char DCBusbar::debugName[] = "DCBusbar"; +const char* DCBusbar::debugString() const +{ + return DCBusbar::debugName; +} + +void DCBusbar::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCBusbar"), &DCBusbar_factory)); +} + +void DCBusbar::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCBusbar::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCBusbar::declare() +{ + return BaseClassDefiner(DCBusbar::addConstructToMap, DCBusbar::addPrimitiveAssignFnsToMap, DCBusbar::addClassAssignFnsToMap, DCBusbar::debugName); +} + +namespace CIMPP +{ + BaseClass* DCBusbar_factory() + { + return new DCBusbar; + } +} diff --git a/CGMES_3.0.0/DCBusbar.hpp b/CGMES_3.0.0/DCBusbar.hpp new file mode 100644 index 000000000..4e9f6c039 --- /dev/null +++ b/CGMES_3.0.0/DCBusbar.hpp @@ -0,0 +1,39 @@ +#ifndef DCBusbar_H +#define DCBusbar_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A busbar within a DC system. + */ + class DCBusbar : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCBusbar(); + ~DCBusbar() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCBusbar_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCChopper.cpp b/CGMES_3.0.0/DCChopper.cpp new file mode 100644 index 000000000..f196636fd --- /dev/null +++ b/CGMES_3.0.0/DCChopper.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCChopper.hpp" + +#include +#include + + +using namespace CIMPP; + +DCChopper::DCChopper() {}; +DCChopper::~DCChopper() {}; + + + +const char DCChopper::debugName[] = "DCChopper"; +const char* DCChopper::debugString() const +{ + return DCChopper::debugName; +} + +void DCChopper::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCChopper"), &DCChopper_factory)); +} + +void DCChopper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCChopper::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCChopper::declare() +{ + return BaseClassDefiner(DCChopper::addConstructToMap, DCChopper::addPrimitiveAssignFnsToMap, DCChopper::addClassAssignFnsToMap, DCChopper::debugName); +} + +namespace CIMPP +{ + BaseClass* DCChopper_factory() + { + return new DCChopper; + } +} diff --git a/CGMES_3.0.0/DCChopper.hpp b/CGMES_3.0.0/DCChopper.hpp new file mode 100644 index 000000000..674d2c2db --- /dev/null +++ b/CGMES_3.0.0/DCChopper.hpp @@ -0,0 +1,39 @@ +#ifndef DCChopper_H +#define DCChopper_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCChopper : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCChopper(); + ~DCChopper() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCChopper_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCConductingEquipment.cpp b/CGMES_3.0.0/DCConductingEquipment.cpp new file mode 100644 index 000000000..79382ffc8 --- /dev/null +++ b/CGMES_3.0.0/DCConductingEquipment.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCConductingEquipment.hpp" + +#include +#include + +#include "DCTerminal.hpp" +#include "Voltage.hpp" + +using namespace CIMPP; + +DCConductingEquipment::DCConductingEquipment() {}; +DCConductingEquipment::~DCConductingEquipment() {}; + + + +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) +{ + DCConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + DCTerminal* 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_DCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char DCConductingEquipment::debugName[] = "DCConductingEquipment"; +const char* DCConductingEquipment::debugString() const +{ + return DCConductingEquipment::debugName; +} + +void DCConductingEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCConductingEquipment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.DCTerminals"), &assign_DCConductingEquipment_DCTerminals)); +} + +const BaseClassDefiner DCConductingEquipment::declare() +{ + return BaseClassDefiner(DCConductingEquipment::addConstructToMap, DCConductingEquipment::addPrimitiveAssignFnsToMap, DCConductingEquipment::addClassAssignFnsToMap, DCConductingEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* DCConductingEquipment_factory() + { + return new DCConductingEquipment; + } +} diff --git a/CGMES_3.0.0/DCConductingEquipment.hpp b/CGMES_3.0.0/DCConductingEquipment.hpp new file mode 100644 index 000000000..0eeef5c79 --- /dev/null +++ b/CGMES_3.0.0/DCConductingEquipment.hpp @@ -0,0 +1,43 @@ +#ifndef DCConductingEquipment_H +#define DCConductingEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +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. + */ + class DCConductingEquipment : public Equipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCConductingEquipment_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCConverterOperatingModeKind.cpp b/CGMES_3.0.0/DCConverterOperatingModeKind.cpp new file mode 100644 index 000000000..723e4594e --- /dev/null +++ b/CGMES_3.0.0/DCConverterOperatingModeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCConverterOperatingModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DCConverterOperatingModeKind& DCConverterOperatingModeKind::operator=(DCConverterOperatingModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +DCConverterOperatingModeKind::operator DCConverterOperatingModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DCConverterOperatingModeKind::debugName[] = "DCConverterOperatingModeKind"; +const char* DCConverterOperatingModeKind::debugString() const +{ + return DCConverterOperatingModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DCConverterOperatingModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "bipolar") + { + rop = DCConverterOperatingModeKind::bipolar; + return lop; + } + if(EnumSymbol == "monopolarMetallicReturn") + { + rop = DCConverterOperatingModeKind::monopolarMetallicReturn; + return lop; + } + if(EnumSymbol == "monopolarGroundReturn") + { + rop = DCConverterOperatingModeKind::monopolarGroundReturn; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DCConverterOperatingModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == DCConverterOperatingModeKind::bipolar) + { + EnumSymbol = "bipolar"; + } + if (obj.value == DCConverterOperatingModeKind::monopolarMetallicReturn) + { + EnumSymbol = "monopolarMetallicReturn"; + } + if (obj.value == DCConverterOperatingModeKind::monopolarGroundReturn) + { + EnumSymbol = "monopolarGroundReturn"; + } + + if (!EnumSymbol.empty()) + { + os << "DCConverterOperatingModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/DCConverterOperatingModeKind.hpp b/CGMES_3.0.0/DCConverterOperatingModeKind.hpp new file mode 100644 index 000000000..575f4a5e2 --- /dev/null +++ b/CGMES_3.0.0/DCConverterOperatingModeKind.hpp @@ -0,0 +1,50 @@ +#ifndef DCConverterOperatingModeKind_H +#define DCConverterOperatingModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The operating mode of an HVDC bipole. + */ + class DCConverterOperatingModeKind + { + public: + enum DCConverterOperatingModeKind_ENUM + { + /** + * Bipolar operation. + */ + bipolar, + /** + * Monopolar operation with metallic return. + */ + monopolarMetallicReturn, + /** + * Monopolar operation with ground return. + */ + monopolarGroundReturn, + }; + + DCConverterOperatingModeKind() : value(), initialized(false) {} + DCConverterOperatingModeKind(DCConverterOperatingModeKind_ENUM value) : value(value), initialized(true) {} + + DCConverterOperatingModeKind& operator=(DCConverterOperatingModeKind_ENUM rop); + operator DCConverterOperatingModeKind_ENUM() const; + + DCConverterOperatingModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DCConverterOperatingModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const DCConverterOperatingModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/DCConverterUnit.cpp b/CGMES_3.0.0/DCConverterUnit.cpp new file mode 100644 index 000000000..737004e53 --- /dev/null +++ b/CGMES_3.0.0/DCConverterUnit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCConverterUnit.hpp" + +#include +#include + +#include "Substation.hpp" +#include "DCConverterOperatingModeKind.hpp" + +using namespace CIMPP; + +DCConverterUnit::DCConverterUnit() : Substation(nullptr) {}; +DCConverterUnit::~DCConverterUnit() {}; + + + +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) +{ + DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + Substation* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Substation != element2) + { + element->Substation = element2; + return assign_Substation_DCConverterUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char DCConverterUnit::debugName[] = "DCConverterUnit"; +const char* DCConverterUnit::debugString() const +{ + return DCConverterUnit::debugName; +} + +void DCConverterUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCConverterUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.Substation"), &assign_DCConverterUnit_Substation)); +} + +const BaseClassDefiner DCConverterUnit::declare() +{ + return BaseClassDefiner(DCConverterUnit::addConstructToMap, DCConverterUnit::addPrimitiveAssignFnsToMap, DCConverterUnit::addClassAssignFnsToMap, DCConverterUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* DCConverterUnit_factory() + { + return new DCConverterUnit; + } +} diff --git a/CGMES_3.0.0/DCConverterUnit.hpp b/CGMES_3.0.0/DCConverterUnit.hpp new file mode 100644 index 000000000..0ba5e0eb0 --- /dev/null +++ b/CGMES_3.0.0/DCConverterUnit.hpp @@ -0,0 +1,43 @@ +#ifndef DCConverterUnit_H +#define DCConverterUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" +#include "DCConverterOperatingModeKind.hpp" + +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. + */ + class DCConverterUnit : public DCEquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCConverterUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCDisconnector.cpp b/CGMES_3.0.0/DCDisconnector.cpp new file mode 100644 index 000000000..9386681a3 --- /dev/null +++ b/CGMES_3.0.0/DCDisconnector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCDisconnector.hpp" + +#include +#include + + +using namespace CIMPP; + +DCDisconnector::DCDisconnector() {}; +DCDisconnector::~DCDisconnector() {}; + + + +const char DCDisconnector::debugName[] = "DCDisconnector"; +const char* DCDisconnector::debugString() const +{ + return DCDisconnector::debugName; +} + +void DCDisconnector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCDisconnector"), &DCDisconnector_factory)); +} + +void DCDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCDisconnector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCDisconnector::declare() +{ + return BaseClassDefiner(DCDisconnector::addConstructToMap, DCDisconnector::addPrimitiveAssignFnsToMap, DCDisconnector::addClassAssignFnsToMap, DCDisconnector::debugName); +} + +namespace CIMPP +{ + BaseClass* DCDisconnector_factory() + { + return new DCDisconnector; + } +} diff --git a/CGMES_3.0.0/DCDisconnector.hpp b/CGMES_3.0.0/DCDisconnector.hpp new file mode 100644 index 000000000..11f5da74c --- /dev/null +++ b/CGMES_3.0.0/DCDisconnector.hpp @@ -0,0 +1,39 @@ +#ifndef DCDisconnector_H +#define DCDisconnector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCSwitch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A disconnector within a DC system. + */ + class DCDisconnector : public DCSwitch + { + public: + /* constructor initialising all attributes to null */ + DCDisconnector(); + ~DCDisconnector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCDisconnector_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCEquipmentContainer.cpp b/CGMES_3.0.0/DCEquipmentContainer.cpp new file mode 100644 index 000000000..6fbe46186 --- /dev/null +++ b/CGMES_3.0.0/DCEquipmentContainer.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCEquipmentContainer.hpp" + +#include +#include + +#include "DCNode.hpp" +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCEquipmentContainer::DCEquipmentContainer() {}; +DCEquipmentContainer::~DCEquipmentContainer() {}; + + + + + +bool assign_DCNode_DCEquipmentContainer(BaseClass*, BaseClass*); +bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCEquipmentContainer* element = dynamic_cast(BaseClass_ptr1); + DCNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCNodes.begin(), element->DCNodes.end(), element2) == element->DCNodes.end()) + { + element->DCNodes.push_back(element2); + return assign_DCNode_DCEquipmentContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass*, BaseClass*); +bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCEquipmentContainer* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTopologicalNode.begin(), element->DCTopologicalNode.end(), element2) == element->DCTopologicalNode.end()) + { + element->DCTopologicalNode.push_back(element2); + return assign_DCTopologicalNode_DCEquipmentContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCEquipmentContainer::debugName[] = "DCEquipmentContainer"; +const char* DCEquipmentContainer::debugString() const +{ + return DCEquipmentContainer::debugName; +} + +void DCEquipmentContainer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer"), &DCEquipmentContainer_factory)); +} + +void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCEquipmentContainer::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCEquipmentContainer::declare() +{ + return BaseClassDefiner(DCEquipmentContainer::addConstructToMap, DCEquipmentContainer::addPrimitiveAssignFnsToMap, DCEquipmentContainer::addClassAssignFnsToMap, DCEquipmentContainer::debugName); +} + +namespace CIMPP +{ + BaseClass* DCEquipmentContainer_factory() + { + return new DCEquipmentContainer; + } +} diff --git a/CGMES_3.0.0/DCEquipmentContainer.hpp b/CGMES_3.0.0/DCEquipmentContainer.hpp new file mode 100644 index 000000000..6882d7f33 --- /dev/null +++ b/CGMES_3.0.0/DCEquipmentContainer.hpp @@ -0,0 +1,43 @@ +#ifndef DCEquipmentContainer_H +#define DCEquipmentContainer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCEquipmentContainer : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCEquipmentContainer_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCGround.cpp b/CGMES_3.0.0/DCGround.cpp new file mode 100644 index 000000000..713715e26 --- /dev/null +++ b/CGMES_3.0.0/DCGround.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCGround.hpp" + +#include +#include + +#include "Inductance.hpp" +#include "Resistance.hpp" + +using namespace CIMPP; + +DCGround::DCGround() {}; +DCGround::~DCGround() {}; + + +bool assign_DCGround_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCGround_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char DCGround::debugName[] = "DCGround"; +const char* DCGround::debugString() const +{ + return DCGround::debugName; +} + +void DCGround::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCGround::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCGround::declare() +{ + return BaseClassDefiner(DCGround::addConstructToMap, DCGround::addPrimitiveAssignFnsToMap, DCGround::addClassAssignFnsToMap, DCGround::debugName); +} + +namespace CIMPP +{ + BaseClass* DCGround_factory() + { + return new DCGround; + } +} diff --git a/CGMES_3.0.0/DCGround.hpp b/CGMES_3.0.0/DCGround.hpp new file mode 100644 index 000000000..9da13df9f --- /dev/null +++ b/CGMES_3.0.0/DCGround.hpp @@ -0,0 +1,43 @@ +#ifndef DCGround_H +#define DCGround_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Inductance.hpp" +#include "Resistance.hpp" + +namespace CIMPP +{ + + /* + A ground within a DC system. + */ + class DCGround : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCGround(); + ~DCGround() override; + + CIMPP::Inductance inductance; /* Inductance to ground. Default: nullptr */ + CIMPP::Resistance r; /* Resistance to ground. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCGround_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCLine.cpp b/CGMES_3.0.0/DCLine.cpp new file mode 100644 index 000000000..98bc5d517 --- /dev/null +++ b/CGMES_3.0.0/DCLine.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCLine.hpp" + +#include +#include + +#include "SubGeographicalRegion.hpp" + +using namespace CIMPP; + +DCLine::DCLine() : Region(nullptr) {}; +DCLine::~DCLine() {}; + + + + +bool assign_SubGeographicalRegion_DCLines(BaseClass*, BaseClass*); +bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCLine* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_SubGeographicalRegion_DCLines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCLine::debugName[] = "DCLine"; +const char* DCLine::debugString() const +{ + return DCLine::debugName; +} + +void DCLine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCLine"), &DCLine_factory)); +} + +void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCLine::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCLine.Region"), &assign_DCLine_Region)); +} + +const BaseClassDefiner DCLine::declare() +{ + return BaseClassDefiner(DCLine::addConstructToMap, DCLine::addPrimitiveAssignFnsToMap, DCLine::addClassAssignFnsToMap, DCLine::debugName); +} + +namespace CIMPP +{ + BaseClass* DCLine_factory() + { + return new DCLine; + } +} diff --git a/CGMES_3.0.0/DCLine.hpp b/CGMES_3.0.0/DCLine.hpp new file mode 100644 index 000000000..5c016664b --- /dev/null +++ b/CGMES_3.0.0/DCLine.hpp @@ -0,0 +1,41 @@ +#ifndef DCLine_H +#define DCLine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SubGeographicalRegion; + + /* + Overhead lines and/or cables connecting two or more HVDC substations. + */ + class DCLine : public DCEquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + DCLine(); + ~DCLine() override; + + CIMPP::SubGeographicalRegion* Region; /* The SubGeographicalRegion containing the DC line. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCLine_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCLineSegment.cpp b/CGMES_3.0.0/DCLineSegment.cpp new file mode 100644 index 000000000..563e39b96 --- /dev/null +++ b/CGMES_3.0.0/DCLineSegment.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCLineSegment.hpp" + +#include +#include + +#include "Capacitance.hpp" +#include "Inductance.hpp" +#include "Length.hpp" +#include "Resistance.hpp" + +using namespace CIMPP; + +DCLineSegment::DCLineSegment() {}; +DCLineSegment::~DCLineSegment() {}; + + +bool assign_DCLineSegment_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCLineSegment_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCLineSegment_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->length; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCLineSegment_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char DCLineSegment::debugName[] = "DCLineSegment"; +const char* DCLineSegment::debugString() const +{ + return DCLineSegment::debugName; +} + +void DCLineSegment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCLineSegment::declare() +{ + return BaseClassDefiner(DCLineSegment::addConstructToMap, DCLineSegment::addPrimitiveAssignFnsToMap, DCLineSegment::addClassAssignFnsToMap, DCLineSegment::debugName); +} + +namespace CIMPP +{ + BaseClass* DCLineSegment_factory() + { + return new DCLineSegment; + } +} diff --git a/CGMES_3.0.0/DCLineSegment.hpp b/CGMES_3.0.0/DCLineSegment.hpp new file mode 100644 index 000000000..1bd2cd3b3 --- /dev/null +++ b/CGMES_3.0.0/DCLineSegment.hpp @@ -0,0 +1,47 @@ +#ifndef DCLineSegment_H +#define DCLineSegment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Capacitance.hpp" +#include "Inductance.hpp" +#include "Length.hpp" +#include "Resistance.hpp" + +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. + */ + class DCLineSegment : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCLineSegment_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCNode.cpp b/CGMES_3.0.0/DCNode.cpp new file mode 100644 index 000000000..d47580458 --- /dev/null +++ b/CGMES_3.0.0/DCNode.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCNode.hpp" + +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "DCBaseTerminal.hpp" +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {}; +DCNode::~DCNode() {}; + + + + + + +bool assign_DCEquipmentContainer_DCNodes(BaseClass*, BaseClass*); +bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCNode* element = dynamic_cast(BaseClass_ptr1); + DCEquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCEquipmentContainer != element2) + { + element->DCEquipmentContainer = element2; + return assign_DCEquipmentContainer_DCNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCBaseTerminal_DCNode(BaseClass*, BaseClass*); +bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCNode* element = dynamic_cast(BaseClass_ptr1); + DCBaseTerminal* 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_DCBaseTerminal_DCNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalNode_DCNodes(BaseClass*, BaseClass*); +bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCNode* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCTopologicalNode != element2) + { + element->DCTopologicalNode = element2; + return assign_DCTopologicalNode_DCNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCNode::debugName[] = "DCNode"; +const char* DCNode::debugString() const +{ + return DCNode::debugName; +} + +void DCNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCNode"), &DCNode_factory)); +} + +void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCNode::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCNode::declare() +{ + return BaseClassDefiner(DCNode::addConstructToMap, DCNode::addPrimitiveAssignFnsToMap, DCNode::addClassAssignFnsToMap, DCNode::debugName); +} + +namespace CIMPP +{ + BaseClass* DCNode_factory() + { + return new DCNode; + } +} diff --git a/CGMES_3.0.0/DCNode.hpp b/CGMES_3.0.0/DCNode.hpp new file mode 100644 index 000000000..1933f339d --- /dev/null +++ b/CGMES_3.0.0/DCNode.hpp @@ -0,0 +1,45 @@ +#ifndef DCNode_H +#define DCNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCBaseTerminal; + class DCEquipmentContainer; + class DCTopologicalNode; + + /* + DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. + */ + class DCNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCNode_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCPolarityKind.cpp b/CGMES_3.0.0/DCPolarityKind.cpp new file mode 100644 index 000000000..a1a646248 --- /dev/null +++ b/CGMES_3.0.0/DCPolarityKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCPolarityKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DCPolarityKind& DCPolarityKind::operator=(DCPolarityKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +DCPolarityKind::operator DCPolarityKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DCPolarityKind::debugName[] = "DCPolarityKind"; +const char* DCPolarityKind::debugString() const +{ + return DCPolarityKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DCPolarityKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "DCPolarityKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "positive") + { + rop = DCPolarityKind::positive; + return lop; + } + if(EnumSymbol == "middle") + { + rop = DCPolarityKind::middle; + return lop; + } + if(EnumSymbol == "negative") + { + rop = DCPolarityKind::negative; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DCPolarityKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == DCPolarityKind::positive) + { + EnumSymbol = "positive"; + } + if (obj.value == DCPolarityKind::middle) + { + EnumSymbol = "middle"; + } + if (obj.value == DCPolarityKind::negative) + { + EnumSymbol = "negative"; + } + + if (!EnumSymbol.empty()) + { + os << "DCPolarityKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/DCPolarityKind.hpp b/CGMES_3.0.0/DCPolarityKind.hpp new file mode 100644 index 000000000..2307b002b --- /dev/null +++ b/CGMES_3.0.0/DCPolarityKind.hpp @@ -0,0 +1,50 @@ +#ifndef DCPolarityKind_H +#define DCPolarityKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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, + /** + * 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, + }; + + DCPolarityKind() : value(), initialized(false) {} + DCPolarityKind(DCPolarityKind_ENUM value) : value(value), initialized(true) {} + + DCPolarityKind& operator=(DCPolarityKind_ENUM rop); + operator DCPolarityKind_ENUM() const; + + DCPolarityKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DCPolarityKind& rop); + friend std::ostream& operator<<(std::ostream& os, const DCPolarityKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/DCSeriesDevice.cpp b/CGMES_3.0.0/DCSeriesDevice.cpp new file mode 100644 index 000000000..a60b32329 --- /dev/null +++ b/CGMES_3.0.0/DCSeriesDevice.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCSeriesDevice.hpp" + +#include +#include + +#include "Inductance.hpp" +#include "Resistance.hpp" + +using namespace CIMPP; + +DCSeriesDevice::DCSeriesDevice() {}; +DCSeriesDevice::~DCSeriesDevice() {}; + + +bool assign_DCSeriesDevice_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCSeriesDevice_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char DCSeriesDevice::debugName[] = "DCSeriesDevice"; +const char* DCSeriesDevice::debugString() const +{ + return DCSeriesDevice::debugName; +} + +void DCSeriesDevice::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCSeriesDevice::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCSeriesDevice::declare() +{ + return BaseClassDefiner(DCSeriesDevice::addConstructToMap, DCSeriesDevice::addPrimitiveAssignFnsToMap, DCSeriesDevice::addClassAssignFnsToMap, DCSeriesDevice::debugName); +} + +namespace CIMPP +{ + BaseClass* DCSeriesDevice_factory() + { + return new DCSeriesDevice; + } +} diff --git a/CGMES_3.0.0/DCSeriesDevice.hpp b/CGMES_3.0.0/DCSeriesDevice.hpp new file mode 100644 index 000000000..2e15fb167 --- /dev/null +++ b/CGMES_3.0.0/DCSeriesDevice.hpp @@ -0,0 +1,43 @@ +#ifndef DCSeriesDevice_H +#define DCSeriesDevice_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Inductance.hpp" +#include "Resistance.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + DCSeriesDevice(); + ~DCSeriesDevice() override; + + CIMPP::Inductance inductance; /* Inductance of the device. Default: nullptr */ + CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCSeriesDevice_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCShunt.cpp b/CGMES_3.0.0/DCShunt.cpp new file mode 100644 index 000000000..92f984a37 --- /dev/null +++ b/CGMES_3.0.0/DCShunt.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCShunt.hpp" + +#include +#include + +#include "Capacitance.hpp" +#include "Resistance.hpp" + +using namespace CIMPP; + +DCShunt::DCShunt() {}; +DCShunt::~DCShunt() {}; + + +bool assign_DCShunt_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DCShunt_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->resistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char DCShunt::debugName[] = "DCShunt"; +const char* DCShunt::debugString() const +{ + return DCShunt::debugName; +} + +void DCShunt::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DCShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCShunt::declare() +{ + return BaseClassDefiner(DCShunt::addConstructToMap, DCShunt::addPrimitiveAssignFnsToMap, DCShunt::addClassAssignFnsToMap, DCShunt::debugName); +} + +namespace CIMPP +{ + BaseClass* DCShunt_factory() + { + return new DCShunt; + } +} diff --git a/CGMES_3.0.0/DCShunt.hpp b/CGMES_3.0.0/DCShunt.hpp new file mode 100644 index 000000000..ea6bca6d8 --- /dev/null +++ b/CGMES_3.0.0/DCShunt.hpp @@ -0,0 +1,43 @@ +#ifndef DCShunt_H +#define DCShunt_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Capacitance.hpp" +#include "Resistance.hpp" + +namespace CIMPP +{ + + /* + A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. + */ + class DCShunt : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCShunt(); + ~DCShunt() override; + + CIMPP::Capacitance capacitance; /* Capacitance of the DC shunt. Default: nullptr */ + CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCShunt_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCSwitch.cpp b/CGMES_3.0.0/DCSwitch.cpp new file mode 100644 index 000000000..6ad07472d --- /dev/null +++ b/CGMES_3.0.0/DCSwitch.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCSwitch.hpp" + +#include +#include + + +using namespace CIMPP; + +DCSwitch::DCSwitch() {}; +DCSwitch::~DCSwitch() {}; + + + +const char DCSwitch::debugName[] = "DCSwitch"; +const char* DCSwitch::debugString() const +{ + return DCSwitch::debugName; +} + +void DCSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCSwitch"), &DCSwitch_factory)); +} + +void DCSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DCSwitch::declare() +{ + return BaseClassDefiner(DCSwitch::addConstructToMap, DCSwitch::addPrimitiveAssignFnsToMap, DCSwitch::addClassAssignFnsToMap, DCSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* DCSwitch_factory() + { + return new DCSwitch; + } +} diff --git a/CGMES_3.0.0/DCSwitch.hpp b/CGMES_3.0.0/DCSwitch.hpp new file mode 100644 index 000000000..76e968ca7 --- /dev/null +++ b/CGMES_3.0.0/DCSwitch.hpp @@ -0,0 +1,39 @@ +#ifndef DCSwitch_H +#define DCSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A switch within the DC system. + */ + class DCSwitch : public DCConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + DCSwitch(); + ~DCSwitch() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCSwitch_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCTerminal.cpp b/CGMES_3.0.0/DCTerminal.cpp new file mode 100644 index 000000000..b9b3832c1 --- /dev/null +++ b/CGMES_3.0.0/DCTerminal.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCTerminal.hpp" + +#include +#include + +#include "DCConductingEquipment.hpp" + +using namespace CIMPP; + +DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {}; +DCTerminal::~DCTerminal() {}; + + + + +bool assign_DCConductingEquipment_DCTerminals(BaseClass*, BaseClass*); +bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTerminal* element = dynamic_cast(BaseClass_ptr1); + DCConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCConductingEquipment != element2) + { + element->DCConductingEquipment = element2; + return assign_DCConductingEquipment_DCTerminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCTerminal::debugName[] = "DCTerminal"; +const char* DCTerminal::debugString() const +{ + return DCTerminal::debugName; +} + +void DCTerminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCTerminal"), &DCTerminal_factory)); +} + +void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCTerminal.DCConductingEquipment"), &assign_DCTerminal_DCConductingEquipment)); +} + +const BaseClassDefiner DCTerminal::declare() +{ + return BaseClassDefiner(DCTerminal::addConstructToMap, DCTerminal::addPrimitiveAssignFnsToMap, DCTerminal::addClassAssignFnsToMap, DCTerminal::debugName); +} + +namespace CIMPP +{ + BaseClass* DCTerminal_factory() + { + return new DCTerminal; + } +} diff --git a/CGMES_3.0.0/DCTerminal.hpp b/CGMES_3.0.0/DCTerminal.hpp new file mode 100644 index 000000000..6a35a4c2e --- /dev/null +++ b/CGMES_3.0.0/DCTerminal.hpp @@ -0,0 +1,41 @@ +#ifndef DCTerminal_H +#define DCTerminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DCBaseTerminal.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCConductingEquipment; + + /* + An electrical connection point to generic DC conducting equipment. + */ + class DCTerminal : public DCBaseTerminal + { + public: + /* constructor initialising all attributes to null */ + DCTerminal(); + ~DCTerminal() override; + + CIMPP::DCConductingEquipment* DCConductingEquipment; /* An DC terminal belong to a DC conducting equipment. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCTerminal_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCTopologicalIsland.cpp b/CGMES_3.0.0/DCTopologicalIsland.cpp new file mode 100644 index 000000000..a764d3e3e --- /dev/null +++ b/CGMES_3.0.0/DCTopologicalIsland.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCTopologicalIsland.hpp" + +#include +#include + +#include "DCTopologicalNode.hpp" + +using namespace CIMPP; + +DCTopologicalIsland::DCTopologicalIsland() {}; +DCTopologicalIsland::~DCTopologicalIsland() {}; + + + + +bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass*, BaseClass*); +bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTopologicalNodes.begin(), element->DCTopologicalNodes.end(), element2) == element->DCTopologicalNodes.end()) + { + element->DCTopologicalNodes.push_back(element2); + return assign_DCTopologicalNode_DCTopologicalIsland(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCTopologicalIsland::debugName[] = "DCTopologicalIsland"; +const char* DCTopologicalIsland::debugString() const +{ + return DCTopologicalIsland::debugName; +} + +void DCTopologicalIsland::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland"), &DCTopologicalIsland_factory)); +} + +void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCTopologicalIsland::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland.DCTopologicalNodes"), &assign_DCTopologicalIsland_DCTopologicalNodes)); +} + +const BaseClassDefiner DCTopologicalIsland::declare() +{ + return BaseClassDefiner(DCTopologicalIsland::addConstructToMap, DCTopologicalIsland::addPrimitiveAssignFnsToMap, DCTopologicalIsland::addClassAssignFnsToMap, DCTopologicalIsland::debugName); +} + +namespace CIMPP +{ + BaseClass* DCTopologicalIsland_factory() + { + return new DCTopologicalIsland; + } +} diff --git a/CGMES_3.0.0/DCTopologicalIsland.hpp b/CGMES_3.0.0/DCTopologicalIsland.hpp new file mode 100644 index 000000000..8ec8049ba --- /dev/null +++ b/CGMES_3.0.0/DCTopologicalIsland.hpp @@ -0,0 +1,41 @@ +#ifndef DCTopologicalIsland_H +#define DCTopologicalIsland_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DCTopologicalIsland : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DCTopologicalIsland(); + ~DCTopologicalIsland() override; + + std::list DCTopologicalNodes; /* The DC topological nodes in a DC topological island. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCTopologicalIsland_factory(); +} +#endif diff --git a/CGMES_3.0.0/DCTopologicalNode.cpp b/CGMES_3.0.0/DCTopologicalNode.cpp new file mode 100644 index 000000000..5a31638d6 --- /dev/null +++ b/CGMES_3.0.0/DCTopologicalNode.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DCTopologicalNode.hpp" + +#include +#include + +#include "DCEquipmentContainer.hpp" +#include "DCNode.hpp" +#include "DCBaseTerminal.hpp" +#include "DCTopologicalIsland.hpp" + +using namespace CIMPP; + +DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {}; +DCTopologicalNode::~DCTopologicalNode() {}; + + + + + + + +bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCEquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCEquipmentContainer != element2) + { + element->DCEquipmentContainer = element2; + return assign_DCEquipmentContainer_DCTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCNode_DCTopologicalNode(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCNodes.begin(), element->DCNodes.end(), element2) == element->DCNodes.end()) + { + element->DCNodes.push_back(element2); + return assign_DCNode_DCTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCBaseTerminal* 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_DCBaseTerminal_DCTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass*, BaseClass*); +bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + DCTopologicalIsland* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DCTopologicalIsland != element2) + { + element->DCTopologicalIsland = element2; + return assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DCTopologicalNode::debugName[] = "DCTopologicalNode"; +const char* DCTopologicalNode::debugString() const +{ + return DCTopologicalNode::debugName; +} + +void DCTopologicalNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DCTopologicalNode"), &DCTopologicalNode_factory)); +} + +void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DCTopologicalNode::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner DCTopologicalNode::declare() +{ + return BaseClassDefiner(DCTopologicalNode::addConstructToMap, DCTopologicalNode::addPrimitiveAssignFnsToMap, DCTopologicalNode::addClassAssignFnsToMap, DCTopologicalNode::debugName); +} + +namespace CIMPP +{ + BaseClass* DCTopologicalNode_factory() + { + return new DCTopologicalNode; + } +} diff --git a/CGMES_3.0.0/DCTopologicalNode.hpp b/CGMES_3.0.0/DCTopologicalNode.hpp new file mode 100644 index 000000000..319cb03d5 --- /dev/null +++ b/CGMES_3.0.0/DCTopologicalNode.hpp @@ -0,0 +1,47 @@ +#ifndef DCTopologicalNode_H +#define DCTopologicalNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCBaseTerminal; + class DCEquipmentContainer; + class DCNode; + class DCTopologicalIsland; + + /* + DC bus. + */ + class DCTopologicalNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DCTopologicalNode_factory(); +} +#endif diff --git a/CGMES_3.0.0/Date.cpp b/CGMES_3.0.0/Date.cpp new file mode 100644 index 000000000..6bcf3159e --- /dev/null +++ b/CGMES_3.0.0/Date.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Date.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Date& Date::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +Date::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Date::debugName[] = "Date"; +const char* Date::debugString() const +{ + return Date::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Date& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Date& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Date.hpp b/CGMES_3.0.0/Date.hpp new file mode 100644 index 000000000..e2063f08d --- /dev/null +++ b/CGMES_3.0.0/Date.hpp @@ -0,0 +1,35 @@ +#ifndef Date_H +#define Date_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#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". + */ + class Date + { + public: + Date() : initialized(false) {} + Date(const std::string& value) : value(value), initialized(true) {} + + Date& operator=(const std::string &rop); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Date& rop); + friend std::ostream& operator<<(std::ostream& os, const Date& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/DateTime.cpp b/CGMES_3.0.0/DateTime.cpp new file mode 100644 index 000000000..866aa87b0 --- /dev/null +++ b/CGMES_3.0.0/DateTime.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DateTime.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DateTime& DateTime::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +DateTime::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DateTime::debugName[] = "DateTime"; +const char* DateTime::debugString() const +{ + return DateTime::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DateTime& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DateTime& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/DateTime.hpp b/CGMES_3.0.0/DateTime.hpp new file mode 100644 index 000000000..745e7583b --- /dev/null +++ b/CGMES_3.0.0/DateTime.hpp @@ -0,0 +1,35 @@ +#ifndef DateTime_H +#define DateTime_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#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. + */ + class DateTime + { + public: + DateTime() : initialized(false) {} + DateTime(const std::string& value) : value(value), initialized(true) {} + + DateTime& operator=(const std::string &rop); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DateTime& rop); + friend std::ostream& operator<<(std::ostream& os, const DateTime& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/DayType.cpp b/CGMES_3.0.0/DayType.cpp new file mode 100644 index 000000000..e53f29f9f --- /dev/null +++ b/CGMES_3.0.0/DayType.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DayType.hpp" + +#include +#include + +#include "SeasonDayTypeSchedule.hpp" + +using namespace CIMPP; + +DayType::DayType() {}; +DayType::~DayType() {}; + + + + +bool assign_SeasonDayTypeSchedule_DayType(BaseClass*, BaseClass*); +bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DayType* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + { + element->SeasonDayTypeSchedules.push_back(element2); + return assign_SeasonDayTypeSchedule_DayType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DayType::debugName[] = "DayType"; +const char* DayType::debugString() const +{ + return DayType::debugName; +} + +void DayType::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DayType"), &DayType_factory)); +} + +void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DayType::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DayType.SeasonDayTypeSchedules"), &assign_DayType_SeasonDayTypeSchedules)); +} + +const BaseClassDefiner DayType::declare() +{ + return BaseClassDefiner(DayType::addConstructToMap, DayType::addPrimitiveAssignFnsToMap, DayType::addClassAssignFnsToMap, DayType::debugName); +} + +namespace CIMPP +{ + BaseClass* DayType_factory() + { + return new DayType; + } +} diff --git a/CGMES_3.0.0/DayType.hpp b/CGMES_3.0.0/DayType.hpp new file mode 100644 index 000000000..5de1f78c2 --- /dev/null +++ b/CGMES_3.0.0/DayType.hpp @@ -0,0 +1,41 @@ +#ifndef DayType_H +#define DayType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SeasonDayTypeSchedule; + + /* + Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. + */ + class DayType : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DayType(); + ~DayType() override; + + std::list SeasonDayTypeSchedules; /* Schedules that use this DayType. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DayType_factory(); +} +#endif diff --git a/CGMES_3.0.0/Decimal.cpp b/CGMES_3.0.0/Decimal.cpp new file mode 100644 index 000000000..98be5f30e --- /dev/null +++ b/CGMES_3.0.0/Decimal.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Decimal.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Decimal& Decimal::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Decimal::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Decimal::debugName[] = "Decimal"; +const char* Decimal::debugString() const +{ + return Decimal::debugName; +} + +Decimal& Decimal::operator+=(const Decimal& rhs) +{ + value += rhs.value; + return *this; +} + +Decimal& Decimal::operator-=(const Decimal& rhs) +{ + value -= rhs.value; + return *this; +} + +Decimal& Decimal::operator*=(const Decimal& rhs) +{ + value *= rhs.value; + return *this; +} + +Decimal& Decimal::operator/=(const Decimal& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Decimal& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Decimal& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Decimal.hpp b/CGMES_3.0.0/Decimal.hpp new file mode 100644 index 000000000..fa74e37f8 --- /dev/null +++ b/CGMES_3.0.0/Decimal.hpp @@ -0,0 +1,39 @@ +#ifndef Decimal_H +#define Decimal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Decimal is the base-10 notational system for representing real numbers. + */ + class Decimal + { + public: + Decimal() : value(0.0), initialized(false) {} + Decimal(long double value) : value(value), initialized(true) {} + + Decimal& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Decimal& operator+=(const Decimal& rhs); + Decimal& operator-=(const Decimal& rhs); + Decimal& operator*=(const Decimal& rhs); + Decimal& operator/=(const Decimal& rhs); + + friend std::istream& operator>>(std::istream& lop, Decimal& rop); + friend std::ostream& operator<<(std::ostream& os, const Decimal& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Diagram.cpp b/CGMES_3.0.0/Diagram.cpp new file mode 100644 index 000000000..9bcadc352 --- /dev/null +++ b/CGMES_3.0.0/Diagram.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Diagram.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_Diagram_orientation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->orientation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_x1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x1InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_x2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x2InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_y1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y1InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Diagram_y2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y2InitialView; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_DiagramStyle_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramStyle != element2) + { + element->DiagramStyle = element2; + return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char Diagram::debugName[] = "Diagram"; +const char* Diagram::debugString() const +{ + return Diagram::debugName; +} + +void Diagram::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Diagram::declare() +{ + return BaseClassDefiner(Diagram::addConstructToMap, Diagram::addPrimitiveAssignFnsToMap, Diagram::addClassAssignFnsToMap, Diagram::debugName); +} + +namespace CIMPP +{ + BaseClass* Diagram_factory() + { + return new Diagram; + } +} diff --git a/CGMES_3.0.0/Diagram.hpp b/CGMES_3.0.0/Diagram.hpp new file mode 100644 index 000000000..1c6c1473f --- /dev/null +++ b/CGMES_3.0.0/Diagram.hpp @@ -0,0 +1,50 @@ +#ifndef Diagram_H +#define Diagram_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "OrientationKind.hpp" + +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. + */ + class Diagram : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Diagram_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiagramObject.cpp b/CGMES_3.0.0/DiagramObject.cpp new file mode 100644 index 000000000..d6a6e1506 --- /dev/null +++ b/CGMES_3.0.0/DiagramObject.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObject.hpp" + +#include +#include + +#include "Diagram.hpp" +#include "DiagramObjectPoint.hpp" +#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() {}; + + + + + + + +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) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + Diagram* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Diagram != element2) + { + element->Diagram = element2; + return assign_Diagram_DiagramElements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_DiagramObject(BaseClass*, BaseClass*); +bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DiagramObjectPoints.begin(), element->DiagramObjectPoints.end(), element2) == element->DiagramObjectPoints.end()) + { + element->DiagramObjectPoints.push_back(element2); + return assign_DiagramObjectPoint_DiagramObject(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiagramObjectStyle_StyledObjects(BaseClass*, BaseClass*); +bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramObjectStyle != element2) + { + element->DiagramObjectStyle = element2; + return assign_DiagramObjectStyle_StyledObjects(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_IdentifiedObject_DiagramObjects(BaseClass*, BaseClass*); +bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + IdentifiedObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->IdentifiedObject != element2) + { + element->IdentifiedObject = element2; + return assign_IdentifiedObject_DiagramObjects(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VisibilityLayer_VisibleObjects(BaseClass*, BaseClass*); +bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + VisibilityLayer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VisibilityLayers.begin(), element->VisibilityLayers.end(), element2) == element->VisibilityLayers.end()) + { + element->VisibilityLayers.push_back(element2); + return assign_VisibilityLayer_VisibleObjects(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char DiagramObject::debugName[] = "DiagramObject"; +const char* DiagramObject::debugString() const +{ + return DiagramObject::debugName; +} + +void DiagramObject::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner DiagramObject::declare() +{ + return BaseClassDefiner(DiagramObject::addConstructToMap, DiagramObject::addPrimitiveAssignFnsToMap, DiagramObject::addClassAssignFnsToMap, DiagramObject::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObject_factory() + { + return new DiagramObject; + } +} diff --git a/CGMES_3.0.0/DiagramObject.hpp b/CGMES_3.0.0/DiagramObject.hpp new file mode 100644 index 000000000..7fb83b012 --- /dev/null +++ b/CGMES_3.0.0/DiagramObject.hpp @@ -0,0 +1,58 @@ +#ifndef DiagramObject_H +#define DiagramObject_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class Diagram; + class DiagramObjectPoint; + class DiagramObjectStyle; + 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. + */ + class DiagramObject : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObject_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiagramObjectGluePoint.cpp b/CGMES_3.0.0/DiagramObjectGluePoint.cpp new file mode 100644 index 000000000..9efe6a370 --- /dev/null +++ b/CGMES_3.0.0/DiagramObjectGluePoint.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObjectGluePoint.hpp" + +#include +#include + +#include "DiagramObjectPoint.hpp" + +using namespace CIMPP; + +DiagramObjectGluePoint::DiagramObjectGluePoint() {}; +DiagramObjectGluePoint::~DiagramObjectGluePoint() {}; + + + + +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass*, BaseClass*); +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectGluePoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DiagramObjectPoints.begin(), element->DiagramObjectPoints.end(), element2) == element->DiagramObjectPoints.end()) + { + element->DiagramObjectPoints.push_back(element2); + return assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiagramObjectGluePoint::debugName[] = "DiagramObjectGluePoint"; +const char* DiagramObjectGluePoint::debugString() const +{ + return DiagramObjectGluePoint::debugName; +} + +void DiagramObjectGluePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint"), &DiagramObjectGluePoint_factory)); +} + +void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DiagramObjectGluePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint.DiagramObjectPoints"), &assign_DiagramObjectGluePoint_DiagramObjectPoints)); +} + +const BaseClassDefiner DiagramObjectGluePoint::declare() +{ + return BaseClassDefiner(DiagramObjectGluePoint::addConstructToMap, DiagramObjectGluePoint::addPrimitiveAssignFnsToMap, DiagramObjectGluePoint::addClassAssignFnsToMap, DiagramObjectGluePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObjectGluePoint_factory() + { + return new DiagramObjectGluePoint; + } +} diff --git a/CGMES_3.0.0/DiagramObjectGluePoint.hpp b/CGMES_3.0.0/DiagramObjectGluePoint.hpp new file mode 100644 index 000000000..22fab9acf --- /dev/null +++ b/CGMES_3.0.0/DiagramObjectGluePoint.hpp @@ -0,0 +1,41 @@ +#ifndef DiagramObjectGluePoint_H +#define DiagramObjectGluePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiagramObjectGluePoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObjectGluePoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiagramObjectPoint.cpp b/CGMES_3.0.0/DiagramObjectPoint.cpp new file mode 100644 index 000000000..9567ff498 --- /dev/null +++ b/CGMES_3.0.0/DiagramObjectPoint.cpp @@ -0,0 +1,151 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObjectPoint.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sequenceNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xPosition; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yPosition; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiagramObjectPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zPosition; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramObject != element2) + { + element->DiagramObject = element2; + return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiagramObjectGluePoint != element2) + { + element->DiagramObjectGluePoint = element2; + return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char DiagramObjectPoint::debugName[] = "DiagramObjectPoint"; +const char* DiagramObjectPoint::debugString() const +{ + return DiagramObjectPoint::debugName; +} + +void DiagramObjectPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner DiagramObjectPoint::declare() +{ + return BaseClassDefiner(DiagramObjectPoint::addConstructToMap, DiagramObjectPoint::addPrimitiveAssignFnsToMap, DiagramObjectPoint::addClassAssignFnsToMap, DiagramObjectPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObjectPoint_factory() + { + return new DiagramObjectPoint; + } +} diff --git a/CGMES_3.0.0/DiagramObjectPoint.hpp b/CGMES_3.0.0/DiagramObjectPoint.hpp new file mode 100644 index 000000000..61651f8ef --- /dev/null +++ b/CGMES_3.0.0/DiagramObjectPoint.hpp @@ -0,0 +1,49 @@ +#ifndef DiagramObjectPoint_H +#define DiagramObjectPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Integer.hpp" + +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. + */ + class DiagramObjectPoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObjectPoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiagramObjectStyle.cpp b/CGMES_3.0.0/DiagramObjectStyle.cpp new file mode 100644 index 000000000..8bf2e688d --- /dev/null +++ b/CGMES_3.0.0/DiagramObjectStyle.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramObjectStyle.hpp" + +#include +#include + +#include "DiagramObject.hpp" + +using namespace CIMPP; + +DiagramObjectStyle::DiagramObjectStyle() {}; +DiagramObjectStyle::~DiagramObjectStyle() {}; + + + + +bool assign_DiagramObject_DiagramObjectStyle(BaseClass*, BaseClass*); +bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramObjectStyle* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->StyledObjects.begin(), element->StyledObjects.end(), element2) == element->StyledObjects.end()) + { + element->StyledObjects.push_back(element2); + return assign_DiagramObject_DiagramObjectStyle(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiagramObjectStyle::debugName[] = "DiagramObjectStyle"; +const char* DiagramObjectStyle::debugString() const +{ + return DiagramObjectStyle::debugName; +} + +void DiagramObjectStyle::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle"), &DiagramObjectStyle_factory)); +} + +void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DiagramObjectStyle::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle.StyledObjects"), &assign_DiagramObjectStyle_StyledObjects)); +} + +const BaseClassDefiner DiagramObjectStyle::declare() +{ + return BaseClassDefiner(DiagramObjectStyle::addConstructToMap, DiagramObjectStyle::addPrimitiveAssignFnsToMap, DiagramObjectStyle::addClassAssignFnsToMap, DiagramObjectStyle::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramObjectStyle_factory() + { + return new DiagramObjectStyle; + } +} diff --git a/CGMES_3.0.0/DiagramObjectStyle.hpp b/CGMES_3.0.0/DiagramObjectStyle.hpp new file mode 100644 index 000000000..93950a056 --- /dev/null +++ b/CGMES_3.0.0/DiagramObjectStyle.hpp @@ -0,0 +1,41 @@ +#ifndef DiagramObjectStyle_H +#define DiagramObjectStyle_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiagramObjectStyle : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DiagramObjectStyle(); + ~DiagramObjectStyle() override; + + std::list StyledObjects; /* A style can be assigned to multiple diagram objects. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramObjectStyle_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiagramStyle.cpp b/CGMES_3.0.0/DiagramStyle.cpp new file mode 100644 index 000000000..eae09c4d7 --- /dev/null +++ b/CGMES_3.0.0/DiagramStyle.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiagramStyle.hpp" + +#include +#include + +#include "Diagram.hpp" + +using namespace CIMPP; + +DiagramStyle::DiagramStyle() {}; +DiagramStyle::~DiagramStyle() {}; + + + + +bool assign_Diagram_DiagramStyle(BaseClass*, BaseClass*); +bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiagramStyle* element = dynamic_cast(BaseClass_ptr1); + Diagram* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Diagram.begin(), element->Diagram.end(), element2) == element->Diagram.end()) + { + element->Diagram.push_back(element2); + return assign_Diagram_DiagramStyle(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiagramStyle::debugName[] = "DiagramStyle"; +const char* DiagramStyle::debugString() const +{ + return DiagramStyle::debugName; +} + +void DiagramStyle::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiagramStyle"), &DiagramStyle_factory)); +} + +void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DiagramStyle::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiagramStyle.Diagram"), &assign_DiagramStyle_Diagram)); +} + +const BaseClassDefiner DiagramStyle::declare() +{ + return BaseClassDefiner(DiagramStyle::addConstructToMap, DiagramStyle::addPrimitiveAssignFnsToMap, DiagramStyle::addClassAssignFnsToMap, DiagramStyle::debugName); +} + +namespace CIMPP +{ + BaseClass* DiagramStyle_factory() + { + return new DiagramStyle; + } +} diff --git a/CGMES_3.0.0/DiagramStyle.hpp b/CGMES_3.0.0/DiagramStyle.hpp new file mode 100644 index 000000000..04de214ac --- /dev/null +++ b/CGMES_3.0.0/DiagramStyle.hpp @@ -0,0 +1,41 @@ +#ifndef DiagramStyle_H +#define DiagramStyle_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiagramStyle : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + DiagramStyle(); + ~DiagramStyle() override; + + std::list Diagram; /* A DiagramStyle can be used by many Diagrams. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiagramStyle_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp b/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp new file mode 100644 index 000000000..fecfe649c --- /dev/null +++ b/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscExcContIEEEDEC1A.hpp" + +#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() {}; + + +bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->esc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kan; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ketl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tan; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_val(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->val; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vanmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vomax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vomin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtlmt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char DiscExcContIEEEDEC1A::debugName[] = "DiscExcContIEEEDEC1A"; +const char* DiscExcContIEEEDEC1A::debugString() const +{ + return DiscExcContIEEEDEC1A::debugName; +} + +void DiscExcContIEEEDEC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscExcContIEEEDEC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiscExcContIEEEDEC1A::declare() +{ + return BaseClassDefiner(DiscExcContIEEEDEC1A::addConstructToMap, DiscExcContIEEEDEC1A::addPrimitiveAssignFnsToMap, DiscExcContIEEEDEC1A::addClassAssignFnsToMap, DiscExcContIEEEDEC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscExcContIEEEDEC1A_factory() + { + return new DiscExcContIEEEDEC1A; + } +} diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp b/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp new file mode 100644 index 000000000..1799fd129 --- /dev/null +++ b/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp @@ -0,0 +1,59 @@ +#ifndef DiscExcContIEEEDEC1A_H +#define DiscExcContIEEEDEC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class DiscExcContIEEEDEC1A : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscExcContIEEEDEC1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp b/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp new file mode 100644 index 000000000..0b0a7a11a --- /dev/null +++ b/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscExcContIEEEDEC2A.hpp" + +#include +#include + +#include "Seconds.hpp" +#include "Seconds.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {}; +DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {}; + + +bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char DiscExcContIEEEDEC2A::debugName[] = "DiscExcContIEEEDEC2A"; +const char* DiscExcContIEEEDEC2A::debugString() const +{ + return DiscExcContIEEEDEC2A::debugName; +} + +void DiscExcContIEEEDEC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscExcContIEEEDEC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiscExcContIEEEDEC2A::declare() +{ + return BaseClassDefiner(DiscExcContIEEEDEC2A::addConstructToMap, DiscExcContIEEEDEC2A::addPrimitiveAssignFnsToMap, DiscExcContIEEEDEC2A::addClassAssignFnsToMap, DiscExcContIEEEDEC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscExcContIEEEDEC2A_factory() + { + return new DiscExcContIEEEDEC2A; + } +} diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp b/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp new file mode 100644 index 000000000..43204ad45 --- /dev/null +++ b/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp @@ -0,0 +1,46 @@ +#ifndef DiscExcContIEEEDEC2A_H +#define DiscExcContIEEEDEC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class DiscExcContIEEEDEC2A : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscExcContIEEEDEC2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp b/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp new file mode 100644 index 000000000..af7d8f9ad --- /dev/null +++ b/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscExcContIEEEDEC3A.hpp" + +#include +#include + +#include "Seconds.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {}; +DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {}; + + +bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char DiscExcContIEEEDEC3A::debugName[] = "DiscExcContIEEEDEC3A"; +const char* DiscExcContIEEEDEC3A::debugString() const +{ + return DiscExcContIEEEDEC3A::debugName; +} + +void DiscExcContIEEEDEC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscExcContIEEEDEC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DiscExcContIEEEDEC3A::declare() +{ + return BaseClassDefiner(DiscExcContIEEEDEC3A::addConstructToMap, DiscExcContIEEEDEC3A::addPrimitiveAssignFnsToMap, DiscExcContIEEEDEC3A::addClassAssignFnsToMap, DiscExcContIEEEDEC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscExcContIEEEDEC3A_factory() + { + return new DiscExcContIEEEDEC3A; + } +} diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp b/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp new file mode 100644 index 000000000..db21db676 --- /dev/null +++ b/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp @@ -0,0 +1,43 @@ +#ifndef DiscExcContIEEEDEC3A_H +#define DiscExcContIEEEDEC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class DiscExcContIEEEDEC3A : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscExcContIEEEDEC3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp b/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp new file mode 100644 index 000000000..eaec6641d --- /dev/null +++ b/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DisconnectingCircuitBreaker.hpp" + +#include +#include + + +using namespace CIMPP; + +DisconnectingCircuitBreaker::DisconnectingCircuitBreaker() {}; +DisconnectingCircuitBreaker::~DisconnectingCircuitBreaker() {}; + + + +const char DisconnectingCircuitBreaker::debugName[] = "DisconnectingCircuitBreaker"; +const char* DisconnectingCircuitBreaker::debugString() const +{ + return DisconnectingCircuitBreaker::debugName; +} + +void DisconnectingCircuitBreaker::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DisconnectingCircuitBreaker"), &DisconnectingCircuitBreaker_factory)); +} + +void DisconnectingCircuitBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void DisconnectingCircuitBreaker::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DisconnectingCircuitBreaker::declare() +{ + return BaseClassDefiner(DisconnectingCircuitBreaker::addConstructToMap, DisconnectingCircuitBreaker::addPrimitiveAssignFnsToMap, DisconnectingCircuitBreaker::addClassAssignFnsToMap, DisconnectingCircuitBreaker::debugName); +} + +namespace CIMPP +{ + BaseClass* DisconnectingCircuitBreaker_factory() + { + return new DisconnectingCircuitBreaker; + } +} diff --git a/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp b/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp new file mode 100644 index 000000000..3670a0f6e --- /dev/null +++ b/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp @@ -0,0 +1,39 @@ +#ifndef DisconnectingCircuitBreaker_H +#define DisconnectingCircuitBreaker_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Breaker.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A circuit breaking device including disconnecting function, eliminating the need for separate disconnectors. + */ + class DisconnectingCircuitBreaker : public Breaker + { + public: + /* constructor initialising all attributes to null */ + DisconnectingCircuitBreaker(); + ~DisconnectingCircuitBreaker() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DisconnectingCircuitBreaker_factory(); +} +#endif diff --git a/CGMES_3.0.0/Disconnector.cpp b/CGMES_3.0.0/Disconnector.cpp new file mode 100644 index 000000000..4c56bdfb9 --- /dev/null +++ b/CGMES_3.0.0/Disconnector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Disconnector.hpp" + +#include +#include + + +using namespace CIMPP; + +Disconnector::Disconnector() {}; +Disconnector::~Disconnector() {}; + + + +const char Disconnector::debugName[] = "Disconnector"; +const char* Disconnector::debugString() const +{ + return Disconnector::debugName; +} + +void Disconnector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Disconnector"), &Disconnector_factory)); +} + +void Disconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Disconnector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Disconnector::declare() +{ + return BaseClassDefiner(Disconnector::addConstructToMap, Disconnector::addPrimitiveAssignFnsToMap, Disconnector::addClassAssignFnsToMap, Disconnector::debugName); +} + +namespace CIMPP +{ + BaseClass* Disconnector_factory() + { + return new Disconnector; + } +} diff --git a/CGMES_3.0.0/Disconnector.hpp b/CGMES_3.0.0/Disconnector.hpp new file mode 100644 index 000000000..a818915ac --- /dev/null +++ b/CGMES_3.0.0/Disconnector.hpp @@ -0,0 +1,39 @@ +#ifndef Disconnector_H +#define Disconnector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Disconnector : public Switch + { + public: + /* constructor initialising all attributes to null */ + Disconnector(); + ~Disconnector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Disconnector_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp new file mode 100644 index 000000000..edf98a3ae --- /dev/null +++ b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscontinuousExcitationControlDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; +DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); +bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); +bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiscontinuousExcitationControlDynamics::debugName[] = "DiscontinuousExcitationControlDynamics"; +const char* DiscontinuousExcitationControlDynamics::debugString() const +{ + return DiscontinuousExcitationControlDynamics::debugName; +} + +void DiscontinuousExcitationControlDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics"), &DiscontinuousExcitationControlDynamics_factory)); +} + +void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner DiscontinuousExcitationControlDynamics::declare() +{ + return BaseClassDefiner(DiscontinuousExcitationControlDynamics::addConstructToMap, DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap, DiscontinuousExcitationControlDynamics::addClassAssignFnsToMap, DiscontinuousExcitationControlDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscontinuousExcitationControlDynamics_factory() + { + return new DiscontinuousExcitationControlDynamics; + } +} diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp new file mode 100644 index 000000000..f9098e3c4 --- /dev/null +++ b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef DiscontinuousExcitationControlDynamics_H +#define DiscontinuousExcitationControlDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class DiscontinuousExcitationControlDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscontinuousExcitationControlDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp new file mode 100644 index 000000000..f0cdf252e --- /dev/null +++ b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscontinuousExcitationControlUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {}; +DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {}; + + + +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) +{ + DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char DiscontinuousExcitationControlUserDefined::debugName[] = "DiscontinuousExcitationControlUserDefined"; +const char* DiscontinuousExcitationControlUserDefined::debugString() const +{ + return DiscontinuousExcitationControlUserDefined::debugName; +} + +void DiscontinuousExcitationControlUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics"), &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner DiscontinuousExcitationControlUserDefined::declare() +{ + return BaseClassDefiner(DiscontinuousExcitationControlUserDefined::addConstructToMap, DiscontinuousExcitationControlUserDefined::addPrimitiveAssignFnsToMap, DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap, DiscontinuousExcitationControlUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscontinuousExcitationControlUserDefined_factory() + { + return new DiscontinuousExcitationControlUserDefined; + } +} diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp new file mode 100644 index 000000000..004a1f072 --- /dev/null +++ b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef DiscontinuousExcitationControlUserDefined_H +#define DiscontinuousExcitationControlUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Discontinuous excitation control function block whose dynamic behaviour is described by a user-defined model. + */ + class DiscontinuousExcitationControlUserDefined : public DiscontinuousExcitationControlDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscontinuousExcitationControlUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/Discrete.cpp b/CGMES_3.0.0/Discrete.cpp new file mode 100644 index 000000000..d6d1f006f --- /dev/null +++ b/CGMES_3.0.0/Discrete.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Discrete.hpp" + +#include +#include + +#include "DiscreteValue.hpp" +#include "ValueAliasSet.hpp" + +using namespace CIMPP; + +Discrete::Discrete() : ValueAliasSet(nullptr) {}; +Discrete::~Discrete() {}; + + + + + +bool assign_DiscreteValue_Discrete(BaseClass*, BaseClass*); +bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Discrete* element = dynamic_cast(BaseClass_ptr1); + DiscreteValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DiscreteValues.begin(), element->DiscreteValues.end(), element2) == element->DiscreteValues.end()) + { + element->DiscreteValues.push_back(element2); + return assign_DiscreteValue_Discrete(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ValueAliasSet_Discretes(BaseClass*, BaseClass*); +bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Discrete* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_Discretes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Discrete::debugName[] = "Discrete"; +const char* Discrete::debugString() const +{ + return Discrete::debugName; +} + +void Discrete::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Discrete"), &Discrete_factory)); +} + +void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Discrete::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Discrete::declare() +{ + return BaseClassDefiner(Discrete::addConstructToMap, Discrete::addPrimitiveAssignFnsToMap, Discrete::addClassAssignFnsToMap, Discrete::debugName); +} + +namespace CIMPP +{ + BaseClass* Discrete_factory() + { + return new Discrete; + } +} diff --git a/CGMES_3.0.0/Discrete.hpp b/CGMES_3.0.0/Discrete.hpp new file mode 100644 index 000000000..84b65a120 --- /dev/null +++ b/CGMES_3.0.0/Discrete.hpp @@ -0,0 +1,43 @@ +#ifndef Discrete_H +#define Discrete_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DiscreteValue; + class ValueAliasSet; + + /* + Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. + */ + class Discrete : public Measurement + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Discrete_factory(); +} +#endif diff --git a/CGMES_3.0.0/DiscreteValue.cpp b/CGMES_3.0.0/DiscreteValue.cpp new file mode 100644 index 000000000..d30695a8d --- /dev/null +++ b/CGMES_3.0.0/DiscreteValue.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DiscreteValue.hpp" + +#include +#include + +#include "Command.hpp" +#include "Discrete.hpp" + +using namespace CIMPP; + +DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {}; +DiscreteValue::~DiscreteValue() {}; + + + + + +bool assign_Command_DiscreteValue(BaseClass*, BaseClass*); +bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + Command* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Command != element2) + { + element->Command = element2; + return assign_Command_DiscreteValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Discrete_DiscreteValues(BaseClass*, BaseClass*); +bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + Discrete* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Discrete != element2) + { + element->Discrete = element2; + return assign_Discrete_DiscreteValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char DiscreteValue::debugName[] = "DiscreteValue"; +const char* DiscreteValue::debugString() const +{ + return DiscreteValue::debugName; +} + +void DiscreteValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:DiscreteValue"), &DiscreteValue_factory)); +} + +void DiscreteValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner DiscreteValue::declare() +{ + return BaseClassDefiner(DiscreteValue::addConstructToMap, DiscreteValue::addPrimitiveAssignFnsToMap, DiscreteValue::addClassAssignFnsToMap, DiscreteValue::debugName); +} + +namespace CIMPP +{ + BaseClass* DiscreteValue_factory() + { + return new DiscreteValue; + } +} diff --git a/CGMES_3.0.0/DiscreteValue.hpp b/CGMES_3.0.0/DiscreteValue.hpp new file mode 100644 index 000000000..18418eeba --- /dev/null +++ b/CGMES_3.0.0/DiscreteValue.hpp @@ -0,0 +1,43 @@ +#ifndef DiscreteValue_H +#define DiscreteValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Command; + class Discrete; + + /* + DiscreteValue represents a discrete MeasurementValue. + */ + class DiscreteValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DiscreteValue_factory(); +} +#endif diff --git a/CGMES_3.0.0/DroopSignalFeedbackKind.cpp b/CGMES_3.0.0/DroopSignalFeedbackKind.cpp new file mode 100644 index 000000000..ca339f115 --- /dev/null +++ b/CGMES_3.0.0/DroopSignalFeedbackKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DroopSignalFeedbackKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +DroopSignalFeedbackKind& DroopSignalFeedbackKind::operator=(DroopSignalFeedbackKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +DroopSignalFeedbackKind::operator DroopSignalFeedbackKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char DroopSignalFeedbackKind::debugName[] = "DroopSignalFeedbackKind"; +const char* DroopSignalFeedbackKind::debugString() const +{ + return DroopSignalFeedbackKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, DroopSignalFeedbackKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "electricalPower") + { + rop = DroopSignalFeedbackKind::electricalPower; + return lop; + } + if(EnumSymbol == "none") + { + rop = DroopSignalFeedbackKind::none; + return lop; + } + if(EnumSymbol == "fuelValveStroke") + { + rop = DroopSignalFeedbackKind::fuelValveStroke; + return lop; + } + if(EnumSymbol == "governorOutput") + { + rop = DroopSignalFeedbackKind::governorOutput; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const DroopSignalFeedbackKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == DroopSignalFeedbackKind::electricalPower) + { + EnumSymbol = "electricalPower"; + } + if (obj.value == DroopSignalFeedbackKind::none) + { + EnumSymbol = "none"; + } + if (obj.value == DroopSignalFeedbackKind::fuelValveStroke) + { + EnumSymbol = "fuelValveStroke"; + } + if (obj.value == DroopSignalFeedbackKind::governorOutput) + { + EnumSymbol = "governorOutput"; + } + + if (!EnumSymbol.empty()) + { + os << "DroopSignalFeedbackKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/DroopSignalFeedbackKind.hpp b/CGMES_3.0.0/DroopSignalFeedbackKind.hpp new file mode 100644 index 000000000..de948a1bc --- /dev/null +++ b/CGMES_3.0.0/DroopSignalFeedbackKind.hpp @@ -0,0 +1,54 @@ +#ifndef DroopSignalFeedbackKind_H +#define DroopSignalFeedbackKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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). + */ + electricalPower, + /** + * 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). + */ + fuelValveStroke, + /** + * Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). + */ + governorOutput, + }; + + DroopSignalFeedbackKind() : value(), initialized(false) {} + DroopSignalFeedbackKind(DroopSignalFeedbackKind_ENUM value) : value(value), initialized(true) {} + + DroopSignalFeedbackKind& operator=(DroopSignalFeedbackKind_ENUM rop); + operator DroopSignalFeedbackKind_ENUM() const; + + DroopSignalFeedbackKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, DroopSignalFeedbackKind& rop); + friend std::ostream& operator<<(std::ostream& os, const DroopSignalFeedbackKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/DynamicsFunctionBlock.cpp b/CGMES_3.0.0/DynamicsFunctionBlock.cpp new file mode 100644 index 000000000..d45cc9fc5 --- /dev/null +++ b/CGMES_3.0.0/DynamicsFunctionBlock.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "DynamicsFunctionBlock.hpp" + +#include +#include + +#include "Boolean.hpp" + +using namespace CIMPP; + +DynamicsFunctionBlock::DynamicsFunctionBlock() {}; +DynamicsFunctionBlock::~DynamicsFunctionBlock() {}; + + +bool assign_DynamicsFunctionBlock_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->enabled; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char DynamicsFunctionBlock::debugName[] = "DynamicsFunctionBlock"; +const char* DynamicsFunctionBlock::debugString() const +{ + return DynamicsFunctionBlock::debugName; +} + +void DynamicsFunctionBlock::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void DynamicsFunctionBlock::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner DynamicsFunctionBlock::declare() +{ + return BaseClassDefiner(DynamicsFunctionBlock::addConstructToMap, DynamicsFunctionBlock::addPrimitiveAssignFnsToMap, DynamicsFunctionBlock::addClassAssignFnsToMap, DynamicsFunctionBlock::debugName); +} + +namespace CIMPP +{ + BaseClass* DynamicsFunctionBlock_factory() + { + return new DynamicsFunctionBlock; + } +} diff --git a/CGMES_3.0.0/DynamicsFunctionBlock.hpp b/CGMES_3.0.0/DynamicsFunctionBlock.hpp new file mode 100644 index 000000000..75c86d07d --- /dev/null +++ b/CGMES_3.0.0/DynamicsFunctionBlock.hpp @@ -0,0 +1,41 @@ +#ifndef DynamicsFunctionBlock_H +#define DynamicsFunctionBlock_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + + /* + Abstract parent class for all Dynamics function blocks. + */ + class DynamicsFunctionBlock : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* DynamicsFunctionBlock_factory(); +} +#endif diff --git a/CGMES_3.0.0/EarthFaultCompensator.cpp b/CGMES_3.0.0/EarthFaultCompensator.cpp new file mode 100644 index 000000000..3d4c826d4 --- /dev/null +++ b/CGMES_3.0.0/EarthFaultCompensator.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EarthFaultCompensator.hpp" + +#include +#include + +#include "Resistance.hpp" + +using namespace CIMPP; + +EarthFaultCompensator::EarthFaultCompensator() {}; +EarthFaultCompensator::~EarthFaultCompensator() {}; + + +bool assign_EarthFaultCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char EarthFaultCompensator::debugName[] = "EarthFaultCompensator"; +const char* EarthFaultCompensator::debugString() const +{ + return EarthFaultCompensator::debugName; +} + +void EarthFaultCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EarthFaultCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EarthFaultCompensator::declare() +{ + return BaseClassDefiner(EarthFaultCompensator::addConstructToMap, EarthFaultCompensator::addPrimitiveAssignFnsToMap, EarthFaultCompensator::addClassAssignFnsToMap, EarthFaultCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* EarthFaultCompensator_factory() + { + return new EarthFaultCompensator; + } +} diff --git a/CGMES_3.0.0/EarthFaultCompensator.hpp b/CGMES_3.0.0/EarthFaultCompensator.hpp new file mode 100644 index 000000000..790f9d8bf --- /dev/null +++ b/CGMES_3.0.0/EarthFaultCompensator.hpp @@ -0,0 +1,41 @@ +#ifndef EarthFaultCompensator_H +#define EarthFaultCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Resistance.hpp" + +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. + */ + class EarthFaultCompensator : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + EarthFaultCompensator(); + ~EarthFaultCompensator() override; + + CIMPP::Resistance r; /* Nominal resistance of device. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EarthFaultCompensator_factory(); +} +#endif diff --git a/CGMES_3.0.0/EnergyArea.cpp b/CGMES_3.0.0/EnergyArea.cpp new file mode 100644 index 000000000..e32dc8db6 --- /dev/null +++ b/CGMES_3.0.0/EnergyArea.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergyArea.hpp" + +#include +#include + +#include "ControlArea.hpp" + +using namespace CIMPP; + +EnergyArea::EnergyArea() : ControlArea(nullptr) {}; +EnergyArea::~EnergyArea() {}; + + + + +bool assign_ControlArea_EnergyArea(BaseClass*, BaseClass*); +bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergyArea* element = dynamic_cast(BaseClass_ptr1); + ControlArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ControlArea != element2) + { + element->ControlArea = element2; + return assign_ControlArea_EnergyArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EnergyArea::debugName[] = "EnergyArea"; +const char* EnergyArea::debugString() const +{ + return EnergyArea::debugName; +} + +void EnergyArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EnergyArea"), &EnergyArea_factory)); +} + +void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EnergyArea::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EnergyArea.ControlArea"), &assign_EnergyArea_ControlArea)); +} + +const BaseClassDefiner EnergyArea::declare() +{ + return BaseClassDefiner(EnergyArea::addConstructToMap, EnergyArea::addPrimitiveAssignFnsToMap, EnergyArea::addClassAssignFnsToMap, EnergyArea::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergyArea_factory() + { + return new EnergyArea; + } +} diff --git a/CGMES_3.0.0/EnergyArea.hpp b/CGMES_3.0.0/EnergyArea.hpp new file mode 100644 index 000000000..6974a9a94 --- /dev/null +++ b/CGMES_3.0.0/EnergyArea.hpp @@ -0,0 +1,41 @@ +#ifndef EnergyArea_H +#define EnergyArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class EnergyArea : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + EnergyArea(); + ~EnergyArea() override; + + CIMPP::ControlArea* ControlArea; /* The control area specification that is used for the load forecast. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergyArea_factory(); +} +#endif diff --git a/CGMES_3.0.0/EnergyConnection.cpp b/CGMES_3.0.0/EnergyConnection.cpp new file mode 100644 index 000000000..afdb672ff --- /dev/null +++ b/CGMES_3.0.0/EnergyConnection.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergyConnection.hpp" + +#include +#include + + +using namespace CIMPP; + +EnergyConnection::EnergyConnection() {}; +EnergyConnection::~EnergyConnection() {}; + + + +const char EnergyConnection::debugName[] = "EnergyConnection"; +const char* EnergyConnection::debugString() const +{ + return EnergyConnection::debugName; +} + +void EnergyConnection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EnergyConnection"), &EnergyConnection_factory)); +} + +void EnergyConnection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EnergyConnection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EnergyConnection::declare() +{ + return BaseClassDefiner(EnergyConnection::addConstructToMap, EnergyConnection::addPrimitiveAssignFnsToMap, EnergyConnection::addClassAssignFnsToMap, EnergyConnection::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergyConnection_factory() + { + return new EnergyConnection; + } +} diff --git a/CGMES_3.0.0/EnergyConnection.hpp b/CGMES_3.0.0/EnergyConnection.hpp new file mode 100644 index 000000000..b91b1db2a --- /dev/null +++ b/CGMES_3.0.0/EnergyConnection.hpp @@ -0,0 +1,39 @@ +#ifndef EnergyConnection_H +#define EnergyConnection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A connection of energy generation or consumption on the power system model. + */ + class EnergyConnection : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + EnergyConnection(); + ~EnergyConnection() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergyConnection_factory(); +} +#endif diff --git a/CGMES_3.0.0/EnergyConsumer.cpp b/CGMES_3.0.0/EnergyConsumer.cpp new file mode 100644 index 000000000..8aa4ba5f9 --- /dev/null +++ b/CGMES_3.0.0/EnergyConsumer.cpp @@ -0,0 +1,183 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergyConsumer.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_EnergyConsumer_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_pfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfixed; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_pfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfixedPct; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_qfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qfixed; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergyConsumer_qfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qfixedPct; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + 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; +} + + + + + + + +const char EnergyConsumer::debugName[] = "EnergyConsumer"; +const char* EnergyConsumer::debugString() const +{ + return EnergyConsumer::debugName; +} + +void EnergyConsumer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner EnergyConsumer::declare() +{ + return BaseClassDefiner(EnergyConsumer::addConstructToMap, EnergyConsumer::addPrimitiveAssignFnsToMap, EnergyConsumer::addClassAssignFnsToMap, EnergyConsumer::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergyConsumer_factory() + { + return new EnergyConsumer; + } +} diff --git a/CGMES_3.0.0/EnergyConsumer.hpp b/CGMES_3.0.0/EnergyConsumer.hpp new file mode 100644 index 000000000..470197723 --- /dev/null +++ b/CGMES_3.0.0/EnergyConsumer.hpp @@ -0,0 +1,52 @@ +#ifndef EnergyConsumer_H +#define EnergyConsumer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConnection.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PerCent.hpp" +#include "ReactivePower.hpp" + +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. + */ + class EnergyConsumer : public EnergyConnection + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergyConsumer_factory(); +} +#endif diff --git a/CGMES_3.0.0/EnergySchedulingType.cpp b/CGMES_3.0.0/EnergySchedulingType.cpp new file mode 100644 index 000000000..aba3d7573 --- /dev/null +++ b/CGMES_3.0.0/EnergySchedulingType.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergySchedulingType.hpp" + +#include +#include + +#include "EnergySource.hpp" + +using namespace CIMPP; + +EnergySchedulingType::EnergySchedulingType() {}; +EnergySchedulingType::~EnergySchedulingType() {}; + + + + +bool assign_EnergySource_EnergySchedulingType(BaseClass*, BaseClass*); +bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySchedulingType* element = dynamic_cast(BaseClass_ptr1); + EnergySource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergySource.begin(), element->EnergySource.end(), element2) == element->EnergySource.end()) + { + element->EnergySource.push_back(element2); + return assign_EnergySource_EnergySchedulingType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EnergySchedulingType::debugName[] = "EnergySchedulingType"; +const char* EnergySchedulingType::debugString() const +{ + return EnergySchedulingType::debugName; +} + +void EnergySchedulingType::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EnergySchedulingType"), &EnergySchedulingType_factory)); +} + +void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EnergySchedulingType::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EnergySchedulingType.EnergySource"), &assign_EnergySchedulingType_EnergySource)); +} + +const BaseClassDefiner EnergySchedulingType::declare() +{ + return BaseClassDefiner(EnergySchedulingType::addConstructToMap, EnergySchedulingType::addPrimitiveAssignFnsToMap, EnergySchedulingType::addClassAssignFnsToMap, EnergySchedulingType::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergySchedulingType_factory() + { + return new EnergySchedulingType; + } +} diff --git a/CGMES_3.0.0/EnergySchedulingType.hpp b/CGMES_3.0.0/EnergySchedulingType.hpp new file mode 100644 index 000000000..c93b8a9cd --- /dev/null +++ b/CGMES_3.0.0/EnergySchedulingType.hpp @@ -0,0 +1,41 @@ +#ifndef EnergySchedulingType_H +#define EnergySchedulingType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class EnergySource; + + /* + Used to define the type of generation for scheduling purposes. + */ + class EnergySchedulingType : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + EnergySchedulingType(); + ~EnergySchedulingType() override; + + std::list EnergySource; /* Energy Source of a particular Energy Scheduling Type. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergySchedulingType_factory(); +} +#endif diff --git a/CGMES_3.0.0/EnergySource.cpp b/CGMES_3.0.0/EnergySource.cpp new file mode 100644 index 000000000..cfd8c424c --- /dev/null +++ b/CGMES_3.0.0/EnergySource.cpp @@ -0,0 +1,275 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EnergySource.hpp" + +#include +#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() {}; + + + +bool assign_EnergySource_activePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->activePower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalVoltage; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_pMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_pMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_reactivePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->reactivePower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_rn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_voltageAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageAngle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_voltageMagnitude(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageMagnitude; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EnergySource_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + +const char EnergySource::debugName[] = "EnergySource"; +const char* EnergySource::debugString() const +{ + return EnergySource::debugName; +} + +void EnergySource::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EnergySource::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EnergySource.EnergySchedulingType"), &assign_EnergySource_EnergySchedulingType)); +} + +const BaseClassDefiner EnergySource::declare() +{ + return BaseClassDefiner(EnergySource::addConstructToMap, EnergySource::addPrimitiveAssignFnsToMap, EnergySource::addClassAssignFnsToMap, EnergySource::debugName); +} + +namespace CIMPP +{ + BaseClass* EnergySource_factory() + { + return new EnergySource; + } +} diff --git a/CGMES_3.0.0/EnergySource.hpp b/CGMES_3.0.0/EnergySource.hpp new file mode 100644 index 000000000..66ce886c2 --- /dev/null +++ b/CGMES_3.0.0/EnergySource.hpp @@ -0,0 +1,60 @@ +#ifndef EnergySource_H +#define EnergySource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConnection.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "AngleRadians.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class EnergySchedulingType; + + /* + A generic equivalent for an energy supplier on a transmission or distribution voltage level. + */ + class EnergySource : public EnergyConnection + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EnergySource_factory(); +} +#endif diff --git a/CGMES_3.0.0/Equipment.cpp b/CGMES_3.0.0/Equipment.cpp new file mode 100644 index 000000000..b06c5361d --- /dev/null +++ b/CGMES_3.0.0/Equipment.cpp @@ -0,0 +1,135 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Equipment.hpp" + +#include +#include + +#include "EquipmentContainer.hpp" +#include "OperationalLimitSet.hpp" +#include "Boolean.hpp" +#include "Boolean.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +Equipment::Equipment() : EquipmentContainer(nullptr) {}; +Equipment::~Equipment() {}; + + + + +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_Equipment_inService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Equipment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inService; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Equipment_normallyInService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Equipment* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normallyInService; + 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) +{ + Equipment* element = dynamic_cast(BaseClass_ptr1); + EquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EquipmentContainer != element2) + { + element->EquipmentContainer = element2; + return assign_EquipmentContainer_Equipments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); +bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Equipment* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + +const char Equipment::debugName[] = "Equipment"; +const char* Equipment::debugString() const +{ + return Equipment::debugName; +} + +void Equipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Equipment::declare() +{ + return BaseClassDefiner(Equipment::addConstructToMap, Equipment::addPrimitiveAssignFnsToMap, Equipment::addClassAssignFnsToMap, Equipment::debugName); +} + +namespace CIMPP +{ + BaseClass* Equipment_factory() + { + return new Equipment; + } +} diff --git a/CGMES_3.0.0/Equipment.hpp b/CGMES_3.0.0/Equipment.hpp new file mode 100644 index 000000000..d4a1199cb --- /dev/null +++ b/CGMES_3.0.0/Equipment.hpp @@ -0,0 +1,47 @@ +#ifndef Equipment_H +#define Equipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class EquipmentContainer; + class OperationalLimitSet; + + /* + The parts of a power system that are physical devices, electronic or mechanical. + */ + class Equipment : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Equipment_factory(); +} +#endif diff --git a/CGMES_3.0.0/EquipmentContainer.cpp b/CGMES_3.0.0/EquipmentContainer.cpp new file mode 100644 index 000000000..c2a2d9b74 --- /dev/null +++ b/CGMES_3.0.0/EquipmentContainer.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquipmentContainer.hpp" + +#include +#include + +#include "Equipment.hpp" + +using namespace CIMPP; + +EquipmentContainer::EquipmentContainer() {}; +EquipmentContainer::~EquipmentContainer() {}; + + + + +bool assign_Equipment_EquipmentContainer(BaseClass*, BaseClass*); +bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquipmentContainer* element = dynamic_cast(BaseClass_ptr1); + Equipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Equipments.begin(), element->Equipments.end(), element2) == element->Equipments.end()) + { + element->Equipments.push_back(element2); + return assign_Equipment_EquipmentContainer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EquipmentContainer::debugName[] = "EquipmentContainer"; +const char* EquipmentContainer::debugString() const +{ + return EquipmentContainer::debugName; +} + +void EquipmentContainer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EquipmentContainer"), &EquipmentContainer_factory)); +} + +void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EquipmentContainer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquipmentContainer.Equipments"), &assign_EquipmentContainer_Equipments)); +} + +const BaseClassDefiner EquipmentContainer::declare() +{ + return BaseClassDefiner(EquipmentContainer::addConstructToMap, EquipmentContainer::addPrimitiveAssignFnsToMap, EquipmentContainer::addClassAssignFnsToMap, EquipmentContainer::debugName); +} + +namespace CIMPP +{ + BaseClass* EquipmentContainer_factory() + { + return new EquipmentContainer; + } +} diff --git a/CGMES_3.0.0/EquipmentContainer.hpp b/CGMES_3.0.0/EquipmentContainer.hpp new file mode 100644 index 000000000..ed3285545 --- /dev/null +++ b/CGMES_3.0.0/EquipmentContainer.hpp @@ -0,0 +1,41 @@ +#ifndef EquipmentContainer_H +#define EquipmentContainer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConnectivityNodeContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Equipment; + + /* + A modelling construct to provide a root class for containing equipment. + */ + class EquipmentContainer : public ConnectivityNodeContainer + { + public: + /* constructor initialising all attributes to null */ + EquipmentContainer(); + ~EquipmentContainer() override; + + std::list Equipments; /* Contained equipment. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquipmentContainer_factory(); +} +#endif diff --git a/CGMES_3.0.0/EquivalentBranch.cpp b/CGMES_3.0.0/EquivalentBranch.cpp new file mode 100644 index 000000000..306a28be7 --- /dev/null +++ b/CGMES_3.0.0/EquivalentBranch.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentBranch.hpp" + +#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() {}; + + +bool assign_EquivalentBranch_negativeR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeR12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_negativeR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeR21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_negativeX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeX12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_negativeX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->negativeX21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveR12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveR21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveX12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_positiveX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positiveX21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_r21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_x21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroR12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroR21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroX12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentBranch_zeroX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeroX21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char EquivalentBranch::debugName[] = "EquivalentBranch"; +const char* EquivalentBranch::debugString() const +{ + return EquivalentBranch::debugName; +} + +void EquivalentBranch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquivalentBranch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EquivalentBranch::declare() +{ + return BaseClassDefiner(EquivalentBranch::addConstructToMap, EquivalentBranch::addPrimitiveAssignFnsToMap, EquivalentBranch::addClassAssignFnsToMap, EquivalentBranch::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentBranch_factory() + { + return new EquivalentBranch; + } +} diff --git a/CGMES_3.0.0/EquivalentBranch.hpp b/CGMES_3.0.0/EquivalentBranch.hpp new file mode 100644 index 000000000..92c697d81 --- /dev/null +++ b/CGMES_3.0.0/EquivalentBranch.hpp @@ -0,0 +1,57 @@ +#ifndef EquivalentBranch_H +#define EquivalentBranch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquivalentEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" + +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. + */ + class EquivalentBranch : public EquivalentEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentBranch_factory(); +} +#endif diff --git a/CGMES_3.0.0/EquivalentEquipment.cpp b/CGMES_3.0.0/EquivalentEquipment.cpp new file mode 100644 index 000000000..4591a9d2c --- /dev/null +++ b/CGMES_3.0.0/EquivalentEquipment.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentEquipment.hpp" + +#include +#include + +#include "EquivalentNetwork.hpp" + +using namespace CIMPP; + +EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {}; +EquivalentEquipment::~EquivalentEquipment() {}; + + + + +bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass*, BaseClass*); +bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1); + EquivalentNetwork* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EquivalentNetwork != element2) + { + element->EquivalentNetwork = element2; + return assign_EquivalentNetwork_EquivalentEquipments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EquivalentEquipment::debugName[] = "EquivalentEquipment"; +const char* EquivalentEquipment::debugString() const +{ + return EquivalentEquipment::debugName; +} + +void EquivalentEquipment::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EquivalentEquipment"), &EquivalentEquipment_factory)); +} + +void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EquivalentEquipment::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquivalentEquipment.EquivalentNetwork"), &assign_EquivalentEquipment_EquivalentNetwork)); +} + +const BaseClassDefiner EquivalentEquipment::declare() +{ + return BaseClassDefiner(EquivalentEquipment::addConstructToMap, EquivalentEquipment::addPrimitiveAssignFnsToMap, EquivalentEquipment::addClassAssignFnsToMap, EquivalentEquipment::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentEquipment_factory() + { + return new EquivalentEquipment; + } +} diff --git a/CGMES_3.0.0/EquivalentEquipment.hpp b/CGMES_3.0.0/EquivalentEquipment.hpp new file mode 100644 index 000000000..3ca9f8d33 --- /dev/null +++ b/CGMES_3.0.0/EquivalentEquipment.hpp @@ -0,0 +1,41 @@ +#ifndef EquivalentEquipment_H +#define EquivalentEquipment_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class EquivalentEquipment : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + EquivalentEquipment(); + ~EquivalentEquipment() override; + + CIMPP::EquivalentNetwork* EquivalentNetwork; /* The equivalent where the reduced model belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentEquipment_factory(); +} +#endif diff --git a/CGMES_3.0.0/EquivalentInjection.cpp b/CGMES_3.0.0/EquivalentInjection.cpp new file mode 100644 index 000000000..c2be44fd4 --- /dev/null +++ b/CGMES_3.0.0/EquivalentInjection.cpp @@ -0,0 +1,307 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentInjection.hpp" + +#include +#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() {}; + + + +bool assign_EquivalentInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_regulationCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->regulationCapability; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_regulationStatus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->regulationStatus; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_regulationTarget(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->regulationTarget; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentInjection_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + + + +const char EquivalentInjection::debugName[] = "EquivalentInjection"; +const char* EquivalentInjection::debugString() const +{ + return EquivalentInjection::debugName; +} + +void EquivalentInjection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquivalentInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.ReactiveCapabilityCurve"), &assign_EquivalentInjection_ReactiveCapabilityCurve)); +} + +const BaseClassDefiner EquivalentInjection::declare() +{ + return BaseClassDefiner(EquivalentInjection::addConstructToMap, EquivalentInjection::addPrimitiveAssignFnsToMap, EquivalentInjection::addClassAssignFnsToMap, EquivalentInjection::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentInjection_factory() + { + return new EquivalentInjection; + } +} diff --git a/CGMES_3.0.0/EquivalentInjection.hpp b/CGMES_3.0.0/EquivalentInjection.hpp new file mode 100644 index 000000000..66acd4476 --- /dev/null +++ b/CGMES_3.0.0/EquivalentInjection.hpp @@ -0,0 +1,62 @@ +#ifndef EquivalentInjection_H +#define EquivalentInjection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquivalentEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class ReactiveCapabilityCurve; + + /* + This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. + */ + class EquivalentInjection : public EquivalentEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentInjection_factory(); +} +#endif diff --git a/CGMES_3.0.0/EquivalentNetwork.cpp b/CGMES_3.0.0/EquivalentNetwork.cpp new file mode 100644 index 000000000..f8ed0f8da --- /dev/null +++ b/CGMES_3.0.0/EquivalentNetwork.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentNetwork.hpp" + +#include +#include + +#include "EquivalentEquipment.hpp" + +using namespace CIMPP; + +EquivalentNetwork::EquivalentNetwork() {}; +EquivalentNetwork::~EquivalentNetwork() {}; + + + + +bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass*, BaseClass*); +bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentNetwork* element = dynamic_cast(BaseClass_ptr1); + EquivalentEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EquivalentEquipments.begin(), element->EquivalentEquipments.end(), element2) == element->EquivalentEquipments.end()) + { + element->EquivalentEquipments.push_back(element2); + return assign_EquivalentEquipment_EquivalentNetwork(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char EquivalentNetwork::debugName[] = "EquivalentNetwork"; +const char* EquivalentNetwork::debugString() const +{ + return EquivalentNetwork::debugName; +} + +void EquivalentNetwork::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:EquivalentNetwork"), &EquivalentNetwork_factory)); +} + +void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void EquivalentNetwork::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:EquivalentNetwork.EquivalentEquipments"), &assign_EquivalentNetwork_EquivalentEquipments)); +} + +const BaseClassDefiner EquivalentNetwork::declare() +{ + return BaseClassDefiner(EquivalentNetwork::addConstructToMap, EquivalentNetwork::addPrimitiveAssignFnsToMap, EquivalentNetwork::addClassAssignFnsToMap, EquivalentNetwork::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentNetwork_factory() + { + return new EquivalentNetwork; + } +} diff --git a/CGMES_3.0.0/EquivalentNetwork.hpp b/CGMES_3.0.0/EquivalentNetwork.hpp new file mode 100644 index 000000000..d1e7f4682 --- /dev/null +++ b/CGMES_3.0.0/EquivalentNetwork.hpp @@ -0,0 +1,41 @@ +#ifndef EquivalentNetwork_H +#define EquivalentNetwork_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConnectivityNodeContainer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class EquivalentNetwork : public ConnectivityNodeContainer + { + public: + /* constructor initialising all attributes to null */ + EquivalentNetwork(); + ~EquivalentNetwork() override; + + std::list EquivalentEquipments; /* The associated reduced equivalents. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentNetwork_factory(); +} +#endif diff --git a/CGMES_3.0.0/EquivalentShunt.cpp b/CGMES_3.0.0/EquivalentShunt.cpp new file mode 100644 index 000000000..b62bb06bd --- /dev/null +++ b/CGMES_3.0.0/EquivalentShunt.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "EquivalentShunt.hpp" + +#include +#include + +#include "Susceptance.hpp" +#include "Conductance.hpp" + +using namespace CIMPP; + +EquivalentShunt::EquivalentShunt() {}; +EquivalentShunt::~EquivalentShunt() {}; + + +bool assign_EquivalentShunt_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_EquivalentShunt_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char EquivalentShunt::debugName[] = "EquivalentShunt"; +const char* EquivalentShunt::debugString() const +{ + return EquivalentShunt::debugName; +} + +void EquivalentShunt::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void EquivalentShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner EquivalentShunt::declare() +{ + return BaseClassDefiner(EquivalentShunt::addConstructToMap, EquivalentShunt::addPrimitiveAssignFnsToMap, EquivalentShunt::addClassAssignFnsToMap, EquivalentShunt::debugName); +} + +namespace CIMPP +{ + BaseClass* EquivalentShunt_factory() + { + return new EquivalentShunt; + } +} diff --git a/CGMES_3.0.0/EquivalentShunt.hpp b/CGMES_3.0.0/EquivalentShunt.hpp new file mode 100644 index 000000000..f6edab3a2 --- /dev/null +++ b/CGMES_3.0.0/EquivalentShunt.hpp @@ -0,0 +1,43 @@ +#ifndef EquivalentShunt_H +#define EquivalentShunt_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquivalentEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + + /* + The class represents equivalent shunts. + */ + class EquivalentShunt : public EquivalentEquipment + { + public: + /* constructor initialising all attributes to null */ + EquivalentShunt(); + ~EquivalentShunt() override; + + CIMPP::Susceptance b; /* Positive sequence shunt susceptance. Default: nullptr */ + CIMPP::Conductance g; /* Positive sequence shunt conductance. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* EquivalentShunt_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC1A.cpp b/CGMES_3.0.0/ExcAC1A.cpp new file mode 100644 index 000000000..39f34673e --- /dev/null +++ b/CGMES_3.0.0/ExcAC1A.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC1A.hpp" + +#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() {}; + + +bool assign_ExcAC1A_hvlvgates(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hvlvgates; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC1A::debugName[] = "ExcAC1A"; +const char* ExcAC1A::debugString() const +{ + return ExcAC1A::debugName; +} + +void ExcAC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC1A::declare() +{ + return BaseClassDefiner(ExcAC1A::addConstructToMap, ExcAC1A::addPrimitiveAssignFnsToMap, ExcAC1A::addClassAssignFnsToMap, ExcAC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC1A_factory() + { + return new ExcAC1A; + } +} diff --git a/CGMES_3.0.0/ExcAC1A.hpp b/CGMES_3.0.0/ExcAC1A.hpp new file mode 100644 index 000000000..898474a9f --- /dev/null +++ b/CGMES_3.0.0/ExcAC1A.hpp @@ -0,0 +1,65 @@ +#ifndef ExcAC1A_H +#define ExcAC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. + */ + class ExcAC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC2A.cpp b/CGMES_3.0.0/ExcAC2A.cpp new file mode 100644 index 000000000..591f80b09 --- /dev/null +++ b/CGMES_3.0.0/ExcAC2A.cpp @@ -0,0 +1,495 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC2A.hpp" + +#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() {}; + + +bool assign_ExcAC2A_hvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hvgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lvgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vlr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC2A::debugName[] = "ExcAC2A"; +const char* ExcAC2A::debugString() const +{ + return ExcAC2A::debugName; +} + +void ExcAC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC2A::declare() +{ + return BaseClassDefiner(ExcAC2A::addConstructToMap, ExcAC2A::addPrimitiveAssignFnsToMap, ExcAC2A::addClassAssignFnsToMap, ExcAC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC2A_factory() + { + return new ExcAC2A; + } +} diff --git a/CGMES_3.0.0/ExcAC2A.hpp b/CGMES_3.0.0/ExcAC2A.hpp new file mode 100644 index 000000000..d5831aeac --- /dev/null +++ b/CGMES_3.0.0/ExcAC2A.hpp @@ -0,0 +1,71 @@ +#ifndef ExcAC2A_H +#define ExcAC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. + */ + class ExcAC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC3A.cpp b/CGMES_3.0.0/ExcAC3A.cpp new file mode 100644 index 000000000..241a4da12 --- /dev/null +++ b/CGMES_3.0.0/ExcAC3A.cpp @@ -0,0 +1,463 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC3A.hpp" + +#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() {}; + + +bool assign_ExcAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC3A::debugName[] = "ExcAC3A"; +const char* ExcAC3A::debugString() const +{ + return ExcAC3A::debugName; +} + +void ExcAC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC3A::declare() +{ + return BaseClassDefiner(ExcAC3A::addConstructToMap, ExcAC3A::addPrimitiveAssignFnsToMap, ExcAC3A::addClassAssignFnsToMap, ExcAC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC3A_factory() + { + return new ExcAC3A; + } +} diff --git a/CGMES_3.0.0/ExcAC3A.hpp b/CGMES_3.0.0/ExcAC3A.hpp new file mode 100644 index 000000000..961f6a472 --- /dev/null +++ b/CGMES_3.0.0/ExcAC3A.hpp @@ -0,0 +1,68 @@ +#ifndef ExcAC3A_H +#define ExcAC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. + */ + class ExcAC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC4A.cpp b/CGMES_3.0.0/ExcAC4A.cpp new file mode 100644 index 000000000..42910c5bc --- /dev/null +++ b/CGMES_3.0.0/ExcAC4A.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC4A.hpp" + +#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() {}; + + +bool assign_ExcAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + +const char ExcAC4A::debugName[] = "ExcAC4A"; +const char* ExcAC4A::debugString() const +{ + return ExcAC4A::debugName; +} + +void ExcAC4A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC4A::declare() +{ + return BaseClassDefiner(ExcAC4A::addConstructToMap, ExcAC4A::addPrimitiveAssignFnsToMap, ExcAC4A::addClassAssignFnsToMap, ExcAC4A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC4A_factory() + { + return new ExcAC4A; + } +} diff --git a/CGMES_3.0.0/ExcAC4A.hpp b/CGMES_3.0.0/ExcAC4A.hpp new file mode 100644 index 000000000..e28d94e7d --- /dev/null +++ b/CGMES_3.0.0/ExcAC4A.hpp @@ -0,0 +1,50 @@ +#ifndef ExcAC4A_H +#define ExcAC4A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. + */ + class ExcAC4A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC4A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC5A.cpp b/CGMES_3.0.0/ExcAC5A.cpp new file mode 100644 index 000000000..be284f423 --- /dev/null +++ b/CGMES_3.0.0/ExcAC5A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC5A.hpp" + +#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() {}; + + +bool assign_ExcAC5A_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcAC5A::debugName[] = "ExcAC5A"; +const char* ExcAC5A::debugString() const +{ + return ExcAC5A::debugName; +} + +void ExcAC5A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC5A::declare() +{ + return BaseClassDefiner(ExcAC5A::addConstructToMap, ExcAC5A::addPrimitiveAssignFnsToMap, ExcAC5A::addClassAssignFnsToMap, ExcAC5A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC5A_factory() + { + return new ExcAC5A; + } +} diff --git a/CGMES_3.0.0/ExcAC5A.hpp b/CGMES_3.0.0/ExcAC5A.hpp new file mode 100644 index 000000000..f99a6915f --- /dev/null +++ b/CGMES_3.0.0/ExcAC5A.hpp @@ -0,0 +1,60 @@ +#ifndef ExcAC5A_H +#define ExcAC5A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. + */ + class ExcAC5A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC5A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC6A.cpp b/CGMES_3.0.0/ExcAC6A.cpp new file mode 100644 index 000000000..c0abd068c --- /dev/null +++ b/CGMES_3.0.0/ExcAC6A.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC6A.hpp" + +#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() {}; + + +bool assign_ExcAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tj; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfelim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC6A::debugName[] = "ExcAC6A"; +const char* ExcAC6A::debugString() const +{ + return ExcAC6A::debugName; +} + +void ExcAC6A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC6A::declare() +{ + return BaseClassDefiner(ExcAC6A::addConstructToMap, ExcAC6A::addPrimitiveAssignFnsToMap, ExcAC6A::addClassAssignFnsToMap, ExcAC6A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC6A_factory() + { + return new ExcAC6A; + } +} diff --git a/CGMES_3.0.0/ExcAC6A.hpp b/CGMES_3.0.0/ExcAC6A.hpp new file mode 100644 index 000000000..2f6a74c54 --- /dev/null +++ b/CGMES_3.0.0/ExcAC6A.hpp @@ -0,0 +1,65 @@ +#ifndef ExcAC6A_H +#define ExcAC6A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. + */ + class ExcAC6A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC6A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAC8B.cpp b/CGMES_3.0.0/ExcAC8B.cpp new file mode 100644 index 000000000..098c82aff --- /dev/null +++ b/CGMES_3.0.0/ExcAC8B.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAC8B.hpp" + +#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() {}; + + +bool assign_ExcAC8B_inlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_pidlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pidlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_telim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->telim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vpidmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpidmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vpidmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpidmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAC8B_vtmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmult; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAC8B::debugName[] = "ExcAC8B"; +const char* ExcAC8B::debugString() const +{ + return ExcAC8B::debugName; +} + +void ExcAC8B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAC8B::declare() +{ + return BaseClassDefiner(ExcAC8B::addConstructToMap, ExcAC8B::addPrimitiveAssignFnsToMap, ExcAC8B::addClassAssignFnsToMap, ExcAC8B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAC8B_factory() + { + return new ExcAC8B; + } +} diff --git a/CGMES_3.0.0/ExcAC8B.hpp b/CGMES_3.0.0/ExcAC8B.hpp new file mode 100644 index 000000000..c370b0676 --- /dev/null +++ b/CGMES_3.0.0/ExcAC8B.hpp @@ -0,0 +1,70 @@ +#ifndef ExcAC8B_H +#define ExcAC8B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. + */ + class ExcAC8B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAC8B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcANS.cpp b/CGMES_3.0.0/ExcANS.cpp new file mode 100644 index 000000000..6260a4071 --- /dev/null +++ b/CGMES_3.0.0/ExcANS.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcANS.hpp" + +#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() {}; + + +bool assign_ExcANS_blint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->blint; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_ifmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_ifmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kce; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_krvecc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->krvecc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_kvfif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvfif; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcANS_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcANS::debugName[] = "ExcANS"; +const char* ExcANS::debugString() const +{ + return ExcANS::debugName; +} + +void ExcANS::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcANS::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcANS::declare() +{ + return BaseClassDefiner(ExcANS::addConstructToMap, ExcANS::addPrimitiveAssignFnsToMap, ExcANS::addClassAssignFnsToMap, ExcANS::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcANS_factory() + { + return new ExcANS; + } +} diff --git a/CGMES_3.0.0/ExcANS.hpp b/CGMES_3.0.0/ExcANS.hpp new file mode 100644 index 000000000..83d97ecfd --- /dev/null +++ b/CGMES_3.0.0/ExcANS.hpp @@ -0,0 +1,57 @@ +#ifndef ExcANS_H +#define ExcANS_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system. It represents static field voltage or excitation current feedback excitation system. + */ + class ExcANS : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcANS_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAVR1.cpp b/CGMES_3.0.0/ExcAVR1.cpp new file mode 100644 index 000000000..87d3b3ca8 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR1.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR1.hpp" + +#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() {}; + + +bool assign_ExcAVR1_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR1_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char ExcAVR1::debugName[] = "ExcAVR1"; +const char* ExcAVR1::debugString() const +{ + return ExcAVR1::debugName; +} + +void ExcAVR1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR1::declare() +{ + return BaseClassDefiner(ExcAVR1::addConstructToMap, ExcAVR1::addPrimitiveAssignFnsToMap, ExcAVR1::addClassAssignFnsToMap, ExcAVR1::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR1_factory() + { + return new ExcAVR1; + } +} diff --git a/CGMES_3.0.0/ExcAVR1.hpp b/CGMES_3.0.0/ExcAVR1.hpp new file mode 100644 index 000000000..1f1b771d1 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR1.hpp @@ -0,0 +1,54 @@ +#ifndef ExcAVR1_H +#define ExcAVR1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system corresponding to IEEE (1968) type 1 model. It represents an exciter dynamo and electromechanical regulator. + */ + class ExcAVR1 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR1_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAVR2.cpp b/CGMES_3.0.0/ExcAVR2.cpp new file mode 100644 index 000000000..a0e48bd86 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR2.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR2.hpp" + +#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() {}; + + +bool assign_ExcAVR2_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR2_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char ExcAVR2::debugName[] = "ExcAVR2"; +const char* ExcAVR2::debugString() const +{ + return ExcAVR2::debugName; +} + +void ExcAVR2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR2::declare() +{ + return BaseClassDefiner(ExcAVR2::addConstructToMap, ExcAVR2::addPrimitiveAssignFnsToMap, ExcAVR2::addClassAssignFnsToMap, ExcAVR2::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR2_factory() + { + return new ExcAVR2; + } +} diff --git a/CGMES_3.0.0/ExcAVR2.hpp b/CGMES_3.0.0/ExcAVR2.hpp new file mode 100644 index 000000000..373d4d120 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR2.hpp @@ -0,0 +1,55 @@ +#ifndef ExcAVR2_H +#define ExcAVR2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR2_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAVR3.cpp b/CGMES_3.0.0/ExcAVR3.cpp new file mode 100644 index 000000000..7a7c3cda3 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR3.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR3.hpp" + +#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() {}; + + +bool assign_ExcAVR3_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR3_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char ExcAVR3::debugName[] = "ExcAVR3"; +const char* ExcAVR3::debugString() const +{ + return ExcAVR3::debugName; +} + +void ExcAVR3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR3::declare() +{ + return BaseClassDefiner(ExcAVR3::addConstructToMap, ExcAVR3::addPrimitiveAssignFnsToMap, ExcAVR3::addClassAssignFnsToMap, ExcAVR3::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR3_factory() + { + return new ExcAVR3; + } +} diff --git a/CGMES_3.0.0/ExcAVR3.hpp b/CGMES_3.0.0/ExcAVR3.hpp new file mode 100644 index 000000000..657d56f08 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR3.hpp @@ -0,0 +1,54 @@ +#ifndef ExcAVR3_H +#define ExcAVR3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system. It represents an exciter dynamo and electric regulator. + */ + class ExcAVR3 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR3_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAVR4.cpp b/CGMES_3.0.0/ExcAVR4.cpp new file mode 100644 index 000000000..0d48f1c25 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR4.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR4.hpp" + +#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() {}; + + +bool assign_ExcAVR4_imul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_kif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kif; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t1if(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1if; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_tif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tif; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vfmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vfmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR4_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcAVR4::debugName[] = "ExcAVR4"; +const char* ExcAVR4::debugString() const +{ + return ExcAVR4::debugName; +} + +void ExcAVR4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR4::declare() +{ + return BaseClassDefiner(ExcAVR4::addConstructToMap, ExcAVR4::addPrimitiveAssignFnsToMap, ExcAVR4::addClassAssignFnsToMap, ExcAVR4::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR4_factory() + { + return new ExcAVR4; + } +} diff --git a/CGMES_3.0.0/ExcAVR4.hpp b/CGMES_3.0.0/ExcAVR4.hpp new file mode 100644 index 000000000..748209360 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR4.hpp @@ -0,0 +1,57 @@ +#ifndef ExcAVR4_H +#define ExcAVR4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Italian excitation system. It represents a static exciter and electric voltage regulator. + */ + class ExcAVR4 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR4_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAVR5.cpp b/CGMES_3.0.0/ExcAVR5.cpp new file mode 100644 index 000000000..0232b8142 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR5.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR5.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +ExcAVR5::ExcAVR5() {}; +ExcAVR5::~ExcAVR5() {}; + + +bool assign_ExcAVR5_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR5_rex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rex; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR5_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char ExcAVR5::debugName[] = "ExcAVR5"; +const char* ExcAVR5::debugString() const +{ + return ExcAVR5::debugName; +} + +void ExcAVR5::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR5::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR5::declare() +{ + return BaseClassDefiner(ExcAVR5::addConstructToMap, ExcAVR5::addPrimitiveAssignFnsToMap, ExcAVR5::addClassAssignFnsToMap, ExcAVR5::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR5_factory() + { + return new ExcAVR5; + } +} diff --git a/CGMES_3.0.0/ExcAVR5.hpp b/CGMES_3.0.0/ExcAVR5.hpp new file mode 100644 index 000000000..8b5127b27 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR5.hpp @@ -0,0 +1,44 @@ +#ifndef ExcAVR5_H +#define ExcAVR5_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR5_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcAVR7.cpp b/CGMES_3.0.0/ExcAVR7.cpp new file mode 100644 index 000000000..0933e6aa5 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR7.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcAVR7.hpp" + +#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() {}; + + +bool assign_ExcAVR7_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmax3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmax5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmin1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmin3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcAVR7_vmin5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char ExcAVR7::debugName[] = "ExcAVR7"; +const char* ExcAVR7::debugString() const +{ + return ExcAVR7::debugName; +} + +void ExcAVR7::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcAVR7::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcAVR7::declare() +{ + return BaseClassDefiner(ExcAVR7::addConstructToMap, ExcAVR7::addPrimitiveAssignFnsToMap, ExcAVR7::addClassAssignFnsToMap, ExcAVR7::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcAVR7_factory() + { + return new ExcAVR7; + } +} diff --git a/CGMES_3.0.0/ExcAVR7.hpp b/CGMES_3.0.0/ExcAVR7.hpp new file mode 100644 index 000000000..985a7b837 --- /dev/null +++ b/CGMES_3.0.0/ExcAVR7.hpp @@ -0,0 +1,62 @@ +#ifndef ExcAVR7_H +#define ExcAVR7_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + IVO excitation system. + */ + class ExcAVR7 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcAVR7_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcBBC.cpp b/CGMES_3.0.0/ExcBBC.cpp new file mode 100644 index 000000000..e78e0f2d7 --- /dev/null +++ b/CGMES_3.0.0/ExcBBC.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcBBC.hpp" + +#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() {}; + + +bool assign_ExcBBC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_switch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->_switch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcBBC_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char ExcBBC::debugName[] = "ExcBBC"; +const char* ExcBBC::debugString() const +{ + return ExcBBC::debugName; +} + +void ExcBBC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcBBC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcBBC::declare() +{ + return BaseClassDefiner(ExcBBC::addConstructToMap, ExcBBC::addPrimitiveAssignFnsToMap, ExcBBC::addClassAssignFnsToMap, ExcBBC::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcBBC_factory() + { + return new ExcBBC; + } +} diff --git a/CGMES_3.0.0/ExcBBC.hpp b/CGMES_3.0.0/ExcBBC.hpp new file mode 100644 index 000000000..a814a2925 --- /dev/null +++ b/CGMES_3.0.0/ExcBBC.hpp @@ -0,0 +1,53 @@ +#ifndef ExcBBC_H +#define ExcBBC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcBBC : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcBBC_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcCZ.cpp b/CGMES_3.0.0/ExcCZ.cpp new file mode 100644 index 000000000..672a78e76 --- /dev/null +++ b/CGMES_3.0.0/ExcCZ.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcCZ.hpp" + +#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() {}; + + +bool assign_ExcCZ_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcCZ_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char ExcCZ::debugName[] = "ExcCZ"; +const char* ExcCZ::debugString() const +{ + return ExcCZ::debugName; +} + +void ExcCZ::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcCZ::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcCZ::declare() +{ + return BaseClassDefiner(ExcCZ::addConstructToMap, ExcCZ::addPrimitiveAssignFnsToMap, ExcCZ::addClassAssignFnsToMap, ExcCZ::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcCZ_factory() + { + return new ExcCZ; + } +} diff --git a/CGMES_3.0.0/ExcCZ.hpp b/CGMES_3.0.0/ExcCZ.hpp new file mode 100644 index 000000000..9e607cce8 --- /dev/null +++ b/CGMES_3.0.0/ExcCZ.hpp @@ -0,0 +1,51 @@ +#ifndef ExcCZ_H +#define ExcCZ_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Czech proportion/integral exciter. + */ + class ExcCZ : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcCZ_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcDC1A.cpp b/CGMES_3.0.0/ExcDC1A.cpp new file mode 100644 index 000000000..6ce38792a --- /dev/null +++ b/CGMES_3.0.0/ExcDC1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC1A.hpp" + +#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() {}; + + +bool assign_ExcDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcDC1A::debugName[] = "ExcDC1A"; +const char* ExcDC1A::debugString() const +{ + return ExcDC1A::debugName; +} + +void ExcDC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC1A::declare() +{ + return BaseClassDefiner(ExcDC1A::addConstructToMap, ExcDC1A::addPrimitiveAssignFnsToMap, ExcDC1A::addClassAssignFnsToMap, ExcDC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC1A_factory() + { + return new ExcDC1A; + } +} diff --git a/CGMES_3.0.0/ExcDC1A.hpp b/CGMES_3.0.0/ExcDC1A.hpp new file mode 100644 index 000000000..b57118bff --- /dev/null +++ b/CGMES_3.0.0/ExcDC1A.hpp @@ -0,0 +1,61 @@ +#ifndef ExcDC1A_H +#define ExcDC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. + */ + class ExcDC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcDC2A.cpp b/CGMES_3.0.0/ExcDC2A.cpp new file mode 100644 index 000000000..840371b29 --- /dev/null +++ b/CGMES_3.0.0/ExcDC2A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC2A.hpp" + +#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() {}; + + +bool assign_ExcDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC2A_vtlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcDC2A::debugName[] = "ExcDC2A"; +const char* ExcDC2A::debugString() const +{ + return ExcDC2A::debugName; +} + +void ExcDC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC2A::declare() +{ + return BaseClassDefiner(ExcDC2A::addConstructToMap, ExcDC2A::addPrimitiveAssignFnsToMap, ExcDC2A::addClassAssignFnsToMap, ExcDC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC2A_factory() + { + return new ExcDC2A; + } +} diff --git a/CGMES_3.0.0/ExcDC2A.hpp b/CGMES_3.0.0/ExcDC2A.hpp new file mode 100644 index 000000000..308c183a2 --- /dev/null +++ b/CGMES_3.0.0/ExcDC2A.hpp @@ -0,0 +1,61 @@ +#ifndef ExcDC2A_H +#define ExcDC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcDC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcDC3A.cpp b/CGMES_3.0.0/ExcDC3A.cpp new file mode 100644 index 000000000..e6d13cb5a --- /dev/null +++ b/CGMES_3.0.0/ExcDC3A.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC3A.hpp" + +#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() {}; + + +bool assign_ExcDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcDC3A::debugName[] = "ExcDC3A"; +const char* ExcDC3A::debugString() const +{ + return ExcDC3A::debugName; +} + +void ExcDC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC3A::declare() +{ + return BaseClassDefiner(ExcDC3A::addConstructToMap, ExcDC3A::addPrimitiveAssignFnsToMap, ExcDC3A::addClassAssignFnsToMap, ExcDC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC3A_factory() + { + return new ExcDC3A; + } +} diff --git a/CGMES_3.0.0/ExcDC3A.hpp b/CGMES_3.0.0/ExcDC3A.hpp new file mode 100644 index 000000000..e2e0a866b --- /dev/null +++ b/CGMES_3.0.0/ExcDC3A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcDC3A_H +#define ExcDC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE DC3A direct current commutator exciter with speed input, and deadband. DC old type 4. + */ + class ExcDC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcDC3A1.cpp b/CGMES_3.0.0/ExcDC3A1.cpp new file mode 100644 index 000000000..1723a0039 --- /dev/null +++ b/CGMES_3.0.0/ExcDC3A1.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcDC3A1.hpp" + +#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() {}; + + +bool assign_ExcDC3A1_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vb1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vb1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vblim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vblim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcDC3A1_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcDC3A1::debugName[] = "ExcDC3A1"; +const char* ExcDC3A1::debugString() const +{ + return ExcDC3A1::debugName; +} + +void ExcDC3A1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcDC3A1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcDC3A1::declare() +{ + return BaseClassDefiner(ExcDC3A1::addConstructToMap, ExcDC3A1::addPrimitiveAssignFnsToMap, ExcDC3A1::addClassAssignFnsToMap, ExcDC3A1::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcDC3A1_factory() + { + return new ExcDC3A1; + } +} diff --git a/CGMES_3.0.0/ExcDC3A1.hpp b/CGMES_3.0.0/ExcDC3A1.hpp new file mode 100644 index 000000000..8f655f87d --- /dev/null +++ b/CGMES_3.0.0/ExcDC3A1.hpp @@ -0,0 +1,56 @@ +#ifndef ExcDC3A1_H +#define ExcDC3A1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified old IEEE type 3 excitation system. + */ + class ExcDC3A1 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcDC3A1_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcELIN1.cpp b/CGMES_3.0.0/ExcELIN1.cpp new file mode 100644 index 000000000..5137c3751 --- /dev/null +++ b/CGMES_3.0.0/ExcELIN1.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcELIN1.hpp" + +#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() {}; + + +bool assign_ExcELIN1_dpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpnf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_efmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_efmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_smax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->smax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_tfi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_tnu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tnu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_tsw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_vpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_vpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpnf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_vpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN1_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char ExcELIN1::debugName[] = "ExcELIN1"; +const char* ExcELIN1::debugString() const +{ + return ExcELIN1::debugName; +} + +void ExcELIN1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcELIN1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcELIN1::declare() +{ + return BaseClassDefiner(ExcELIN1::addConstructToMap, ExcELIN1::addPrimitiveAssignFnsToMap, ExcELIN1::addClassAssignFnsToMap, ExcELIN1::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcELIN1_factory() + { + return new ExcELIN1; + } +} diff --git a/CGMES_3.0.0/ExcELIN1.hpp b/CGMES_3.0.0/ExcELIN1.hpp new file mode 100644 index 000000000..8f2b47977 --- /dev/null +++ b/CGMES_3.0.0/ExcELIN1.hpp @@ -0,0 +1,56 @@ +#ifndef ExcELIN1_H +#define ExcELIN1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcELIN1 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcELIN1_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcELIN2.cpp b/CGMES_3.0.0/ExcELIN2.cpp new file mode 100644 index 000000000..c75dd79b5 --- /dev/null +++ b/CGMES_3.0.0/ExcELIN2.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcELIN2.hpp" + +#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() {}; + + +bool assign_ExcELIN2_efdbas(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdbas; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_iefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_iefmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iefmax2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_iefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k1ec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1ec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_kd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ke2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ketb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ketb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_pid1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pid1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_te2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_tr4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_upmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_upmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcELIN2_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcELIN2::debugName[] = "ExcELIN2"; +const char* ExcELIN2::debugString() const +{ + return ExcELIN2::debugName; +} + +void ExcELIN2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcELIN2::declare() +{ + return BaseClassDefiner(ExcELIN2::addConstructToMap, ExcELIN2::addPrimitiveAssignFnsToMap, ExcELIN2::addClassAssignFnsToMap, ExcELIN2::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcELIN2_factory() + { + return new ExcELIN2; + } +} diff --git a/CGMES_3.0.0/ExcELIN2.hpp b/CGMES_3.0.0/ExcELIN2.hpp new file mode 100644 index 000000000..95b93460f --- /dev/null +++ b/CGMES_3.0.0/ExcELIN2.hpp @@ -0,0 +1,68 @@ +#ifndef ExcELIN2_H +#define ExcELIN2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcELIN2 : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcELIN2_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcHU.cpp b/CGMES_3.0.0/ExcHU.cpp new file mode 100644 index 000000000..900f67af6 --- /dev/null +++ b/CGMES_3.0.0/ExcHU.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcHU.hpp" + +#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() {}; + + +bool assign_ExcHU_ae(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ae; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ai(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ai; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_atr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->atr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_imin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcHU_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char ExcHU::debugName[] = "ExcHU"; +const char* ExcHU::debugString() const +{ + return ExcHU::debugName; +} + +void ExcHU::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcHU::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcHU::declare() +{ + return BaseClassDefiner(ExcHU::addConstructToMap, ExcHU::addPrimitiveAssignFnsToMap, ExcHU::addClassAssignFnsToMap, ExcHU::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcHU_factory() + { + return new ExcHU; + } +} diff --git a/CGMES_3.0.0/ExcHU.hpp b/CGMES_3.0.0/ExcHU.hpp new file mode 100644 index 000000000..70148631f --- /dev/null +++ b/CGMES_3.0.0/ExcHU.hpp @@ -0,0 +1,54 @@ +#ifndef ExcHU_H +#define ExcHU_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Hungarian excitation system, with built-in voltage transducer. + */ + class ExcHU : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcHU_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC1A.cpp b/CGMES_3.0.0/ExcIEEEAC1A.cpp new file mode 100644 index 000000000..cbe29f0ba --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC1A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC1A::debugName[] = "ExcIEEEAC1A"; +const char* ExcIEEEAC1A::debugString() const +{ + return ExcIEEEAC1A::debugName; +} + +void ExcIEEEAC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC1A::declare() +{ + return BaseClassDefiner(ExcIEEEAC1A::addConstructToMap, ExcIEEEAC1A::addPrimitiveAssignFnsToMap, ExcIEEEAC1A::addClassAssignFnsToMap, ExcIEEEAC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC1A_factory() + { + return new ExcIEEEAC1A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC1A.hpp b/CGMES_3.0.0/ExcIEEEAC1A.hpp new file mode 100644 index 000000000..4b22a8cb0 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC1A.hpp @@ -0,0 +1,60 @@ +#ifndef ExcIEEEAC1A_H +#define ExcIEEEAC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC2A.cpp b/CGMES_3.0.0/ExcIEEEAC2A.cpp new file mode 100644 index 000000000..325264a42 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC2A.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC2A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC2A::debugName[] = "ExcIEEEAC2A"; +const char* ExcIEEEAC2A::debugString() const +{ + return ExcIEEEAC2A::debugName; +} + +void ExcIEEEAC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC2A::declare() +{ + return BaseClassDefiner(ExcIEEEAC2A::addConstructToMap, ExcIEEEAC2A::addPrimitiveAssignFnsToMap, ExcIEEEAC2A::addClassAssignFnsToMap, ExcIEEEAC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC2A_factory() + { + return new ExcIEEEAC2A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC2A.hpp b/CGMES_3.0.0/ExcIEEEAC2A.hpp new file mode 100644 index 000000000..be2ef7e9a --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC2A.hpp @@ -0,0 +1,63 @@ +#ifndef ExcIEEEAC2A_H +#define ExcIEEEAC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC3A.cpp b/CGMES_3.0.0/ExcIEEEAC3A.cpp new file mode 100644 index 000000000..baee58271 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC3A.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC3A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC3A::debugName[] = "ExcIEEEAC3A"; +const char* ExcIEEEAC3A::debugString() const +{ + return ExcIEEEAC3A::debugName; +} + +void ExcIEEEAC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC3A::declare() +{ + return BaseClassDefiner(ExcIEEEAC3A::addConstructToMap, ExcIEEEAC3A::addPrimitiveAssignFnsToMap, ExcIEEEAC3A::addClassAssignFnsToMap, ExcIEEEAC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC3A_factory() + { + return new ExcIEEEAC3A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC3A.hpp b/CGMES_3.0.0/ExcIEEEAC3A.hpp new file mode 100644 index 000000000..8b4cfc712 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC3A.hpp @@ -0,0 +1,63 @@ +#ifndef ExcIEEEAC3A_H +#define ExcIEEEAC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC4A.cpp b/CGMES_3.0.0/ExcIEEEAC4A.cpp new file mode 100644 index 000000000..54c509ac0 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC4A.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC4A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + +const char ExcIEEEAC4A::debugName[] = "ExcIEEEAC4A"; +const char* ExcIEEEAC4A::debugString() const +{ + return ExcIEEEAC4A::debugName; +} + +void ExcIEEEAC4A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC4A::declare() +{ + return BaseClassDefiner(ExcIEEEAC4A::addConstructToMap, ExcIEEEAC4A::addPrimitiveAssignFnsToMap, ExcIEEEAC4A::addClassAssignFnsToMap, ExcIEEEAC4A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC4A_factory() + { + return new ExcIEEEAC4A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC4A.hpp b/CGMES_3.0.0/ExcIEEEAC4A.hpp new file mode 100644 index 000000000..fce0687bb --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC4A.hpp @@ -0,0 +1,50 @@ +#ifndef ExcIEEEAC4A_H +#define ExcIEEEAC4A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC4A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC4A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC5A.cpp b/CGMES_3.0.0/ExcIEEEAC5A.cpp new file mode 100644 index 000000000..733118856 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC5A.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC5A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcIEEEAC5A::debugName[] = "ExcIEEEAC5A"; +const char* ExcIEEEAC5A::debugString() const +{ + return ExcIEEEAC5A::debugName; +} + +void ExcIEEEAC5A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC5A::declare() +{ + return BaseClassDefiner(ExcIEEEAC5A::addConstructToMap, ExcIEEEAC5A::addPrimitiveAssignFnsToMap, ExcIEEEAC5A::addClassAssignFnsToMap, ExcIEEEAC5A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC5A_factory() + { + return new ExcIEEEAC5A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC5A.hpp b/CGMES_3.0.0/ExcIEEEAC5A.hpp new file mode 100644 index 000000000..18dd05871 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC5A.hpp @@ -0,0 +1,56 @@ +#ifndef ExcIEEEAC5A_H +#define ExcIEEEAC5A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC5A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC5A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC6A.cpp b/CGMES_3.0.0/ExcIEEEAC6A.cpp new file mode 100644 index 000000000..d9fb68933 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC6A.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC6A.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tj; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfelim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC6A::debugName[] = "ExcIEEEAC6A"; +const char* ExcIEEEAC6A::debugString() const +{ + return ExcIEEEAC6A::debugName; +} + +void ExcIEEEAC6A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC6A::declare() +{ + return BaseClassDefiner(ExcIEEEAC6A::addConstructToMap, ExcIEEEAC6A::addPrimitiveAssignFnsToMap, ExcIEEEAC6A::addClassAssignFnsToMap, ExcIEEEAC6A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC6A_factory() + { + return new ExcIEEEAC6A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC6A.hpp b/CGMES_3.0.0/ExcIEEEAC6A.hpp new file mode 100644 index 000000000..7a6177a67 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC6A.hpp @@ -0,0 +1,64 @@ +#ifndef ExcIEEEAC6A_H +#define ExcIEEEAC6A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC6A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC6A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC7B.cpp b/CGMES_3.0.0/ExcIEEEAC7B.cpp new file mode 100644 index 000000000..4d2e85f1c --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC7B.cpp @@ -0,0 +1,463 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC7B.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC7B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC7B::debugName[] = "ExcIEEEAC7B"; +const char* ExcIEEEAC7B::debugString() const +{ + return ExcIEEEAC7B::debugName; +} + +void ExcIEEEAC7B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC7B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC7B::declare() +{ + return BaseClassDefiner(ExcIEEEAC7B::addConstructToMap, ExcIEEEAC7B::addPrimitiveAssignFnsToMap, ExcIEEEAC7B::addClassAssignFnsToMap, ExcIEEEAC7B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC7B_factory() + { + return new ExcIEEEAC7B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC7B.hpp b/CGMES_3.0.0/ExcIEEEAC7B.hpp new file mode 100644 index 000000000..1fd921b50 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC7B.hpp @@ -0,0 +1,68 @@ +#ifndef ExcIEEEAC7B_H +#define ExcIEEEAC7B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC7B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC7B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEAC8B.cpp b/CGMES_3.0.0/ExcIEEEAC8B.cpp new file mode 100644 index 000000000..df51248c1 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC8B.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEAC8B.hpp" + +#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() {}; + + +bool assign_ExcIEEEAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ve2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfemax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEAC8B::debugName[] = "ExcIEEEAC8B"; +const char* ExcIEEEAC8B::debugString() const +{ + return ExcIEEEAC8B::debugName; +} + +void ExcIEEEAC8B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEAC8B::declare() +{ + return BaseClassDefiner(ExcIEEEAC8B::addConstructToMap, ExcIEEEAC8B::addPrimitiveAssignFnsToMap, ExcIEEEAC8B::addClassAssignFnsToMap, ExcIEEEAC8B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEAC8B_factory() + { + return new ExcIEEEAC8B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEAC8B.hpp b/CGMES_3.0.0/ExcIEEEAC8B.hpp new file mode 100644 index 000000000..16204f533 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEAC8B.hpp @@ -0,0 +1,60 @@ +#ifndef ExcIEEEAC8B_H +#define ExcIEEEAC8B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEAC8B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEAC8B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEDC1A.cpp b/CGMES_3.0.0/ExcIEEEDC1A.cpp new file mode 100644 index 000000000..325d7cce9 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC1A.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC1A.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcIEEEDC1A::debugName[] = "ExcIEEEDC1A"; +const char* ExcIEEEDC1A::debugString() const +{ + return ExcIEEEDC1A::debugName; +} + +void ExcIEEEDC1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC1A::declare() +{ + return BaseClassDefiner(ExcIEEEDC1A::addConstructToMap, ExcIEEEDC1A::addPrimitiveAssignFnsToMap, ExcIEEEDC1A::addClassAssignFnsToMap, ExcIEEEDC1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC1A_factory() + { + return new ExcIEEEDC1A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEDC1A.hpp b/CGMES_3.0.0/ExcIEEEDC1A.hpp new file mode 100644 index 000000000..eafe69739 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC1A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcIEEEDC1A_H +#define ExcIEEEDC1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEDC1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEDC2A.cpp b/CGMES_3.0.0/ExcIEEEDC2A.cpp new file mode 100644 index 000000000..979ef1e40 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC2A.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC2A.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcIEEEDC2A::debugName[] = "ExcIEEEDC2A"; +const char* ExcIEEEDC2A::debugString() const +{ + return ExcIEEEDC2A::debugName; +} + +void ExcIEEEDC2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC2A::declare() +{ + return BaseClassDefiner(ExcIEEEDC2A::addConstructToMap, ExcIEEEDC2A::addPrimitiveAssignFnsToMap, ExcIEEEDC2A::addClassAssignFnsToMap, ExcIEEEDC2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC2A_factory() + { + return new ExcIEEEDC2A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEDC2A.hpp b/CGMES_3.0.0/ExcIEEEDC2A.hpp new file mode 100644 index 000000000..7ed80e217 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC2A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcIEEEDC2A_H +#define ExcIEEEDC2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEDC2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEDC3A.cpp b/CGMES_3.0.0/ExcIEEEDC3A.cpp new file mode 100644 index 000000000..353a1f241 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC3A.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC3A.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exclim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char ExcIEEEDC3A::debugName[] = "ExcIEEEDC3A"; +const char* ExcIEEEDC3A::debugString() const +{ + return ExcIEEEDC3A::debugName; +} + +void ExcIEEEDC3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC3A::declare() +{ + return BaseClassDefiner(ExcIEEEDC3A::addConstructToMap, ExcIEEEDC3A::addPrimitiveAssignFnsToMap, ExcIEEEDC3A::addClassAssignFnsToMap, ExcIEEEDC3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC3A_factory() + { + return new ExcIEEEDC3A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEDC3A.hpp b/CGMES_3.0.0/ExcIEEEDC3A.hpp new file mode 100644 index 000000000..9f16d385f --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC3A.hpp @@ -0,0 +1,54 @@ +#ifndef ExcIEEEDC3A_H +#define ExcIEEEDC3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEDC3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEDC4B.cpp b/CGMES_3.0.0/ExcIEEEDC4B.cpp new file mode 100644 index 000000000..a33fef25a --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC4B.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEDC4B.hpp" + +#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() {}; + + +bool assign_ExcIEEEDC4B_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->seefd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEDC4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEDC4B::debugName[] = "ExcIEEEDC4B"; +const char* ExcIEEEDC4B::debugString() const +{ + return ExcIEEEDC4B::debugName; +} + +void ExcIEEEDC4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEDC4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEDC4B::declare() +{ + return BaseClassDefiner(ExcIEEEDC4B::addConstructToMap, ExcIEEEDC4B::addPrimitiveAssignFnsToMap, ExcIEEEDC4B::addClassAssignFnsToMap, ExcIEEEDC4B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEDC4B_factory() + { + return new ExcIEEEDC4B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEDC4B.hpp b/CGMES_3.0.0/ExcIEEEDC4B.hpp new file mode 100644 index 000000000..124a90666 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEDC4B.hpp @@ -0,0 +1,62 @@ +#ifndef ExcIEEEDC4B_H +#define ExcIEEEDC4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEDC4B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEDC4B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST1A.cpp b/CGMES_3.0.0/ExcIEEEST1A.cpp new file mode 100644 index 000000000..48a92f05e --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST1A.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST1A.hpp" + +#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() {}; + + +bool assign_ExcIEEEST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_pssin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pssin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEST1A::debugName[] = "ExcIEEEST1A"; +const char* ExcIEEEST1A::debugString() const +{ + return ExcIEEEST1A::debugName; +} + +void ExcIEEEST1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST1A::declare() +{ + return BaseClassDefiner(ExcIEEEST1A::addConstructToMap, ExcIEEEST1A::addPrimitiveAssignFnsToMap, ExcIEEEST1A::addClassAssignFnsToMap, ExcIEEEST1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST1A_factory() + { + return new ExcIEEEST1A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST1A.hpp b/CGMES_3.0.0/ExcIEEEST1A.hpp new file mode 100644 index 000000000..01500dc5c --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST1A.hpp @@ -0,0 +1,62 @@ +#ifndef ExcIEEEST1A_H +#define ExcIEEEST1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "ExcIEEEST1AUELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp new file mode 100644 index 000000000..cac712136 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST1AUELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcIEEEST1AUELselectorKind& ExcIEEEST1AUELselectorKind::operator=(ExcIEEEST1AUELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcIEEEST1AUELselectorKind::operator ExcIEEEST1AUELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcIEEEST1AUELselectorKind::debugName[] = "ExcIEEEST1AUELselectorKind"; +const char* ExcIEEEST1AUELselectorKind::debugString() const +{ + return ExcIEEEST1AUELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcIEEEST1AUELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "ignoreUELsignal") + { + rop = ExcIEEEST1AUELselectorKind::ignoreUELsignal; + return lop; + } + if(EnumSymbol == "inputHVgateVoltageOutput") + { + rop = ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput; + return lop; + } + if(EnumSymbol == "inputHVgateErrorSignal") + { + rop = ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal; + return lop; + } + if(EnumSymbol == "inputAddedToErrorSignal") + { + rop = ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcIEEEST1AUELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcIEEEST1AUELselectorKind::ignoreUELsignal) + { + EnumSymbol = "ignoreUELsignal"; + } + if (obj.value == ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput) + { + EnumSymbol = "inputHVgateVoltageOutput"; + } + if (obj.value == ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal) + { + EnumSymbol = "inputHVgateErrorSignal"; + } + if (obj.value == ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal) + { + EnumSymbol = "inputAddedToErrorSignal"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcIEEEST1AUELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp new file mode 100644 index 000000000..8c7912b47 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ExcIEEEST1AUELselectorKind_H +#define ExcIEEEST1AUELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Types of connections for the UEL input used in ExcIEEEST1A. + */ + class ExcIEEEST1AUELselectorKind + { + public: + enum ExcIEEEST1AUELselectorKind_ENUM + { + /** + * Ignore UEL signal. + */ + ignoreUELsignal, + /** + * UEL input HV gate with voltage regulator output. + */ + inputHVgateVoltageOutput, + /** + * UEL input HV gate with error signal. + */ + inputHVgateErrorSignal, + /** + * UEL input added to error signal. + */ + inputAddedToErrorSignal, + }; + + ExcIEEEST1AUELselectorKind() : value(), initialized(false) {} + ExcIEEEST1AUELselectorKind(ExcIEEEST1AUELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcIEEEST1AUELselectorKind& operator=(ExcIEEEST1AUELselectorKind_ENUM rop); + operator ExcIEEEST1AUELselectorKind_ENUM() const; + + ExcIEEEST1AUELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcIEEEST1AUELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcIEEEST1AUELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST2A.cpp b/CGMES_3.0.0/ExcIEEEST2A.cpp new file mode 100644 index 000000000..def7e0e1c --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST2A.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST2A.hpp" + +#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() {}; + + +bool assign_ExcIEEEST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char ExcIEEEST2A::debugName[] = "ExcIEEEST2A"; +const char* ExcIEEEST2A::debugString() const +{ + return ExcIEEEST2A::debugName; +} + +void ExcIEEEST2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST2A::declare() +{ + return BaseClassDefiner(ExcIEEEST2A::addConstructToMap, ExcIEEEST2A::addPrimitiveAssignFnsToMap, ExcIEEEST2A::addClassAssignFnsToMap, ExcIEEEST2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST2A_factory() + { + return new ExcIEEEST2A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST2A.hpp b/CGMES_3.0.0/ExcIEEEST2A.hpp new file mode 100644 index 000000000..c522cd32d --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST2A.hpp @@ -0,0 +1,55 @@ +#ifndef ExcIEEEST2A_H +#define ExcIEEEST2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST3A.cpp b/CGMES_3.0.0/ExcIEEEST3A.cpp new file mode 100644 index 000000000..63b81a0cb --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST3A.cpp @@ -0,0 +1,367 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST3A.hpp" + +#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() {}; + + +bool assign_ExcIEEEST3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vgmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + +const char ExcIEEEST3A::debugName[] = "ExcIEEEST3A"; +const char* ExcIEEEST3A::debugString() const +{ + return ExcIEEEST3A::debugName; +} + +void ExcIEEEST3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST3A::declare() +{ + return BaseClassDefiner(ExcIEEEST3A::addConstructToMap, ExcIEEEST3A::addPrimitiveAssignFnsToMap, ExcIEEEST3A::addClassAssignFnsToMap, ExcIEEEST3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST3A_factory() + { + return new ExcIEEEST3A; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST3A.hpp b/CGMES_3.0.0/ExcIEEEST3A.hpp new file mode 100644 index 000000000..795768f49 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST3A.hpp @@ -0,0 +1,62 @@ +#ifndef ExcIEEEST3A_H +#define ExcIEEEST3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST4B.cpp b/CGMES_3.0.0/ExcIEEEST4B.cpp new file mode 100644 index 000000000..7f8bb74f6 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST4B.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST4B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcIEEEST4B::debugName[] = "ExcIEEEST4B"; +const char* ExcIEEEST4B::debugString() const +{ + return ExcIEEEST4B::debugName; +} + +void ExcIEEEST4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST4B::declare() +{ + return BaseClassDefiner(ExcIEEEST4B::addConstructToMap, ExcIEEEST4B::addPrimitiveAssignFnsToMap, ExcIEEEST4B::addClassAssignFnsToMap, ExcIEEEST4B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST4B_factory() + { + return new ExcIEEEST4B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST4B.hpp b/CGMES_3.0.0/ExcIEEEST4B.hpp new file mode 100644 index 000000000..7ead6aa0f --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST4B.hpp @@ -0,0 +1,58 @@ +#ifndef ExcIEEEST4B_H +#define ExcIEEEST4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST4B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST4B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST5B.cpp b/CGMES_3.0.0/ExcIEEEST5B.cpp new file mode 100644 index 000000000..8a63ef0f1 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST5B.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST5B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST5B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tob1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tob1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tob2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tob2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_toc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->toc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_toc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->toc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tub1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tub1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tub2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tub2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tuc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_tuc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST5B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char ExcIEEEST5B::debugName[] = "ExcIEEEST5B"; +const char* ExcIEEEST5B::debugString() const +{ + return ExcIEEEST5B::debugName; +} + +void ExcIEEEST5B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST5B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST5B::declare() +{ + return BaseClassDefiner(ExcIEEEST5B::addConstructToMap, ExcIEEEST5B::addPrimitiveAssignFnsToMap, ExcIEEEST5B::addClassAssignFnsToMap, ExcIEEEST5B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST5B_factory() + { + return new ExcIEEEST5B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST5B.hpp b/CGMES_3.0.0/ExcIEEEST5B.hpp new file mode 100644 index 000000000..cd86d9233 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST5B.hpp @@ -0,0 +1,58 @@ +#ifndef ExcIEEEST5B_H +#define ExcIEEEST5B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST5B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST5B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST6B.cpp b/CGMES_3.0.0/ExcIEEEST6B.cpp new file mode 100644 index 000000000..1d19b4998 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST6B.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST6B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kci(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kci; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char ExcIEEEST6B::debugName[] = "ExcIEEEST6B"; +const char* ExcIEEEST6B::debugString() const +{ + return ExcIEEEST6B::debugName; +} + +void ExcIEEEST6B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST6B::declare() +{ + return BaseClassDefiner(ExcIEEEST6B::addConstructToMap, ExcIEEEST6B::addPrimitiveAssignFnsToMap, ExcIEEEST6B::addClassAssignFnsToMap, ExcIEEEST6B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST6B_factory() + { + return new ExcIEEEST6B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST6B.hpp b/CGMES_3.0.0/ExcIEEEST6B.hpp new file mode 100644 index 000000000..9cc8f0d7d --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST6B.hpp @@ -0,0 +1,56 @@ +#ifndef ExcIEEEST6B_H +#define ExcIEEEST6B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcST6BOELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST6B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST6B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcIEEEST7B.cpp b/CGMES_3.0.0/ExcIEEEST7B.cpp new file mode 100644 index 000000000..76c7e0260 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST7B.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcIEEEST7B.hpp" + +#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() {}; + + +bool assign_ExcIEEEST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcIEEEST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char ExcIEEEST7B::debugName[] = "ExcIEEEST7B"; +const char* ExcIEEEST7B::debugString() const +{ + return ExcIEEEST7B::debugName; +} + +void ExcIEEEST7B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcIEEEST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcIEEEST7B::declare() +{ + return BaseClassDefiner(ExcIEEEST7B::addConstructToMap, ExcIEEEST7B::addPrimitiveAssignFnsToMap, ExcIEEEST7B::addClassAssignFnsToMap, ExcIEEEST7B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcIEEEST7B_factory() + { + return new ExcIEEEST7B; + } +} diff --git a/CGMES_3.0.0/ExcIEEEST7B.hpp b/CGMES_3.0.0/ExcIEEEST7B.hpp new file mode 100644 index 000000000..2068a82a3 --- /dev/null +++ b/CGMES_3.0.0/ExcIEEEST7B.hpp @@ -0,0 +1,58 @@ +#ifndef ExcIEEEST7B_H +#define ExcIEEEST7B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcST7BOELselectorKind.hpp" +#include "ExcST7BUELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcIEEEST7B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcIEEEST7B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcNI.cpp b/CGMES_3.0.0/ExcNI.cpp new file mode 100644 index 000000000..673f8d1e1 --- /dev/null +++ b/CGMES_3.0.0/ExcNI.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcNI.hpp" + +#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() {}; + + +bool assign_ExcNI_busFedSelector(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->busFedSelector; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcNI_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char ExcNI::debugName[] = "ExcNI"; +const char* ExcNI::debugString() const +{ + return ExcNI::debugName; +} + +void ExcNI::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcNI::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcNI::declare() +{ + return BaseClassDefiner(ExcNI::addConstructToMap, ExcNI::addPrimitiveAssignFnsToMap, ExcNI::addClassAssignFnsToMap, ExcNI::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcNI_factory() + { + return new ExcNI; + } +} diff --git a/CGMES_3.0.0/ExcNI.hpp b/CGMES_3.0.0/ExcNI.hpp new file mode 100644 index 000000000..a8421a358 --- /dev/null +++ b/CGMES_3.0.0/ExcNI.hpp @@ -0,0 +1,52 @@ +#ifndef ExcNI_H +#define ExcNI_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Bus or solid fed SCR (silicon-controlled rectifier) bridge excitation system model type NI (NVE). + */ + class ExcNI : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcNI_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcOEX3T.cpp b/CGMES_3.0.0/ExcOEX3T.cpp new file mode 100644 index 000000000..6849a4fed --- /dev/null +++ b/CGMES_3.0.0/ExcOEX3T.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcOEX3T.hpp" + +#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() {}; + + +bool assign_ExcOEX3T_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_see1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->see1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_see2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->see2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcOEX3T_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcOEX3T::debugName[] = "ExcOEX3T"; +const char* ExcOEX3T::debugString() const +{ + return ExcOEX3T::debugName; +} + +void ExcOEX3T::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcOEX3T::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcOEX3T::declare() +{ + return BaseClassDefiner(ExcOEX3T::addConstructToMap, ExcOEX3T::addPrimitiveAssignFnsToMap, ExcOEX3T::addClassAssignFnsToMap, ExcOEX3T::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcOEX3T_factory() + { + return new ExcOEX3T; + } +} diff --git a/CGMES_3.0.0/ExcOEX3T.hpp b/CGMES_3.0.0/ExcOEX3T.hpp new file mode 100644 index 000000000..e653650a9 --- /dev/null +++ b/CGMES_3.0.0/ExcOEX3T.hpp @@ -0,0 +1,60 @@ +#ifndef ExcOEX3T_H +#define ExcOEX3T_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE type ST1 excitation system with semi-continuous and acting terminal voltage limiter. + */ + class ExcOEX3T : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcOEX3T_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcPIC.cpp b/CGMES_3.0.0/ExcPIC.cpp new file mode 100644 index 000000000..4e7434109 --- /dev/null +++ b/CGMES_3.0.0/ExcPIC.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcPIC.hpp" + +#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() {}; + + +bool assign_ExcPIC_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_ta4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcPIC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcPIC::debugName[] = "ExcPIC"; +const char* ExcPIC::debugString() const +{ + return ExcPIC::debugName; +} + +void ExcPIC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcPIC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcPIC::declare() +{ + return BaseClassDefiner(ExcPIC::addConstructToMap, ExcPIC::addPrimitiveAssignFnsToMap, ExcPIC::addClassAssignFnsToMap, ExcPIC::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcPIC_factory() + { + return new ExcPIC; + } +} diff --git a/CGMES_3.0.0/ExcPIC.hpp b/CGMES_3.0.0/ExcPIC.hpp new file mode 100644 index 000000000..76a8ffe9e --- /dev/null +++ b/CGMES_3.0.0/ExcPIC.hpp @@ -0,0 +1,64 @@ +#ifndef ExcPIC_H +#define ExcPIC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcPIC_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcREXS.cpp b/CGMES_3.0.0/ExcREXS.cpp new file mode 100644 index 000000000..29f89ca72 --- /dev/null +++ b/CGMES_3.0.0/ExcREXS.cpp @@ -0,0 +1,623 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcREXS.hpp" + +#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() {}; + + +bool assign_ExcREXS_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_flimf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flimf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kefd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kefd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kii(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kii; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kvi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kvp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_kvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvphz; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_nvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nvphz; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->se2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vcmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vfmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcREXS_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcREXS::debugName[] = "ExcREXS"; +const char* ExcREXS::debugString() const +{ + return ExcREXS::debugName; +} + +void ExcREXS::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcREXS::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcREXS::declare() +{ + return BaseClassDefiner(ExcREXS::addConstructToMap, ExcREXS::addPrimitiveAssignFnsToMap, ExcREXS::addClassAssignFnsToMap, ExcREXS::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcREXS_factory() + { + return new ExcREXS; + } +} diff --git a/CGMES_3.0.0/ExcREXS.hpp b/CGMES_3.0.0/ExcREXS.hpp new file mode 100644 index 000000000..607ff4236 --- /dev/null +++ b/CGMES_3.0.0/ExcREXS.hpp @@ -0,0 +1,78 @@ +#ifndef ExcREXS_H +#define ExcREXS_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcREXSFeedbackSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcREXS : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcREXS_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp new file mode 100644 index 000000000..de55c6691 --- /dev/null +++ b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcREXSFeedbackSignalKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcREXSFeedbackSignalKind& ExcREXSFeedbackSignalKind::operator=(ExcREXSFeedbackSignalKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcREXSFeedbackSignalKind::operator ExcREXSFeedbackSignalKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcREXSFeedbackSignalKind::debugName[] = "ExcREXSFeedbackSignalKind"; +const char* ExcREXSFeedbackSignalKind::debugString() const +{ + return ExcREXSFeedbackSignalKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcREXSFeedbackSignalKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "fieldVoltage") + { + rop = ExcREXSFeedbackSignalKind::fieldVoltage; + return lop; + } + if(EnumSymbol == "fieldCurrent") + { + rop = ExcREXSFeedbackSignalKind::fieldCurrent; + return lop; + } + if(EnumSymbol == "outputVoltage") + { + rop = ExcREXSFeedbackSignalKind::outputVoltage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcREXSFeedbackSignalKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcREXSFeedbackSignalKind::fieldVoltage) + { + EnumSymbol = "fieldVoltage"; + } + if (obj.value == ExcREXSFeedbackSignalKind::fieldCurrent) + { + EnumSymbol = "fieldCurrent"; + } + if (obj.value == ExcREXSFeedbackSignalKind::outputVoltage) + { + EnumSymbol = "outputVoltage"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcREXSFeedbackSignalKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp new file mode 100644 index 000000000..f2c3bbbf9 --- /dev/null +++ b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp @@ -0,0 +1,50 @@ +#ifndef ExcREXSFeedbackSignalKind_H +#define ExcREXSFeedbackSignalKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + fieldVoltage, + /** + * The exciter field current is used. + */ + fieldCurrent, + /** + * The output voltage of the exciter is used. + */ + outputVoltage, + }; + + ExcREXSFeedbackSignalKind() : value(), initialized(false) {} + ExcREXSFeedbackSignalKind(ExcREXSFeedbackSignalKind_ENUM value) : value(value), initialized(true) {} + + ExcREXSFeedbackSignalKind& operator=(ExcREXSFeedbackSignalKind_ENUM rop); + operator ExcREXSFeedbackSignalKind_ENUM() const; + + ExcREXSFeedbackSignalKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcREXSFeedbackSignalKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcREXSFeedbackSignalKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ExcRQB.cpp b/CGMES_3.0.0/ExcRQB.cpp new file mode 100644 index 000000000..ebd46f9e0 --- /dev/null +++ b/CGMES_3.0.0/ExcRQB.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcRQB.hpp" + +#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() {}; + + +bool assign_ExcRQB_ki0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_klir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_klus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klus; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_lsat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lsat; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_lus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lus; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_mesu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mesu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_t4m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_ucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ucmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcRQB_ucmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ucmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char ExcRQB::debugName[] = "ExcRQB"; +const char* ExcRQB::debugString() const +{ + return ExcRQB::debugName; +} + +void ExcRQB::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcRQB::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcRQB::declare() +{ + return BaseClassDefiner(ExcRQB::addConstructToMap, ExcRQB::addPrimitiveAssignFnsToMap, ExcRQB::addClassAssignFnsToMap, ExcRQB::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcRQB_factory() + { + return new ExcRQB; + } +} diff --git a/CGMES_3.0.0/ExcRQB.hpp b/CGMES_3.0.0/ExcRQB.hpp new file mode 100644 index 000000000..01eed408e --- /dev/null +++ b/CGMES_3.0.0/ExcRQB.hpp @@ -0,0 +1,55 @@ +#ifndef ExcRQB_H +#define ExcRQB_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcRQB : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcRQB_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcSCRX.cpp b/CGMES_3.0.0/ExcSCRX.cpp new file mode 100644 index 000000000..f6171f706 --- /dev/null +++ b/CGMES_3.0.0/ExcSCRX.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcSCRX.hpp" + +#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() {}; + + +bool assign_ExcSCRX_cswitch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cswitch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_rcrfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rcrfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tatb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSCRX_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char ExcSCRX::debugName[] = "ExcSCRX"; +const char* ExcSCRX::debugString() const +{ + return ExcSCRX::debugName; +} + +void ExcSCRX::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcSCRX::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcSCRX::declare() +{ + return BaseClassDefiner(ExcSCRX::addConstructToMap, ExcSCRX::addPrimitiveAssignFnsToMap, ExcSCRX::addClassAssignFnsToMap, ExcSCRX::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcSCRX_factory() + { + return new ExcSCRX; + } +} diff --git a/CGMES_3.0.0/ExcSCRX.hpp b/CGMES_3.0.0/ExcSCRX.hpp new file mode 100644 index 000000000..2dd0e3e9f --- /dev/null +++ b/CGMES_3.0.0/ExcSCRX.hpp @@ -0,0 +1,51 @@ +#ifndef ExcSCRX_H +#define ExcSCRX_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcSCRX_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcSEXS.cpp b/CGMES_3.0.0/ExcSEXS.cpp new file mode 100644 index 000000000..c0577831a --- /dev/null +++ b/CGMES_3.0.0/ExcSEXS.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcSEXS.hpp" + +#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() {}; + + +bool assign_ExcSEXS_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tatb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSEXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char ExcSEXS::debugName[] = "ExcSEXS"; +const char* ExcSEXS::debugString() const +{ + return ExcSEXS::debugName; +} + +void ExcSEXS::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcSEXS::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcSEXS::declare() +{ + return BaseClassDefiner(ExcSEXS::addConstructToMap, ExcSEXS::addPrimitiveAssignFnsToMap, ExcSEXS::addClassAssignFnsToMap, ExcSEXS::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcSEXS_factory() + { + return new ExcSEXS; + } +} diff --git a/CGMES_3.0.0/ExcSEXS.hpp b/CGMES_3.0.0/ExcSEXS.hpp new file mode 100644 index 000000000..ff3aa2c90 --- /dev/null +++ b/CGMES_3.0.0/ExcSEXS.hpp @@ -0,0 +1,52 @@ +#ifndef ExcSEXS_H +#define ExcSEXS_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Simplified excitation system. + */ + class ExcSEXS : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcSEXS_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcSK.cpp b/CGMES_3.0.0/ExcSK.cpp new file mode 100644 index 000000000..8c9d63df5 --- /dev/null +++ b/CGMES_3.0.0/ExcSK.cpp @@ -0,0 +1,559 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcSK.hpp" + +#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() {}; + + +bool assign_ExcSK_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kce; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kgob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kgob; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kqi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kqob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqob; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_kqp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_nq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_qconoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qconoff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_qz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qz; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_remote(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->remote; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_sbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_uimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_uimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_urmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->urmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_urmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->urmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_vtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcSK_yp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcSK::debugName[] = "ExcSK"; +const char* ExcSK::debugString() const +{ + return ExcSK::debugName; +} + +void ExcSK::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcSK::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcSK::declare() +{ + return BaseClassDefiner(ExcSK::addConstructToMap, ExcSK::addPrimitiveAssignFnsToMap, ExcSK::addClassAssignFnsToMap, ExcSK::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcSK_factory() + { + return new ExcSK; + } +} diff --git a/CGMES_3.0.0/ExcSK.hpp b/CGMES_3.0.0/ExcSK.hpp new file mode 100644 index 000000000..551536501 --- /dev/null +++ b/CGMES_3.0.0/ExcSK.hpp @@ -0,0 +1,75 @@ +#ifndef ExcSK_H +#define ExcSK_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ApparentPower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class ExcSK : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcSK_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST1A.cpp b/CGMES_3.0.0/ExcST1A.cpp new file mode 100644 index 000000000..cfc5dfec5 --- /dev/null +++ b/CGMES_3.0.0/ExcST1A.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST1A.hpp" + +#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() {}; + + +bool assign_ExcST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST1A_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExcST1A::debugName[] = "ExcST1A"; +const char* ExcST1A::debugString() const +{ + return ExcST1A::debugName; +} + +void ExcST1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST1A::declare() +{ + return BaseClassDefiner(ExcST1A::addConstructToMap, ExcST1A::addPrimitiveAssignFnsToMap, ExcST1A::addClassAssignFnsToMap, ExcST1A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST1A_factory() + { + return new ExcST1A; + } +} diff --git a/CGMES_3.0.0/ExcST1A.hpp b/CGMES_3.0.0/ExcST1A.hpp new file mode 100644 index 000000000..13ed9cf93 --- /dev/null +++ b/CGMES_3.0.0/ExcST1A.hpp @@ -0,0 +1,59 @@ +#ifndef ExcST1A_H +#define ExcST1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). + */ + class ExcST1A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST2A.cpp b/CGMES_3.0.0/ExcST2A.cpp new file mode 100644 index 000000000..8ca08167e --- /dev/null +++ b/CGMES_3.0.0/ExcST2A.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST2A.hpp" + +#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() {}; + + +bool assign_ExcST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char ExcST2A::debugName[] = "ExcST2A"; +const char* ExcST2A::debugString() const +{ + return ExcST2A::debugName; +} + +void ExcST2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST2A::declare() +{ + return BaseClassDefiner(ExcST2A::addConstructToMap, ExcST2A::addPrimitiveAssignFnsToMap, ExcST2A::addClassAssignFnsToMap, ExcST2A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST2A_factory() + { + return new ExcST2A; + } +} diff --git a/CGMES_3.0.0/ExcST2A.hpp b/CGMES_3.0.0/ExcST2A.hpp new file mode 100644 index 000000000..587a7a53c --- /dev/null +++ b/CGMES_3.0.0/ExcST2A.hpp @@ -0,0 +1,57 @@ +#ifndef ExcST2A_H +#define ExcST2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST2A static excitation system with another lead-lag block added to match the model defined by WECC. + */ + class ExcST2A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST3A.cpp b/CGMES_3.0.0/ExcST3A.cpp new file mode 100644 index 000000000..3c0cddb9b --- /dev/null +++ b/CGMES_3.0.0/ExcST3A.cpp @@ -0,0 +1,367 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST3A.hpp" + +#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() {}; + + +bool assign_ExcST3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kj; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vgmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + +const char ExcST3A::debugName[] = "ExcST3A"; +const char* ExcST3A::debugString() const +{ + return ExcST3A::debugName; +} + +void ExcST3A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST3A::declare() +{ + return BaseClassDefiner(ExcST3A::addConstructToMap, ExcST3A::addPrimitiveAssignFnsToMap, ExcST3A::addClassAssignFnsToMap, ExcST3A::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST3A_factory() + { + return new ExcST3A; + } +} diff --git a/CGMES_3.0.0/ExcST3A.hpp b/CGMES_3.0.0/ExcST3A.hpp new file mode 100644 index 000000000..d727dd600 --- /dev/null +++ b/CGMES_3.0.0/ExcST3A.hpp @@ -0,0 +1,62 @@ +#ifndef ExcST3A_H +#define ExcST3A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST3A static excitation system with added speed multiplier. + */ + class ExcST3A : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST3A_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST4B.cpp b/CGMES_3.0.0/ExcST4B.cpp new file mode 100644 index 000000000..ad7d7540d --- /dev/null +++ b/CGMES_3.0.0/ExcST4B.cpp @@ -0,0 +1,351 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST4B.hpp" + +#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() {}; + + +bool assign_ExcST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kir; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lvgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetap; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_uel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uel; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vbmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vgmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + +const char ExcST4B::debugName[] = "ExcST4B"; +const char* ExcST4B::debugString() const +{ + return ExcST4B::debugName; +} + +void ExcST4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST4B::declare() +{ + return BaseClassDefiner(ExcST4B::addConstructToMap, ExcST4B::addPrimitiveAssignFnsToMap, ExcST4B::addClassAssignFnsToMap, ExcST4B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST4B_factory() + { + return new ExcST4B; + } +} diff --git a/CGMES_3.0.0/ExcST4B.hpp b/CGMES_3.0.0/ExcST4B.hpp new file mode 100644 index 000000000..7e9060f88 --- /dev/null +++ b/CGMES_3.0.0/ExcST4B.hpp @@ -0,0 +1,62 @@ +#ifndef ExcST4B_H +#define ExcST4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST4B static excitation system with maximum inner loop feedback gain Vgmax. + */ + class ExcST4B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST4B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST6B.cpp b/CGMES_3.0.0/ExcST6B.cpp new file mode 100644 index 000000000..29ef119cf --- /dev/null +++ b/CGMES_3.0.0/ExcST6B.cpp @@ -0,0 +1,415 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST6B.hpp" + +#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() {}; + + +bool assign_ExcST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ilr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_kvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_tvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vilim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vilim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmult; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST6B_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + +const char ExcST6B::debugName[] = "ExcST6B"; +const char* ExcST6B::debugString() const +{ + return ExcST6B::debugName; +} + +void ExcST6B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST6B::declare() +{ + return BaseClassDefiner(ExcST6B::addConstructToMap, ExcST6B::addPrimitiveAssignFnsToMap, ExcST6B::addClassAssignFnsToMap, ExcST6B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST6B_factory() + { + return new ExcST6B; + } +} diff --git a/CGMES_3.0.0/ExcST6B.hpp b/CGMES_3.0.0/ExcST6B.hpp new file mode 100644 index 000000000..accfa8511 --- /dev/null +++ b/CGMES_3.0.0/ExcST6B.hpp @@ -0,0 +1,66 @@ +#ifndef ExcST6B_H +#define ExcST6B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "ExcST6BOELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST6B static excitation system with PID controller and optional inner feedback loop. + */ + class ExcST6B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST6B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST6BOELselectorKind.cpp b/CGMES_3.0.0/ExcST6BOELselectorKind.cpp new file mode 100644 index 000000000..4a1e0d921 --- /dev/null +++ b/CGMES_3.0.0/ExcST6BOELselectorKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST6BOELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcST6BOELselectorKind& ExcST6BOELselectorKind::operator=(ExcST6BOELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcST6BOELselectorKind::operator ExcST6BOELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcST6BOELselectorKind::debugName[] = "ExcST6BOELselectorKind"; +const char* ExcST6BOELselectorKind::debugString() const +{ + return ExcST6BOELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcST6BOELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "noOELinput") + { + rop = ExcST6BOELselectorKind::noOELinput; + return lop; + } + if(EnumSymbol == "beforeUEL") + { + rop = ExcST6BOELselectorKind::beforeUEL; + return lop; + } + if(EnumSymbol == "afterUEL") + { + rop = ExcST6BOELselectorKind::afterUEL; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcST6BOELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcST6BOELselectorKind::noOELinput) + { + EnumSymbol = "noOELinput"; + } + if (obj.value == ExcST6BOELselectorKind::beforeUEL) + { + EnumSymbol = "beforeUEL"; + } + if (obj.value == ExcST6BOELselectorKind::afterUEL) + { + EnumSymbol = "afterUEL"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcST6BOELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ExcST6BOELselectorKind.hpp b/CGMES_3.0.0/ExcST6BOELselectorKind.hpp new file mode 100644 index 000000000..4f8060ade --- /dev/null +++ b/CGMES_3.0.0/ExcST6BOELselectorKind.hpp @@ -0,0 +1,50 @@ +#ifndef ExcST6BOELselectorKind_H +#define ExcST6BOELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + noOELinput, + /** + * 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. + */ + afterUEL, + }; + + ExcST6BOELselectorKind() : value(), initialized(false) {} + ExcST6BOELselectorKind(ExcST6BOELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcST6BOELselectorKind& operator=(ExcST6BOELselectorKind_ENUM rop); + operator ExcST6BOELselectorKind_ENUM() const; + + ExcST6BOELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcST6BOELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcST6BOELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ExcST7B.cpp b/CGMES_3.0.0/ExcST7B.cpp new file mode 100644 index 000000000..37e50539b --- /dev/null +++ b/CGMES_3.0.0/ExcST7B.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST7B.hpp" + +#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() {}; + + +bool assign_ExcST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uelin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExcST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + +const char ExcST7B::debugName[] = "ExcST7B"; +const char* ExcST7B::debugString() const +{ + return ExcST7B::debugName; +} + +void ExcST7B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExcST7B::declare() +{ + return BaseClassDefiner(ExcST7B::addConstructToMap, ExcST7B::addPrimitiveAssignFnsToMap, ExcST7B::addClassAssignFnsToMap, ExcST7B::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcST7B_factory() + { + return new ExcST7B; + } +} diff --git a/CGMES_3.0.0/ExcST7B.hpp b/CGMES_3.0.0/ExcST7B.hpp new file mode 100644 index 000000000..dad42729e --- /dev/null +++ b/CGMES_3.0.0/ExcST7B.hpp @@ -0,0 +1,59 @@ +#ifndef ExcST7B_H +#define ExcST7B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ExcST7BOELselectorKind.hpp" +#include "ExcST7BUELselectorKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. + */ + class ExcST7B : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcST7B_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcST7BOELselectorKind.cpp b/CGMES_3.0.0/ExcST7BOELselectorKind.cpp new file mode 100644 index 000000000..d400a7859 --- /dev/null +++ b/CGMES_3.0.0/ExcST7BOELselectorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST7BOELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcST7BOELselectorKind& ExcST7BOELselectorKind::operator=(ExcST7BOELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcST7BOELselectorKind::operator ExcST7BOELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcST7BOELselectorKind::debugName[] = "ExcST7BOELselectorKind"; +const char* ExcST7BOELselectorKind::debugString() const +{ + return ExcST7BOELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcST7BOELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "noOELinput") + { + rop = ExcST7BOELselectorKind::noOELinput; + return lop; + } + if(EnumSymbol == "addVref") + { + rop = ExcST7BOELselectorKind::addVref; + return lop; + } + if(EnumSymbol == "inputLVgate") + { + rop = ExcST7BOELselectorKind::inputLVgate; + return lop; + } + if(EnumSymbol == "outputLVgate") + { + rop = ExcST7BOELselectorKind::outputLVgate; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcST7BOELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcST7BOELselectorKind::noOELinput) + { + EnumSymbol = "noOELinput"; + } + if (obj.value == ExcST7BOELselectorKind::addVref) + { + EnumSymbol = "addVref"; + } + if (obj.value == ExcST7BOELselectorKind::inputLVgate) + { + EnumSymbol = "inputLVgate"; + } + if (obj.value == ExcST7BOELselectorKind::outputLVgate) + { + EnumSymbol = "outputLVgate"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcST7BOELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ExcST7BOELselectorKind.hpp b/CGMES_3.0.0/ExcST7BOELselectorKind.hpp new file mode 100644 index 000000000..63678ad84 --- /dev/null +++ b/CGMES_3.0.0/ExcST7BOELselectorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ExcST7BOELselectorKind_H +#define ExcST7BOELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + noOELinput, + /** + * 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. + */ + inputLVgate, + /** + * The signal is connected into the output <i>LVGate</i>. Corresponds to <i>OELin</i> = 3 on the ExcST7B diagram. + */ + outputLVgate, + }; + + ExcST7BOELselectorKind() : value(), initialized(false) {} + ExcST7BOELselectorKind(ExcST7BOELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcST7BOELselectorKind& operator=(ExcST7BOELselectorKind_ENUM rop); + operator ExcST7BOELselectorKind_ENUM() const; + + ExcST7BOELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcST7BOELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcST7BOELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ExcST7BUELselectorKind.cpp b/CGMES_3.0.0/ExcST7BUELselectorKind.cpp new file mode 100644 index 000000000..2260a4e4d --- /dev/null +++ b/CGMES_3.0.0/ExcST7BUELselectorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcST7BUELselectorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ExcST7BUELselectorKind& ExcST7BUELselectorKind::operator=(ExcST7BUELselectorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ExcST7BUELselectorKind::operator ExcST7BUELselectorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ExcST7BUELselectorKind::debugName[] = "ExcST7BUELselectorKind"; +const char* ExcST7BUELselectorKind::debugString() const +{ + return ExcST7BUELselectorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ExcST7BUELselectorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "noUELinput") + { + rop = ExcST7BUELselectorKind::noUELinput; + return lop; + } + if(EnumSymbol == "addVref") + { + rop = ExcST7BUELselectorKind::addVref; + return lop; + } + if(EnumSymbol == "inputHVgate") + { + rop = ExcST7BUELselectorKind::inputHVgate; + return lop; + } + if(EnumSymbol == "outputHVgate") + { + rop = ExcST7BUELselectorKind::outputHVgate; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ExcST7BUELselectorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ExcST7BUELselectorKind::noUELinput) + { + EnumSymbol = "noUELinput"; + } + if (obj.value == ExcST7BUELselectorKind::addVref) + { + EnumSymbol = "addVref"; + } + if (obj.value == ExcST7BUELselectorKind::inputHVgate) + { + EnumSymbol = "inputHVgate"; + } + if (obj.value == ExcST7BUELselectorKind::outputHVgate) + { + EnumSymbol = "outputHVgate"; + } + + if (!EnumSymbol.empty()) + { + os << "ExcST7BUELselectorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ExcST7BUELselectorKind.hpp b/CGMES_3.0.0/ExcST7BUELselectorKind.hpp new file mode 100644 index 000000000..e9f1ed8eb --- /dev/null +++ b/CGMES_3.0.0/ExcST7BUELselectorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ExcST7BUELselectorKind_H +#define ExcST7BUELselectorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + noUELinput, + /** + * 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. + */ + inputHVgate, + /** + * The signal is connected into the output <i>HVGate</i>. Corresponds to <i>UELin</i> = 3 on the ExcST7B diagram. + */ + outputHVgate, + }; + + ExcST7BUELselectorKind() : value(), initialized(false) {} + ExcST7BUELselectorKind(ExcST7BUELselectorKind_ENUM value) : value(value), initialized(true) {} + + ExcST7BUELselectorKind& operator=(ExcST7BUELselectorKind_ENUM rop); + operator ExcST7BUELselectorKind_ENUM() const; + + ExcST7BUELselectorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ExcST7BUELselectorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ExcST7BUELselectorKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ExcitationSystemDynamics.cpp b/CGMES_3.0.0/ExcitationSystemDynamics.cpp new file mode 100644 index 000000000..806190c25 --- /dev/null +++ b/CGMES_3.0.0/ExcitationSystemDynamics.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcitationSystemDynamics.hpp" + +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "OverexcitationLimiterDynamics.hpp" +#include "PFVArControllerType1Dynamics.hpp" +#include "PFVArControllerType2Dynamics.hpp" +#include "PowerSystemStabilizerDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" +#include "UnderexcitationLimiterDynamics.hpp" +#include "VoltageCompensatorDynamics.hpp" + +using namespace CIMPP; + +ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {}; +ExcitationSystemDynamics::~ExcitationSystemDynamics() {}; + + + + + + + + + + + +bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + DiscontinuousExcitationControlDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscontinuousExcitationControlDynamics != element2) + { + element->DiscontinuousExcitationControlDynamics = element2; + return assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + OverexcitationLimiterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OverexcitationLimiterDynamics != element2) + { + element->OverexcitationLimiterDynamics = element2; + return assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1Dynamics != element2) + { + element->PFVArControllerType1Dynamics = element2; + return assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType2Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType2Dynamics != element2) + { + element->PFVArControllerType2Dynamics = element2; + return assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + PowerSystemStabilizerDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemStabilizerDynamics != element2) + { + element->PowerSystemStabilizerDynamics = element2; + return assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* 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_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + UnderexcitationLimiterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->UnderexcitationLimiterDynamics != element2) + { + element->UnderexcitationLimiterDynamics = element2; + return assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); +bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageCompensatorDynamics != element2) + { + element->VoltageCompensatorDynamics = element2; + return assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ExcitationSystemDynamics::debugName[] = "ExcitationSystemDynamics"; +const char* ExcitationSystemDynamics::debugString() const +{ + return ExcitationSystemDynamics::debugName; +} + +void ExcitationSystemDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics"), &ExcitationSystemDynamics_factory)); +} + +void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ExcitationSystemDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ExcitationSystemDynamics::declare() +{ + return BaseClassDefiner(ExcitationSystemDynamics::addConstructToMap, ExcitationSystemDynamics::addPrimitiveAssignFnsToMap, ExcitationSystemDynamics::addClassAssignFnsToMap, ExcitationSystemDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcitationSystemDynamics_factory() + { + return new ExcitationSystemDynamics; + } +} diff --git a/CGMES_3.0.0/ExcitationSystemDynamics.hpp b/CGMES_3.0.0/ExcitationSystemDynamics.hpp new file mode 100644 index 000000000..63b95dc8e --- /dev/null +++ b/CGMES_3.0.0/ExcitationSystemDynamics.hpp @@ -0,0 +1,55 @@ +#ifndef ExcitationSystemDynamics_H +#define ExcitationSystemDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DiscontinuousExcitationControlDynamics; + class OverexcitationLimiterDynamics; + class PFVArControllerType1Dynamics; + class PFVArControllerType2Dynamics; + class PowerSystemStabilizerDynamics; + class SynchronousMachineDynamics; + 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. + */ + class ExcitationSystemDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcitationSystemDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExcitationSystemUserDefined.cpp b/CGMES_3.0.0/ExcitationSystemUserDefined.cpp new file mode 100644 index 000000000..463b994b9 --- /dev/null +++ b/CGMES_3.0.0/ExcitationSystemUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExcitationSystemUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +ExcitationSystemUserDefined::ExcitationSystemUserDefined() {}; +ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {}; + + + +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) +{ + ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char ExcitationSystemUserDefined::debugName[] = "ExcitationSystemUserDefined"; +const char* ExcitationSystemUserDefined::debugString() const +{ + return ExcitationSystemUserDefined::debugName; +} + +void ExcitationSystemUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExcitationSystemUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics"), &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner ExcitationSystemUserDefined::declare() +{ + return BaseClassDefiner(ExcitationSystemUserDefined::addConstructToMap, ExcitationSystemUserDefined::addPrimitiveAssignFnsToMap, ExcitationSystemUserDefined::addClassAssignFnsToMap, ExcitationSystemUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* ExcitationSystemUserDefined_factory() + { + return new ExcitationSystemUserDefined; + } +} diff --git a/CGMES_3.0.0/ExcitationSystemUserDefined.hpp b/CGMES_3.0.0/ExcitationSystemUserDefined.hpp new file mode 100644 index 000000000..14f8fb0bd --- /dev/null +++ b/CGMES_3.0.0/ExcitationSystemUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef ExcitationSystemUserDefined_H +#define ExcitationSystemUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Excitation system function block whose dynamic behaviour is described by a user-defined model. + */ + class ExcitationSystemUserDefined : public ExcitationSystemDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExcitationSystemUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/ExternalNetworkInjection.cpp b/CGMES_3.0.0/ExternalNetworkInjection.cpp new file mode 100644 index 000000000..950200ad6 --- /dev/null +++ b/CGMES_3.0.0/ExternalNetworkInjection.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ExternalNetworkInjection.hpp" + +#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() {}; + + +bool assign_ExternalNetworkInjection_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorSCD; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_ikSecond(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ikSecond; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxInitialSymShCCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxR0ToX0Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxR1ToX1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxZ0ToZ1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minInitialSymShCCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minR0ToX0Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minR1ToX1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minZ0ToZ1Ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->referencePriority; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageFactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char ExternalNetworkInjection::debugName[] = "ExternalNetworkInjection"; +const char* ExternalNetworkInjection::debugString() const +{ + return ExternalNetworkInjection::debugName; +} + +void ExternalNetworkInjection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ExternalNetworkInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ExternalNetworkInjection::declare() +{ + return BaseClassDefiner(ExternalNetworkInjection::addConstructToMap, ExternalNetworkInjection::addPrimitiveAssignFnsToMap, ExternalNetworkInjection::addClassAssignFnsToMap, ExternalNetworkInjection::debugName); +} + +namespace CIMPP +{ + BaseClass* ExternalNetworkInjection_factory() + { + return new ExternalNetworkInjection; + } +} diff --git a/CGMES_3.0.0/ExternalNetworkInjection.hpp b/CGMES_3.0.0/ExternalNetworkInjection.hpp new file mode 100644 index 000000000..1fd057d94 --- /dev/null +++ b/CGMES_3.0.0/ExternalNetworkInjection.hpp @@ -0,0 +1,65 @@ +#ifndef ExternalNetworkInjection_H +#define ExternalNetworkInjection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ActivePowerPerFrequency.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "ReactivePower.hpp" + +namespace CIMPP +{ + + /* + This class represents the external network and it is used for IEC 60909 calculations. + */ + class ExternalNetworkInjection : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ExternalNetworkInjection_factory(); +} +#endif diff --git a/CGMES_3.0.0/FaultIndicator.cpp b/CGMES_3.0.0/FaultIndicator.cpp new file mode 100644 index 000000000..49922f674 --- /dev/null +++ b/CGMES_3.0.0/FaultIndicator.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FaultIndicator.hpp" + +#include +#include + + +using namespace CIMPP; + +FaultIndicator::FaultIndicator() {}; +FaultIndicator::~FaultIndicator() {}; + + + +const char FaultIndicator::debugName[] = "FaultIndicator"; +const char* FaultIndicator::debugString() const +{ + return FaultIndicator::debugName; +} + +void FaultIndicator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:FaultIndicator"), &FaultIndicator_factory)); +} + +void FaultIndicator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void FaultIndicator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner FaultIndicator::declare() +{ + return BaseClassDefiner(FaultIndicator::addConstructToMap, FaultIndicator::addPrimitiveAssignFnsToMap, FaultIndicator::addClassAssignFnsToMap, FaultIndicator::debugName); +} + +namespace CIMPP +{ + BaseClass* FaultIndicator_factory() + { + return new FaultIndicator; + } +} diff --git a/CGMES_3.0.0/FaultIndicator.hpp b/CGMES_3.0.0/FaultIndicator.hpp new file mode 100644 index 000000000..c8cad28a2 --- /dev/null +++ b/CGMES_3.0.0/FaultIndicator.hpp @@ -0,0 +1,39 @@ +#ifndef FaultIndicator_H +#define FaultIndicator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AuxiliaryEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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). + */ + class FaultIndicator : public AuxiliaryEquipment + { + public: + /* constructor initialising all attributes to null */ + FaultIndicator(); + ~FaultIndicator() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* FaultIndicator_factory(); +} +#endif diff --git a/CGMES_3.0.0/Float.cpp b/CGMES_3.0.0/Float.cpp new file mode 100644 index 000000000..04c13ae6e --- /dev/null +++ b/CGMES_3.0.0/Float.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Float.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Float& Float::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Float::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Float::debugName[] = "Float"; +const char* Float::debugString() const +{ + return Float::debugName; +} + +Float& Float::operator+=(const Float& rhs) +{ + value += rhs.value; + return *this; +} + +Float& Float::operator-=(const Float& rhs) +{ + value -= rhs.value; + return *this; +} + +Float& Float::operator*=(const Float& rhs) +{ + value *= rhs.value; + return *this; +} + +Float& Float::operator/=(const Float& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Float& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Float& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Float.hpp b/CGMES_3.0.0/Float.hpp new file mode 100644 index 000000000..ede68d395 --- /dev/null +++ b/CGMES_3.0.0/Float.hpp @@ -0,0 +1,39 @@ +#ifndef Float_H +#define Float_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + A floating point number. The range is unspecified and not limited. + */ + class Float + { + public: + Float() : value(0.0), initialized(false) {} + Float(long double value) : value(value), initialized(true) {} + + Float& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Float& operator+=(const Float& rhs); + Float& operator-=(const Float& rhs); + Float& operator*=(const Float& rhs); + Float& operator/=(const Float& rhs); + + friend std::istream& operator>>(std::istream& lop, Float& rop); + friend std::ostream& operator<<(std::ostream& os, const Float& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/FossilFuel.cpp b/CGMES_3.0.0/FossilFuel.cpp new file mode 100644 index 000000000..cead5d6ea --- /dev/null +++ b/CGMES_3.0.0/FossilFuel.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FossilFuel.hpp" + +#include +#include + +#include "ThermalGeneratingUnit.hpp" +#include "FuelType.hpp" + +using namespace CIMPP; + +FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {}; +FossilFuel::~FossilFuel() {}; + + + +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) +{ + FossilFuel* element = dynamic_cast(BaseClass_ptr1); + ThermalGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ThermalGeneratingUnit != element2) + { + element->ThermalGeneratingUnit = element2; + return assign_ThermalGeneratingUnit_FossilFuels(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char FossilFuel::debugName[] = "FossilFuel"; +const char* FossilFuel::debugString() const +{ + return FossilFuel::debugName; +} + +void FossilFuel::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void FossilFuel::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:FossilFuel.ThermalGeneratingUnit"), &assign_FossilFuel_ThermalGeneratingUnit)); +} + +const BaseClassDefiner FossilFuel::declare() +{ + return BaseClassDefiner(FossilFuel::addConstructToMap, FossilFuel::addPrimitiveAssignFnsToMap, FossilFuel::addClassAssignFnsToMap, FossilFuel::debugName); +} + +namespace CIMPP +{ + BaseClass* FossilFuel_factory() + { + return new FossilFuel; + } +} diff --git a/CGMES_3.0.0/FossilFuel.hpp b/CGMES_3.0.0/FossilFuel.hpp new file mode 100644 index 000000000..83fbc9d66 --- /dev/null +++ b/CGMES_3.0.0/FossilFuel.hpp @@ -0,0 +1,43 @@ +#ifndef FossilFuel_H +#define FossilFuel_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "FuelType.hpp" + +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. + */ + class FossilFuel : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* FossilFuel_factory(); +} +#endif diff --git a/CGMES_3.0.0/FrancisGovernorControlKind.cpp b/CGMES_3.0.0/FrancisGovernorControlKind.cpp new file mode 100644 index 000000000..dd419372c --- /dev/null +++ b/CGMES_3.0.0/FrancisGovernorControlKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FrancisGovernorControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +FrancisGovernorControlKind& FrancisGovernorControlKind::operator=(FrancisGovernorControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +FrancisGovernorControlKind::operator FrancisGovernorControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char FrancisGovernorControlKind::debugName[] = "FrancisGovernorControlKind"; +const char* FrancisGovernorControlKind::debugString() const +{ + return FrancisGovernorControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, FrancisGovernorControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "mechanicHydrolicTachoAccelerator") + { + rop = FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator; + return lop; + } + if(EnumSymbol == "mechanicHydraulicTransientFeedback") + { + rop = FrancisGovernorControlKind::mechanicHydraulicTransientFeedback; + return lop; + } + if(EnumSymbol == "electromechanicalElectrohydraulic") + { + rop = FrancisGovernorControlKind::electromechanicalElectrohydraulic; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const FrancisGovernorControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator) + { + EnumSymbol = "mechanicHydrolicTachoAccelerator"; + } + if (obj.value == FrancisGovernorControlKind::mechanicHydraulicTransientFeedback) + { + EnumSymbol = "mechanicHydraulicTransientFeedback"; + } + if (obj.value == FrancisGovernorControlKind::electromechanicalElectrohydraulic) + { + EnumSymbol = "electromechanicalElectrohydraulic"; + } + + if (!EnumSymbol.empty()) + { + os << "FrancisGovernorControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/FrancisGovernorControlKind.hpp b/CGMES_3.0.0/FrancisGovernorControlKind.hpp new file mode 100644 index 000000000..a694f5429 --- /dev/null +++ b/CGMES_3.0.0/FrancisGovernorControlKind.hpp @@ -0,0 +1,50 @@ +#ifndef FrancisGovernorControlKind_H +#define FrancisGovernorControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Governor control flag for Francis hydro model. + */ + class FrancisGovernorControlKind + { + public: + enum FrancisGovernorControlKind_ENUM + { + /** + * Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). + */ + mechanicHydrolicTachoAccelerator, + /** + * Mechanic-hydraulic regulator with transient feedback (Cflag=2). + */ + mechanicHydraulicTransientFeedback, + /** + * Electromechanical and electrohydraulic regulator (Cflag=3). + */ + electromechanicalElectrohydraulic, + }; + + FrancisGovernorControlKind() : value(), initialized(false) {} + FrancisGovernorControlKind(FrancisGovernorControlKind_ENUM value) : value(value), initialized(true) {} + + FrancisGovernorControlKind& operator=(FrancisGovernorControlKind_ENUM rop); + operator FrancisGovernorControlKind_ENUM() const; + + FrancisGovernorControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, FrancisGovernorControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const FrancisGovernorControlKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Frequency.cpp b/CGMES_3.0.0/Frequency.cpp new file mode 100644 index 000000000..1809ef8c4 --- /dev/null +++ b/CGMES_3.0.0/Frequency.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Frequency.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Frequency& Frequency::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Frequency::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Frequency::debugName[] = "Frequency"; +const char* Frequency::debugString() const +{ + return Frequency::debugName; +} + +Frequency& Frequency::operator+=(const Frequency& rhs) +{ + value += rhs.value; + return *this; +} + +Frequency& Frequency::operator-=(const Frequency& rhs) +{ + value -= rhs.value; + return *this; +} + +Frequency& Frequency::operator*=(const Frequency& rhs) +{ + value *= rhs.value; + return *this; +} + +Frequency& Frequency::operator/=(const Frequency& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Frequency& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Frequency& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Frequency.hpp b/CGMES_3.0.0/Frequency.hpp new file mode 100644 index 000000000..28f5a1022 --- /dev/null +++ b/CGMES_3.0.0/Frequency.hpp @@ -0,0 +1,39 @@ +#ifndef Frequency_H +#define Frequency_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Cycles per second. + */ + class Frequency + { + public: + Frequency() : value(0.0), initialized(false) {} + Frequency(long double value) : value(value), initialized(true) {} + + Frequency& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Frequency& operator+=(const Frequency& rhs); + Frequency& operator-=(const Frequency& rhs); + Frequency& operator*=(const Frequency& rhs); + Frequency& operator/=(const Frequency& rhs); + + friend std::istream& operator>>(std::istream& lop, Frequency& rop); + friend std::ostream& operator<<(std::ostream& os, const Frequency& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/FuelType.cpp b/CGMES_3.0.0/FuelType.cpp new file mode 100644 index 000000000..30e1d2aba --- /dev/null +++ b/CGMES_3.0.0/FuelType.cpp @@ -0,0 +1,162 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "FuelType.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +FuelType& FuelType::operator=(FuelType_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +FuelType::operator FuelType_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char FuelType::debugName[] = "FuelType"; +const char* FuelType::debugString() const +{ + return FuelType::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, FuelType& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "FuelType") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "coal") + { + rop = FuelType::coal; + return lop; + } + if(EnumSymbol == "oil") + { + rop = FuelType::oil; + return lop; + } + if(EnumSymbol == "gas") + { + rop = FuelType::gas; + return lop; + } + if(EnumSymbol == "lignite") + { + rop = FuelType::lignite; + return lop; + } + if(EnumSymbol == "hardCoal") + { + rop = FuelType::hardCoal; + return lop; + } + if(EnumSymbol == "oilShale") + { + rop = FuelType::oilShale; + return lop; + } + if(EnumSymbol == "brownCoalLignite") + { + rop = FuelType::brownCoalLignite; + return lop; + } + if(EnumSymbol == "coalDerivedGas") + { + rop = FuelType::coalDerivedGas; + return lop; + } + if(EnumSymbol == "peat") + { + rop = FuelType::peat; + return lop; + } + if(EnumSymbol == "other") + { + rop = FuelType::other; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const FuelType& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == FuelType::coal) + { + EnumSymbol = "coal"; + } + if (obj.value == FuelType::oil) + { + EnumSymbol = "oil"; + } + if (obj.value == FuelType::gas) + { + EnumSymbol = "gas"; + } + if (obj.value == FuelType::lignite) + { + EnumSymbol = "lignite"; + } + if (obj.value == FuelType::hardCoal) + { + EnumSymbol = "hardCoal"; + } + if (obj.value == FuelType::oilShale) + { + EnumSymbol = "oilShale"; + } + if (obj.value == FuelType::brownCoalLignite) + { + EnumSymbol = "brownCoalLignite"; + } + if (obj.value == FuelType::coalDerivedGas) + { + EnumSymbol = "coalDerivedGas"; + } + if (obj.value == FuelType::peat) + { + EnumSymbol = "peat"; + } + if (obj.value == FuelType::other) + { + EnumSymbol = "other"; + } + + if (!EnumSymbol.empty()) + { + os << "FuelType." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/FuelType.hpp b/CGMES_3.0.0/FuelType.hpp new file mode 100644 index 000000000..95a62fa65 --- /dev/null +++ b/CGMES_3.0.0/FuelType.hpp @@ -0,0 +1,78 @@ +#ifndef FuelType_H +#define FuelType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of fuel. + */ + class FuelType + { + public: + enum FuelType_ENUM + { + /** + * Generic coal, not including lignite type. + */ + coal, + /** + * Oil. + */ + oil, + /** + * 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. + */ + lignite, + /** + * Hard coal. + */ + hardCoal, + /** + * Oil Shale. + */ + oilShale, + /** + * Brown coal lignite. + */ + brownCoalLignite, + /** + * Coal derived gas. + */ + coalDerivedGas, + /** + * Peat. + */ + peat, + /** + * Any fuel type not included in the rest of the enumerated value. + */ + other, + }; + + FuelType() : value(), initialized(false) {} + FuelType(FuelType_ENUM value) : value(value), initialized(true) {} + + FuelType& operator=(FuelType_ENUM rop); + operator FuelType_ENUM() const; + + FuelType_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, FuelType& rop); + friend std::ostream& operator<<(std::ostream& os, const FuelType& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Fuse.cpp b/CGMES_3.0.0/Fuse.cpp new file mode 100644 index 000000000..e14ec8be7 --- /dev/null +++ b/CGMES_3.0.0/Fuse.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Fuse.hpp" + +#include +#include + + +using namespace CIMPP; + +Fuse::Fuse() {}; +Fuse::~Fuse() {}; + + + +const char Fuse::debugName[] = "Fuse"; +const char* Fuse::debugString() const +{ + return Fuse::debugName; +} + +void Fuse::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Fuse"), &Fuse_factory)); +} + +void Fuse::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Fuse::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Fuse::declare() +{ + return BaseClassDefiner(Fuse::addConstructToMap, Fuse::addPrimitiveAssignFnsToMap, Fuse::addClassAssignFnsToMap, Fuse::debugName); +} + +namespace CIMPP +{ + BaseClass* Fuse_factory() + { + return new Fuse; + } +} diff --git a/CGMES_3.0.0/Fuse.hpp b/CGMES_3.0.0/Fuse.hpp new file mode 100644 index 000000000..b9d5d8b6f --- /dev/null +++ b/CGMES_3.0.0/Fuse.hpp @@ -0,0 +1,39 @@ +#ifndef Fuse_H +#define Fuse_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Fuse : public Switch + { + public: + /* constructor initialising all attributes to null */ + Fuse(); + ~Fuse() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Fuse_factory(); +} +#endif diff --git a/CGMES_3.0.0/GenICompensationForGenJ.cpp b/CGMES_3.0.0/GenICompensationForGenJ.cpp new file mode 100644 index 000000000..c78172e82 --- /dev/null +++ b/CGMES_3.0.0/GenICompensationForGenJ.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GenICompensationForGenJ.hpp" + +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "VCompIEEEType2.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {}; +GenICompensationForGenJ::~GenICompensationForGenJ() {}; + + + + +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) +{ + GenICompensationForGenJ* 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_GenICompensationForGenJ(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass*, BaseClass*); +bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + VCompIEEEType2* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VcompIEEEType2 != element2) + { + element->VcompIEEEType2 = element2; + return assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char GenICompensationForGenJ::debugName[] = "GenICompensationForGenJ"; +const char* GenICompensationForGenJ::debugString() const +{ + return GenICompensationForGenJ::debugName; +} + +void GenICompensationForGenJ::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner GenICompensationForGenJ::declare() +{ + return BaseClassDefiner(GenICompensationForGenJ::addConstructToMap, GenICompensationForGenJ::addPrimitiveAssignFnsToMap, GenICompensationForGenJ::addClassAssignFnsToMap, GenICompensationForGenJ::debugName); +} + +namespace CIMPP +{ + BaseClass* GenICompensationForGenJ_factory() + { + return new GenICompensationForGenJ; + } +} diff --git a/CGMES_3.0.0/GenICompensationForGenJ.hpp b/CGMES_3.0.0/GenICompensationForGenJ.hpp new file mode 100644 index 000000000..fde641497 --- /dev/null +++ b/CGMES_3.0.0/GenICompensationForGenJ.hpp @@ -0,0 +1,46 @@ +#ifndef GenICompensationForGenJ_H +#define GenICompensationForGenJ_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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. + */ + class GenICompensationForGenJ : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GenICompensationForGenJ_factory(); +} +#endif diff --git a/CGMES_3.0.0/GeneratingUnit.cpp b/CGMES_3.0.0/GeneratingUnit.cpp new file mode 100644 index 000000000..ace976cff --- /dev/null +++ b/CGMES_3.0.0/GeneratingUnit.cpp @@ -0,0 +1,363 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeneratingUnit.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_GeneratingUnit_genControlSource(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->genControlSource; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorSCD; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_longPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->longPF; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_maxOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxOperatingP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maximumAllowableSpinningReserve; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_minOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minOperatingP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_nominalP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_normalPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalPF; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedGrossMaxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedGrossMinP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedNetMaxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_shortPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->shortPF; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_startupCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->startupCost; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_startupTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->startupTime; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_totalEfficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->totalEfficiency; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GeneratingUnit_variableCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->variableCost; + if (buffer.fail()) + return false; + else + 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) +{ + 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; +} + + + + + + + + + + + + + + + + + +const char GeneratingUnit::debugName[] = "GeneratingUnit"; +const char* GeneratingUnit::debugString() const +{ + return GeneratingUnit::debugName; +} + +void GeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner GeneratingUnit::declare() +{ + return BaseClassDefiner(GeneratingUnit::addConstructToMap, GeneratingUnit::addPrimitiveAssignFnsToMap, GeneratingUnit::addClassAssignFnsToMap, GeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* GeneratingUnit_factory() + { + return new GeneratingUnit; + } +} diff --git a/CGMES_3.0.0/GeneratingUnit.hpp b/CGMES_3.0.0/GeneratingUnit.hpp new file mode 100644 index 000000000..796037922 --- /dev/null +++ b/CGMES_3.0.0/GeneratingUnit.hpp @@ -0,0 +1,67 @@ +#ifndef GeneratingUnit_H +#define GeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "GeneratorControlSource.hpp" +#include "Money.hpp" +#include "PerCent.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class ControlAreaGeneratingUnit; + 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. + */ + class GeneratingUnit : public Equipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/GeneratorControlSource.cpp b/CGMES_3.0.0/GeneratorControlSource.cpp new file mode 100644 index 000000000..1850d2514 --- /dev/null +++ b/CGMES_3.0.0/GeneratorControlSource.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeneratorControlSource.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +GeneratorControlSource& GeneratorControlSource::operator=(GeneratorControlSource_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +GeneratorControlSource::operator GeneratorControlSource_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char GeneratorControlSource::debugName[] = "GeneratorControlSource"; +const char* GeneratorControlSource::debugString() const +{ + return GeneratorControlSource::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, GeneratorControlSource& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "GeneratorControlSource") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "unavailable") + { + rop = GeneratorControlSource::unavailable; + return lop; + } + if(EnumSymbol == "offAGC") + { + rop = GeneratorControlSource::offAGC; + return lop; + } + if(EnumSymbol == "onAGC") + { + rop = GeneratorControlSource::onAGC; + return lop; + } + if(EnumSymbol == "plantControl") + { + rop = GeneratorControlSource::plantControl; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const GeneratorControlSource& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == GeneratorControlSource::unavailable) + { + EnumSymbol = "unavailable"; + } + if (obj.value == GeneratorControlSource::offAGC) + { + EnumSymbol = "offAGC"; + } + if (obj.value == GeneratorControlSource::onAGC) + { + EnumSymbol = "onAGC"; + } + if (obj.value == GeneratorControlSource::plantControl) + { + EnumSymbol = "plantControl"; + } + + if (!EnumSymbol.empty()) + { + os << "GeneratorControlSource." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/GeneratorControlSource.hpp b/CGMES_3.0.0/GeneratorControlSource.hpp new file mode 100644 index 000000000..463a53ab3 --- /dev/null +++ b/CGMES_3.0.0/GeneratorControlSource.hpp @@ -0,0 +1,54 @@ +#ifndef GeneratorControlSource_H +#define GeneratorControlSource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The source of controls for a generating unit. + */ + class GeneratorControlSource + { + public: + enum GeneratorControlSource_ENUM + { + /** + * Not available. + */ + unavailable, + /** + * Off of automatic generation control (AGC). + */ + offAGC, + /** + * On automatic generation control (AGC). + */ + onAGC, + /** + * Plant is controlling. + */ + plantControl, + }; + + GeneratorControlSource() : value(), initialized(false) {} + GeneratorControlSource(GeneratorControlSource_ENUM value) : value(value), initialized(true) {} + + GeneratorControlSource& operator=(GeneratorControlSource_ENUM rop); + operator GeneratorControlSource_ENUM() const; + + GeneratorControlSource_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, GeneratorControlSource& rop); + friend std::ostream& operator<<(std::ostream& os, const GeneratorControlSource& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp b/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp new file mode 100644 index 000000000..2d1052ed1 --- /dev/null +++ b/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GenericNonLinearLoadModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +GenericNonLinearLoadModelKind& GenericNonLinearLoadModelKind::operator=(GenericNonLinearLoadModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +GenericNonLinearLoadModelKind::operator GenericNonLinearLoadModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char GenericNonLinearLoadModelKind::debugName[] = "GenericNonLinearLoadModelKind"; +const char* GenericNonLinearLoadModelKind::debugString() const +{ + return GenericNonLinearLoadModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, GenericNonLinearLoadModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "exponentialRecovery") + { + rop = GenericNonLinearLoadModelKind::exponentialRecovery; + return lop; + } + if(EnumSymbol == "loadAdaptive") + { + rop = GenericNonLinearLoadModelKind::loadAdaptive; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const GenericNonLinearLoadModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == GenericNonLinearLoadModelKind::exponentialRecovery) + { + EnumSymbol = "exponentialRecovery"; + } + if (obj.value == GenericNonLinearLoadModelKind::loadAdaptive) + { + EnumSymbol = "loadAdaptive"; + } + + if (!EnumSymbol.empty()) + { + os << "GenericNonLinearLoadModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp b/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp new file mode 100644 index 000000000..7b6aa0c38 --- /dev/null +++ b/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp @@ -0,0 +1,46 @@ +#ifndef GenericNonLinearLoadModelKind_H +#define GenericNonLinearLoadModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of generic non-linear load model. + */ + class GenericNonLinearLoadModelKind + { + public: + enum GenericNonLinearLoadModelKind_ENUM + { + /** + * Exponential recovery model. + */ + exponentialRecovery, + /** + * Load adaptive model. + */ + loadAdaptive, + }; + + GenericNonLinearLoadModelKind() : value(), initialized(false) {} + GenericNonLinearLoadModelKind(GenericNonLinearLoadModelKind_ENUM value) : value(value), initialized(true) {} + + GenericNonLinearLoadModelKind& operator=(GenericNonLinearLoadModelKind_ENUM rop); + operator GenericNonLinearLoadModelKind_ENUM() const; + + GenericNonLinearLoadModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, GenericNonLinearLoadModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const GenericNonLinearLoadModelKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/GeographicalRegion.cpp b/CGMES_3.0.0/GeographicalRegion.cpp new file mode 100644 index 000000000..e2c0faf26 --- /dev/null +++ b/CGMES_3.0.0/GeographicalRegion.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GeographicalRegion.hpp" + +#include +#include + +#include "SubGeographicalRegion.hpp" + +using namespace CIMPP; + +GeographicalRegion::GeographicalRegion() {}; +GeographicalRegion::~GeographicalRegion() {}; + + + + +bool assign_SubGeographicalRegion_Region(BaseClass*, BaseClass*); +bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Regions.begin(), element->Regions.end(), element2) == element->Regions.end()) + { + element->Regions.push_back(element2); + return assign_SubGeographicalRegion_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char GeographicalRegion::debugName[] = "GeographicalRegion"; +const char* GeographicalRegion::debugString() const +{ + return GeographicalRegion::debugName; +} + +void GeographicalRegion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:GeographicalRegion"), &GeographicalRegion_factory)); +} + +void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void GeographicalRegion::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:GeographicalRegion.Regions"), &assign_GeographicalRegion_Regions)); +} + +const BaseClassDefiner GeographicalRegion::declare() +{ + return BaseClassDefiner(GeographicalRegion::addConstructToMap, GeographicalRegion::addPrimitiveAssignFnsToMap, GeographicalRegion::addClassAssignFnsToMap, GeographicalRegion::debugName); +} + +namespace CIMPP +{ + BaseClass* GeographicalRegion_factory() + { + return new GeographicalRegion; + } +} diff --git a/CGMES_3.0.0/GeographicalRegion.hpp b/CGMES_3.0.0/GeographicalRegion.hpp new file mode 100644 index 000000000..e692c77de --- /dev/null +++ b/CGMES_3.0.0/GeographicalRegion.hpp @@ -0,0 +1,41 @@ +#ifndef GeographicalRegion_H +#define GeographicalRegion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SubGeographicalRegion; + + /* + A geographical region of a power system network model. + */ + class GeographicalRegion : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + GeographicalRegion(); + ~GeographicalRegion() override; + + std::list Regions; /* All sub-geographical regions within this geographical region. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GeographicalRegion_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovCT1.cpp b/CGMES_3.0.0/GovCT1.cpp new file mode 100644 index 000000000..8507009c8 --- /dev/null +++ b/CGMES_3.0.0/GovCT1.cpp @@ -0,0 +1,607 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovCT1.hpp" + +#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() {}; + + +bool assign_GovCT1_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kigov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kimw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ldref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rclose; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rdown; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ropen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rselect; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rup; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tact; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->teng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpelec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT1_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfspd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovCT1::debugName[] = "GovCT1"; +const char* GovCT1::debugString() const +{ + return GovCT1::debugName; +} + +void GovCT1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovCT1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovCT1::declare() +{ + return BaseClassDefiner(GovCT1::addConstructToMap, GovCT1::addPrimitiveAssignFnsToMap, GovCT1::addClassAssignFnsToMap, GovCT1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovCT1_factory() + { + return new GovCT1; + } +} diff --git a/CGMES_3.0.0/GovCT1.hpp b/CGMES_3.0.0/GovCT1.hpp new file mode 100644 index 000000000..7276bb196 --- /dev/null +++ b/CGMES_3.0.0/GovCT1.hpp @@ -0,0 +1,80 @@ +#ifndef GovCT1_H +#define GovCT1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "DroopSignalFeedbackKind.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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). + */ + class GovCT1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovCT1_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovCT2.cpp b/CGMES_3.0.0/GovCT2.cpp new file mode 100644 index 000000000..90720c28b --- /dev/null +++ b/CGMES_3.0.0/GovCT2.cpp @@ -0,0 +1,943 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovCT2.hpp" + +#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() {}; + + +bool assign_GovCT2_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_flim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flim9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kigov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kimw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ldref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minerr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_plim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->plim9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_prate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rclose; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rdown; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ropen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rselect; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rup; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tact; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdgov; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->teng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfload; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpelec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsa; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovCT2_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfspd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovCT2::debugName[] = "GovCT2"; +const char* GovCT2::debugString() const +{ + return GovCT2::debugName; +} + +void GovCT2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovCT2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovCT2::declare() +{ + return BaseClassDefiner(GovCT2::addConstructToMap, GovCT2::addPrimitiveAssignFnsToMap, GovCT2::addClassAssignFnsToMap, GovCT2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovCT2_factory() + { + return new GovCT2; + } +} diff --git a/CGMES_3.0.0/GovCT2.hpp b/CGMES_3.0.0/GovCT2.hpp new file mode 100644 index 000000000..057a17866 --- /dev/null +++ b/CGMES_3.0.0/GovCT2.hpp @@ -0,0 +1,102 @@ +#ifndef GovCT2_H +#define GovCT2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "DroopSignalFeedbackKind.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class GovCT2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovCT2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovGAST.cpp b/CGMES_3.0.0/GovGAST.cpp new file mode 100644 index 000000000..0f657d21e --- /dev/null +++ b/CGMES_3.0.0/GovGAST.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST.hpp" + +#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() {}; + + +bool assign_GovGAST_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char GovGAST::debugName[] = "GovGAST"; +const char* GovGAST::debugString() const +{ + return GovGAST::debugName; +} + +void GovGAST::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST::declare() +{ + return BaseClassDefiner(GovGAST::addConstructToMap, GovGAST::addPrimitiveAssignFnsToMap, GovGAST::addClassAssignFnsToMap, GovGAST::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST_factory() + { + return new GovGAST; + } +} diff --git a/CGMES_3.0.0/GovGAST.hpp b/CGMES_3.0.0/GovGAST.hpp new file mode 100644 index 000000000..145a0bf5f --- /dev/null +++ b/CGMES_3.0.0/GovGAST.hpp @@ -0,0 +1,52 @@ +#ifndef GovGAST_H +#define GovGAST_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Single shaft gas turbine. + */ + class GovGAST : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovGAST1.cpp b/CGMES_3.0.0/GovGAST1.cpp new file mode 100644 index 000000000..462fc0371 --- /dev/null +++ b/CGMES_3.0.0/GovGAST1.cpp @@ -0,0 +1,591 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST1.hpp" + +#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() {}; + + +bool assign_GovGAST1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_fidle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fidle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_lmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_loadinc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->loadinc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_ltrate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ltrate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_tltr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tltr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovGAST1::debugName[] = "GovGAST1"; +const char* GovGAST1::debugString() const +{ + return GovGAST1::debugName; +} + +void GovGAST1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST1::declare() +{ + return BaseClassDefiner(GovGAST1::addConstructToMap, GovGAST1::addPrimitiveAssignFnsToMap, GovGAST1::addClassAssignFnsToMap, GovGAST1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST1_factory() + { + return new GovGAST1; + } +} diff --git a/CGMES_3.0.0/GovGAST1.hpp b/CGMES_3.0.0/GovGAST1.hpp new file mode 100644 index 000000000..34dca080d --- /dev/null +++ b/CGMES_3.0.0/GovGAST1.hpp @@ -0,0 +1,78 @@ +#ifndef GovGAST1_H +#define GovGAST1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified single shaft gas turbine. + */ + class GovGAST1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST1_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovGAST2.cpp b/CGMES_3.0.0/GovGAST2.cpp new file mode 100644 index 000000000..9cf6476aa --- /dev/null +++ b/CGMES_3.0.0/GovGAST2.cpp @@ -0,0 +1,559 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST2.hpp" + +#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() {}; + + +bool assign_GovGAST2_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->c; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ecr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->etd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_w(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->w; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST2_z(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->z; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovGAST2::debugName[] = "GovGAST2"; +const char* GovGAST2::debugString() const +{ + return GovGAST2::debugName; +} + +void GovGAST2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST2::declare() +{ + return BaseClassDefiner(GovGAST2::addConstructToMap, GovGAST2::addPrimitiveAssignFnsToMap, GovGAST2::addClassAssignFnsToMap, GovGAST2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST2_factory() + { + return new GovGAST2; + } +} diff --git a/CGMES_3.0.0/GovGAST2.hpp b/CGMES_3.0.0/GovGAST2.hpp new file mode 100644 index 000000000..1c75496c9 --- /dev/null +++ b/CGMES_3.0.0/GovGAST2.hpp @@ -0,0 +1,77 @@ +#ifndef GovGAST2_H +#define GovGAST2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Temperature.hpp" + +namespace CIMPP +{ + + /* + Gas turbine. + */ + class GovGAST2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovGAST3.cpp b/CGMES_3.0.0/GovGAST3.cpp new file mode 100644 index 000000000..c22f4529b --- /dev/null +++ b/CGMES_3.0.0/GovGAST3.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST3.hpp" + +#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() {}; + + +bool assign_GovGAST3_bca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bca; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_kac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_kca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kca; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ksi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ksi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ky(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ky; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_rcmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rcmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_rcmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rcmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tfen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tsi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tsi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ttc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ttc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST3_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ty; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char GovGAST3::debugName[] = "GovGAST3"; +const char* GovGAST3::debugString() const +{ + return GovGAST3::debugName; +} + +void GovGAST3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST3::declare() +{ + return BaseClassDefiner(GovGAST3::addConstructToMap, GovGAST3::addPrimitiveAssignFnsToMap, GovGAST3::addClassAssignFnsToMap, GovGAST3::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST3_factory() + { + return new GovGAST3; + } +} diff --git a/CGMES_3.0.0/GovGAST3.hpp b/CGMES_3.0.0/GovGAST3.hpp new file mode 100644 index 000000000..97c86d250 --- /dev/null +++ b/CGMES_3.0.0/GovGAST3.hpp @@ -0,0 +1,64 @@ +#ifndef GovGAST3_H +#define GovGAST3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Temperature.hpp" + +namespace CIMPP +{ + + /* + Generic turbogas with acceleration and temperature controller. + */ + class GovGAST3 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST3_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovGAST4.cpp b/CGMES_3.0.0/GovGAST4.cpp new file mode 100644 index 000000000..b4fb4c1ff --- /dev/null +++ b/CGMES_3.0.0/GovGAST4.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGAST4.hpp" + +#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() {}; + + +bool assign_GovGAST4_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_ktm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ktm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_rymn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rymn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_rymx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rymx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGAST4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ty; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char GovGAST4::debugName[] = "GovGAST4"; +const char* GovGAST4::debugString() const +{ + return GovGAST4::debugName; +} + +void GovGAST4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGAST4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGAST4::declare() +{ + return BaseClassDefiner(GovGAST4::addConstructToMap, GovGAST4::addPrimitiveAssignFnsToMap, GovGAST4::addClassAssignFnsToMap, GovGAST4::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGAST4_factory() + { + return new GovGAST4; + } +} diff --git a/CGMES_3.0.0/GovGAST4.hpp b/CGMES_3.0.0/GovGAST4.hpp new file mode 100644 index 000000000..5da21dfe1 --- /dev/null +++ b/CGMES_3.0.0/GovGAST4.hpp @@ -0,0 +1,52 @@ +#ifndef GovGAST4_H +#define GovGAST4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Generic turbogas. + */ + class GovGAST4 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGAST4_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovGASTWD.cpp b/CGMES_3.0.0/GovGASTWD.cpp new file mode 100644 index 000000000..ea9be4d07 --- /dev/null +++ b/CGMES_3.0.0/GovGASTWD.cpp @@ -0,0 +1,575 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovGASTWD.hpp" + +#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() {}; + + +bool assign_GovGASTWD_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->af2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->c; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ecr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->etd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdroop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovGASTWD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovGASTWD::debugName[] = "GovGASTWD"; +const char* GovGASTWD::debugString() const +{ + return GovGASTWD::debugName; +} + +void GovGASTWD::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovGASTWD::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovGASTWD::declare() +{ + return BaseClassDefiner(GovGASTWD::addConstructToMap, GovGASTWD::addPrimitiveAssignFnsToMap, GovGASTWD::addClassAssignFnsToMap, GovGASTWD::debugName); +} + +namespace CIMPP +{ + BaseClass* GovGASTWD_factory() + { + return new GovGASTWD; + } +} diff --git a/CGMES_3.0.0/GovGASTWD.hpp b/CGMES_3.0.0/GovGASTWD.hpp new file mode 100644 index 000000000..315c0199a --- /dev/null +++ b/CGMES_3.0.0/GovGASTWD.hpp @@ -0,0 +1,77 @@ +#ifndef GovGASTWD_H +#define GovGASTWD_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Temperature.hpp" + +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.] + */ + class GovGASTWD : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovGASTWD_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydro1.cpp b/CGMES_3.0.0/GovHydro1.cpp new file mode 100644 index 000000000..69319d16f --- /dev/null +++ b/CGMES_3.0.0/GovHydro1.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro1.hpp" + +#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() {}; + + +bool assign_GovHydro1_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hdam; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro1_velm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char GovHydro1::debugName[] = "GovHydro1"; +const char* GovHydro1::debugString() const +{ + return GovHydro1::debugName; +} + +void GovHydro1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro1::declare() +{ + return BaseClassDefiner(GovHydro1::addConstructToMap, GovHydro1::addPrimitiveAssignFnsToMap, GovHydro1::addClassAssignFnsToMap, GovHydro1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro1_factory() + { + return new GovHydro1; + } +} diff --git a/CGMES_3.0.0/GovHydro1.hpp b/CGMES_3.0.0/GovHydro1.hpp new file mode 100644 index 000000000..5501cead9 --- /dev/null +++ b/CGMES_3.0.0/GovHydro1.hpp @@ -0,0 +1,57 @@ +#ifndef GovHydro1_H +#define GovHydro1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Basic hydro turbine governor. + */ + class GovHydro1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro1_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydro2.cpp b/CGMES_3.0.0/GovHydro2.cpp new file mode 100644 index 000000000..1461f9b4b --- /dev/null +++ b/CGMES_3.0.0/GovHydro2.cpp @@ -0,0 +1,511 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro2.hpp" + +#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() {}; + + +bool assign_GovHydro2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydro2::debugName[] = "GovHydro2"; +const char* GovHydro2::debugString() const +{ + return GovHydro2::debugName; +} + +void GovHydro2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro2::declare() +{ + return BaseClassDefiner(GovHydro2::addConstructToMap, GovHydro2::addPrimitiveAssignFnsToMap, GovHydro2::addClassAssignFnsToMap, GovHydro2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro2_factory() + { + return new GovHydro2; + } +} diff --git a/CGMES_3.0.0/GovHydro2.hpp b/CGMES_3.0.0/GovHydro2.hpp new file mode 100644 index 000000000..9e3b85fff --- /dev/null +++ b/CGMES_3.0.0/GovHydro2.hpp @@ -0,0 +1,73 @@ +#ifndef GovHydro2_H +#define GovHydro2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + IEEE hydro turbine governor with straightforward penstock configuration and hydraulic-dashpot governor. + */ + class GovHydro2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydro3.cpp b/CGMES_3.0.0/GovHydro3.cpp new file mode 100644 index 000000000..dadfe859c --- /dev/null +++ b/CGMES_3.0.0/GovHydro3.cpp @@ -0,0 +1,623 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro3.hpp" + +#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() {}; + + +bool assign_GovHydro3_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_relec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->relec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_rgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rgate; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro3_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydro3::debugName[] = "GovHydro3"; +const char* GovHydro3::debugString() const +{ + return GovHydro3::debugName; +} + +void GovHydro3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro3::declare() +{ + return BaseClassDefiner(GovHydro3::addConstructToMap, GovHydro3::addPrimitiveAssignFnsToMap, GovHydro3::addClassAssignFnsToMap, GovHydro3::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro3_factory() + { + return new GovHydro3; + } +} diff --git a/CGMES_3.0.0/GovHydro3.hpp b/CGMES_3.0.0/GovHydro3.hpp new file mode 100644 index 000000000..ea339be04 --- /dev/null +++ b/CGMES_3.0.0/GovHydro3.hpp @@ -0,0 +1,81 @@ +#ifndef GovHydro3_H +#define GovHydro3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class GovHydro3 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro3_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydro4.cpp b/CGMES_3.0.0/GovHydro4.cpp new file mode 100644 index 000000000..91e17a9c8 --- /dev/null +++ b/CGMES_3.0.0/GovHydro4.cpp @@ -0,0 +1,671 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro4.hpp" + +#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() {}; + + +bool assign_GovHydro4_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_bmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hdam; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_model(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->model; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tblade(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tblade; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydro4_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydro4::debugName[] = "GovHydro4"; +const char* GovHydro4::debugString() const +{ + return GovHydro4::debugName; +} + +void GovHydro4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydro4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydro4::declare() +{ + return BaseClassDefiner(GovHydro4::addConstructToMap, GovHydro4::addPrimitiveAssignFnsToMap, GovHydro4::addClassAssignFnsToMap, GovHydro4::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydro4_factory() + { + return new GovHydro4; + } +} diff --git a/CGMES_3.0.0/GovHydro4.hpp b/CGMES_3.0.0/GovHydro4.hpp new file mode 100644 index 000000000..cd417122b --- /dev/null +++ b/CGMES_3.0.0/GovHydro4.hpp @@ -0,0 +1,84 @@ +#ifndef GovHydro4_H +#define GovHydro4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "GovHydro4ModelKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class GovHydro4 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydro4_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydro4ModelKind.cpp b/CGMES_3.0.0/GovHydro4ModelKind.cpp new file mode 100644 index 000000000..28d73ac8e --- /dev/null +++ b/CGMES_3.0.0/GovHydro4ModelKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydro4ModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +GovHydro4ModelKind& GovHydro4ModelKind::operator=(GovHydro4ModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +GovHydro4ModelKind::operator GovHydro4ModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char GovHydro4ModelKind::debugName[] = "GovHydro4ModelKind"; +const char* GovHydro4ModelKind::debugString() const +{ + return GovHydro4ModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, GovHydro4ModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "GovHydro4ModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "simple") + { + rop = GovHydro4ModelKind::simple; + return lop; + } + if(EnumSymbol == "francisPelton") + { + rop = GovHydro4ModelKind::francisPelton; + return lop; + } + if(EnumSymbol == "kaplan") + { + rop = GovHydro4ModelKind::kaplan; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const GovHydro4ModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == GovHydro4ModelKind::simple) + { + EnumSymbol = "simple"; + } + if (obj.value == GovHydro4ModelKind::francisPelton) + { + EnumSymbol = "francisPelton"; + } + if (obj.value == GovHydro4ModelKind::kaplan) + { + EnumSymbol = "kaplan"; + } + + if (!EnumSymbol.empty()) + { + os << "GovHydro4ModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/GovHydro4ModelKind.hpp b/CGMES_3.0.0/GovHydro4ModelKind.hpp new file mode 100644 index 000000000..29a585c47 --- /dev/null +++ b/CGMES_3.0.0/GovHydro4ModelKind.hpp @@ -0,0 +1,50 @@ +#ifndef GovHydro4ModelKind_H +#define GovHydro4ModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Possible types of GovHydro4 models. + */ + class GovHydro4ModelKind + { + public: + enum GovHydro4ModelKind_ENUM + { + /** + * Simple model. + */ + simple, + /** + * Francis or Pelton model. + */ + francisPelton, + /** + * Kaplan model. + */ + kaplan, + }; + + GovHydro4ModelKind() : value(), initialized(false) {} + GovHydro4ModelKind(GovHydro4ModelKind_ENUM value) : value(value), initialized(true) {} + + GovHydro4ModelKind& operator=(GovHydro4ModelKind_ENUM rop); + operator GovHydro4ModelKind_ENUM() const; + + GovHydro4ModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, GovHydro4ModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const GovHydro4ModelKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/GovHydroDD.cpp b/CGMES_3.0.0/GovHydroDD.cpp new file mode 100644 index 000000000..ffe5a05dd --- /dev/null +++ b/CGMES_3.0.0/GovHydroDD.cpp @@ -0,0 +1,607 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroDD.hpp" + +#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() {}; + + +bool assign_GovHydroDD_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroDD_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroDD::debugName[] = "GovHydroDD"; +const char* GovHydroDD::debugString() const +{ + return GovHydroDD::debugName; +} + +void GovHydroDD::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroDD::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroDD::declare() +{ + return BaseClassDefiner(GovHydroDD::addConstructToMap, GovHydroDD::addPrimitiveAssignFnsToMap, GovHydroDD::addClassAssignFnsToMap, GovHydroDD::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroDD_factory() + { + return new GovHydroDD; + } +} diff --git a/CGMES_3.0.0/GovHydroDD.hpp b/CGMES_3.0.0/GovHydroDD.hpp new file mode 100644 index 000000000..389eeafd0 --- /dev/null +++ b/CGMES_3.0.0/GovHydroDD.hpp @@ -0,0 +1,80 @@ +#ifndef GovHydroDD_H +#define GovHydroDD_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Double derivative hydro governor and turbine. + */ + class GovHydroDD : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroDD_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroFrancis.cpp b/CGMES_3.0.0/GovHydroFrancis.cpp new file mode 100644 index 000000000..a7b2eaa75 --- /dev/null +++ b/CGMES_3.0.0/GovHydroFrancis.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroFrancis.hpp" + +#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() {}; + + +bool assign_GovHydroFrancis_am(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->am; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_etamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->etamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->governorControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qc0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twnc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->va; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->waterTunnelSurgeChamberSimulation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroFrancis_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zsfc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroFrancis::debugName[] = "GovHydroFrancis"; +const char* GovHydroFrancis::debugString() const +{ + return GovHydroFrancis::debugName; +} + +void GovHydroFrancis::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroFrancis::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroFrancis::declare() +{ + return BaseClassDefiner(GovHydroFrancis::addConstructToMap, GovHydroFrancis::addPrimitiveAssignFnsToMap, GovHydroFrancis::addClassAssignFnsToMap, GovHydroFrancis::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroFrancis_factory() + { + return new GovHydroFrancis; + } +} diff --git a/CGMES_3.0.0/GovHydroFrancis.hpp b/CGMES_3.0.0/GovHydroFrancis.hpp new file mode 100644 index 000000000..bc7130fa3 --- /dev/null +++ b/CGMES_3.0.0/GovHydroFrancis.hpp @@ -0,0 +1,75 @@ +#ifndef GovHydroFrancis_H +#define GovHydroFrancis_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Area.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "FrancisGovernorControlKind.hpp" +#include "Frequency.hpp" +#include "Length.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "VolumeFlowRate.hpp" + +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. + */ + class GovHydroFrancis : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroFrancis_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroIEEE0.cpp b/CGMES_3.0.0/GovHydroIEEE0.cpp new file mode 100644 index 000000000..282e23474 --- /dev/null +++ b/CGMES_3.0.0/GovHydroIEEE0.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroIEEE0.hpp" + +#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() {}; + + +bool assign_GovHydroIEEE0_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE0_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char GovHydroIEEE0::debugName[] = "GovHydroIEEE0"; +const char* GovHydroIEEE0::debugString() const +{ + return GovHydroIEEE0::debugName; +} + +void GovHydroIEEE0::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroIEEE0::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroIEEE0::declare() +{ + return BaseClassDefiner(GovHydroIEEE0::addConstructToMap, GovHydroIEEE0::addPrimitiveAssignFnsToMap, GovHydroIEEE0::addClassAssignFnsToMap, GovHydroIEEE0::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroIEEE0_factory() + { + return new GovHydroIEEE0; + } +} diff --git a/CGMES_3.0.0/GovHydroIEEE0.hpp b/CGMES_3.0.0/GovHydroIEEE0.hpp new file mode 100644 index 000000000..5edd2f1c5 --- /dev/null +++ b/CGMES_3.0.0/GovHydroIEEE0.hpp @@ -0,0 +1,50 @@ +#ifndef GovHydroIEEE0_H +#define GovHydroIEEE0_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class GovHydroIEEE0 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroIEEE0_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroIEEE2.cpp b/CGMES_3.0.0/GovHydroIEEE2.cpp new file mode 100644 index 000000000..04131e84b --- /dev/null +++ b/CGMES_3.0.0/GovHydroIEEE2.cpp @@ -0,0 +1,463 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroIEEE2.hpp" + +#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() {}; + + +bool assign_GovHydroIEEE2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rtemp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroIEEE2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroIEEE2::debugName[] = "GovHydroIEEE2"; +const char* GovHydroIEEE2::debugString() const +{ + return GovHydroIEEE2::debugName; +} + +void GovHydroIEEE2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroIEEE2::declare() +{ + return BaseClassDefiner(GovHydroIEEE2::addConstructToMap, GovHydroIEEE2::addPrimitiveAssignFnsToMap, GovHydroIEEE2::addClassAssignFnsToMap, GovHydroIEEE2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroIEEE2_factory() + { + return new GovHydroIEEE2; + } +} diff --git a/CGMES_3.0.0/GovHydroIEEE2.hpp b/CGMES_3.0.0/GovHydroIEEE2.hpp new file mode 100644 index 000000000..de8df20d8 --- /dev/null +++ b/CGMES_3.0.0/GovHydroIEEE2.hpp @@ -0,0 +1,69 @@ +#ifndef GovHydroIEEE2_H +#define GovHydroIEEE2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class GovHydroIEEE2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroIEEE2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroPID.cpp b/CGMES_3.0.0/GovHydroPID.cpp new file mode 100644 index 000000000..a97c6c38d --- /dev/null +++ b/CGMES_3.0.0/GovHydroPID.cpp @@ -0,0 +1,575 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroPID.hpp" + +#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() {}; + + +bool assign_GovHydroPID_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroPID::debugName[] = "GovHydroPID"; +const char* GovHydroPID::debugString() const +{ + return GovHydroPID::debugName; +} + +void GovHydroPID::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroPID::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroPID::declare() +{ + return BaseClassDefiner(GovHydroPID::addConstructToMap, GovHydroPID::addPrimitiveAssignFnsToMap, GovHydroPID::addClassAssignFnsToMap, GovHydroPID::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroPID_factory() + { + return new GovHydroPID; + } +} diff --git a/CGMES_3.0.0/GovHydroPID.hpp b/CGMES_3.0.0/GovHydroPID.hpp new file mode 100644 index 000000000..c688e8d2a --- /dev/null +++ b/CGMES_3.0.0/GovHydroPID.hpp @@ -0,0 +1,78 @@ +#ifndef GovHydroPID_H +#define GovHydroPID_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PID governor and turbine. + */ + class GovHydroPID : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroPID_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroPID2.cpp b/CGMES_3.0.0/GovHydroPID2.cpp new file mode 100644 index 000000000..e182c91b5 --- /dev/null +++ b/CGMES_3.0.0/GovHydroPID2.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroPID2.hpp" + +#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() {}; + + +bool assign_GovHydroPID2_atw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->atw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->feedbackSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_g1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_g2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rperm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->treg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPID2_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroPID2::debugName[] = "GovHydroPID2"; +const char* GovHydroPID2::debugString() const +{ + return GovHydroPID2::debugName; +} + +void GovHydroPID2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroPID2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroPID2::declare() +{ + return BaseClassDefiner(GovHydroPID2::addConstructToMap, GovHydroPID2::addPrimitiveAssignFnsToMap, GovHydroPID2::addClassAssignFnsToMap, GovHydroPID2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroPID2_factory() + { + return new GovHydroPID2; + } +} diff --git a/CGMES_3.0.0/GovHydroPID2.hpp b/CGMES_3.0.0/GovHydroPID2.hpp new file mode 100644 index 000000000..e8bf1fee7 --- /dev/null +++ b/CGMES_3.0.0/GovHydroPID2.hpp @@ -0,0 +1,66 @@ +#ifndef GovHydroPID2_H +#define GovHydroPID2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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.] + */ + class GovHydroPID2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroPID2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroPelton.cpp b/CGMES_3.0.0/GovHydroPelton.cpp new file mode 100644 index 000000000..0189ffd03 --- /dev/null +++ b/CGMES_3.0.0/GovHydroPelton.cpp @@ -0,0 +1,495 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroPelton.hpp" + +#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() {}; + + +bool assign_GovHydroPelton_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->av1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qc0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_simplifiedPelton(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->simplifiedPelton; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_staticCompensating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->staticCompensating; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twnc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twng; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->va; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valvmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_vav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vav; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_vcv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->waterTunnelSurgeChamberSimulation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroPelton_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zsfc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroPelton::debugName[] = "GovHydroPelton"; +const char* GovHydroPelton::debugString() const +{ + return GovHydroPelton::debugName; +} + +void GovHydroPelton::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroPelton::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroPelton::declare() +{ + return BaseClassDefiner(GovHydroPelton::addConstructToMap, GovHydroPelton::addPrimitiveAssignFnsToMap, GovHydroPelton::addClassAssignFnsToMap, GovHydroPelton::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroPelton_factory() + { + return new GovHydroPelton; + } +} diff --git a/CGMES_3.0.0/GovHydroPelton.hpp b/CGMES_3.0.0/GovHydroPelton.hpp new file mode 100644 index 000000000..6e3832fb7 --- /dev/null +++ b/CGMES_3.0.0/GovHydroPelton.hpp @@ -0,0 +1,75 @@ +#ifndef GovHydroPelton_H +#define GovHydroPelton_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Area.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "Length.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "VolumeFlowRate.hpp" + +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. + */ + class GovHydroPelton : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroPelton_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroR.cpp b/CGMES_3.0.0/GovHydroR.cpp new file mode 100644 index 000000000..b80203efe --- /dev/null +++ b/CGMES_3.0.0/GovHydroR.cpp @@ -0,0 +1,719 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroR.hpp" + +#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() {}; + + +bool assign_GovHydroR_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->at; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qnl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroR_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroR::debugName[] = "GovHydroR"; +const char* GovHydroR::debugString() const +{ + return GovHydroR::debugName; +} + +void GovHydroR::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroR::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroR::declare() +{ + return BaseClassDefiner(GovHydroR::addConstructToMap, GovHydroR::addPrimitiveAssignFnsToMap, GovHydroR::addClassAssignFnsToMap, GovHydroR::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroR_factory() + { + return new GovHydroR; + } +} diff --git a/CGMES_3.0.0/GovHydroR.hpp b/CGMES_3.0.0/GovHydroR.hpp new file mode 100644 index 000000000..6e8c38bcf --- /dev/null +++ b/CGMES_3.0.0/GovHydroR.hpp @@ -0,0 +1,87 @@ +#ifndef GovHydroR_H +#define GovHydroR_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Fourth order lead-lag governor and hydro turbine. + */ + class GovHydroR : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroR_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroWEH.cpp b/CGMES_3.0.0/GovHydroWEH.cpp new file mode 100644 index 000000000..01f40c3e8 --- /dev/null +++ b/CGMES_3.0.0/GovHydroWEH.cpp @@ -0,0 +1,863 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroWEH.hpp" + +#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() {}; + + +bool assign_GovHydroWEH_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_dicn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dicn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_dpv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dturb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->feedbackSignal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fl5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_fp9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fp9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gtmxcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gtmxcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gtmxop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gtmxop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_pmss9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmss9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_rpg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rpg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_rpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tdv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWEH_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroWEH::debugName[] = "GovHydroWEH"; +const char* GovHydroWEH::debugString() const +{ + return GovHydroWEH::debugName; +} + +void GovHydroWEH::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroWEH::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroWEH::declare() +{ + return BaseClassDefiner(GovHydroWEH::addConstructToMap, GovHydroWEH::addPrimitiveAssignFnsToMap, GovHydroWEH::addClassAssignFnsToMap, GovHydroWEH::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroWEH_factory() + { + return new GovHydroWEH; + } +} diff --git a/CGMES_3.0.0/GovHydroWEH.hpp b/CGMES_3.0.0/GovHydroWEH.hpp new file mode 100644 index 000000000..27588693f --- /dev/null +++ b/CGMES_3.0.0/GovHydroWEH.hpp @@ -0,0 +1,95 @@ +#ifndef GovHydroWEH_H +#define GovHydroWEH_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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.] + */ + class GovHydroWEH : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroWEH_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovHydroWPID.cpp b/CGMES_3.0.0/GovHydroWPID.cpp new file mode 100644 index 000000000..951e73be7 --- /dev/null +++ b/CGMES_3.0.0/GovHydroWPID.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovHydroWPID.hpp" + +#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() {}; + + +bool assign_GovHydroWPID_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gatmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gatmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gatmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gatmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_reg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->reg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->treg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovHydroWPID_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->velmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char GovHydroWPID::debugName[] = "GovHydroWPID"; +const char* GovHydroWPID::debugString() const +{ + return GovHydroWPID::debugName; +} + +void GovHydroWPID::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovHydroWPID::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovHydroWPID::declare() +{ + return BaseClassDefiner(GovHydroWPID::addConstructToMap, GovHydroWPID::addPrimitiveAssignFnsToMap, GovHydroWPID::addClassAssignFnsToMap, GovHydroWPID::debugName); +} + +namespace CIMPP +{ + BaseClass* GovHydroWPID_factory() + { + return new GovHydroWPID; + } +} diff --git a/CGMES_3.0.0/GovHydroWPID.hpp b/CGMES_3.0.0/GovHydroWPID.hpp new file mode 100644 index 000000000..13569ba71 --- /dev/null +++ b/CGMES_3.0.0/GovHydroWPID.hpp @@ -0,0 +1,64 @@ +#ifndef GovHydroWPID_H +#define GovHydroWPID_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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.] + */ + class GovHydroWPID : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovHydroWPID_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteam0.cpp b/CGMES_3.0.0/GovSteam0.cpp new file mode 100644 index 000000000..a1e1a0254 --- /dev/null +++ b/CGMES_3.0.0/GovSteam0.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteam0.hpp" + +#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() {}; + + +bool assign_GovSteam0_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam0_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char GovSteam0::debugName[] = "GovSteam0"; +const char* GovSteam0::debugString() const +{ + return GovSteam0::debugName; +} + +void GovSteam0::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteam0::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteam0::declare() +{ + return BaseClassDefiner(GovSteam0::addConstructToMap, GovSteam0::addPrimitiveAssignFnsToMap, GovSteam0::addClassAssignFnsToMap, GovSteam0::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteam0_factory() + { + return new GovSteam0; + } +} diff --git a/CGMES_3.0.0/GovSteam0.hpp b/CGMES_3.0.0/GovSteam0.hpp new file mode 100644 index 000000000..9cce55629 --- /dev/null +++ b/CGMES_3.0.0/GovSteam0.hpp @@ -0,0 +1,50 @@ +#ifndef GovSteam0_H +#define GovSteam0_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + A simplified steam turbine governor. + */ + class GovSteam0 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteam0_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteam1.cpp b/CGMES_3.0.0/GovSteam1.cpp new file mode 100644 index 000000000..021a8472c --- /dev/null +++ b/CGMES_3.0.0/GovSteam1.cpp @@ -0,0 +1,671 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteam1.hpp" + +#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() {}; + + +bool assign_GovSteam1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_sdb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sdb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_sdb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sdb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam1_valve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->valve; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteam1::debugName[] = "GovSteam1"; +const char* GovSteam1::debugString() const +{ + return GovSteam1::debugName; +} + +void GovSteam1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteam1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteam1::declare() +{ + return BaseClassDefiner(GovSteam1::addConstructToMap, GovSteam1::addPrimitiveAssignFnsToMap, GovSteam1::addClassAssignFnsToMap, GovSteam1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteam1_factory() + { + return new GovSteam1; + } +} diff --git a/CGMES_3.0.0/GovSteam1.hpp b/CGMES_3.0.0/GovSteam1.hpp new file mode 100644 index 000000000..62a661050 --- /dev/null +++ b/CGMES_3.0.0/GovSteam1.hpp @@ -0,0 +1,84 @@ +#ifndef GovSteam1_H +#define GovSteam1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Frequency.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Steam turbine governor, based on the GovSteamIEEE1 (with optional deadband and nonlinear valve gain added). + */ + class GovSteam1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteam1_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteam2.cpp b/CGMES_3.0.0/GovSteam2.cpp new file mode 100644 index 000000000..f81442277 --- /dev/null +++ b/CGMES_3.0.0/GovSteam2.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteam2.hpp" + +#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() {}; + + +bool assign_GovSteam2_dbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteam2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char GovSteam2::debugName[] = "GovSteam2"; +const char* GovSteam2::debugString() const +{ + return GovSteam2::debugName; +} + +void GovSteam2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteam2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteam2::declare() +{ + return BaseClassDefiner(GovSteam2::addConstructToMap, GovSteam2::addPrimitiveAssignFnsToMap, GovSteam2::addClassAssignFnsToMap, GovSteam2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteam2_factory() + { + return new GovSteam2; + } +} diff --git a/CGMES_3.0.0/GovSteam2.hpp b/CGMES_3.0.0/GovSteam2.hpp new file mode 100644 index 000000000..70b16e545 --- /dev/null +++ b/CGMES_3.0.0/GovSteam2.hpp @@ -0,0 +1,50 @@ +#ifndef GovSteam2_H +#define GovSteam2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Simplified governor. + */ + class GovSteam2 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteam2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamBB.cpp b/CGMES_3.0.0/GovSteamBB.cpp new file mode 100644 index 000000000..cf06e83f8 --- /dev/null +++ b/CGMES_3.0.0/GovSteamBB.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamBB.hpp" + +#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() {}; + + +bool assign_GovSteamBB_fcut(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fcut; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_kls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kls; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_peflag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->peflag; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamBB_tn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char GovSteamBB::debugName[] = "GovSteamBB"; +const char* GovSteamBB::debugString() const +{ + return GovSteamBB::debugName; +} + +void GovSteamBB::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamBB::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamBB::declare() +{ + return BaseClassDefiner(GovSteamBB::addConstructToMap, GovSteamBB::addPrimitiveAssignFnsToMap, GovSteamBB::addClassAssignFnsToMap, GovSteamBB::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamBB_factory() + { + return new GovSteamBB; + } +} diff --git a/CGMES_3.0.0/GovSteamBB.hpp b/CGMES_3.0.0/GovSteamBB.hpp new file mode 100644 index 000000000..b4f17b4ca --- /dev/null +++ b/CGMES_3.0.0/GovSteamBB.hpp @@ -0,0 +1,59 @@ +#ifndef GovSteamBB_H +#define GovSteamBB_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + European governor model. + */ + class GovSteamBB : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamBB_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamCC.cpp b/CGMES_3.0.0/GovSteamCC.cpp new file mode 100644 index 000000000..b99f888df --- /dev/null +++ b/CGMES_3.0.0/GovSteamCC.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamCC.hpp" + +#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() {}; + + +bool assign_GovSteamCC_dhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_dlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_fhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_flp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->flp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_pmaxhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmaxhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_pmaxlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmaxlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_rhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_rlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t1hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t1lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t3hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t3lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t4hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t4lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t5hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5hp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamCC_t5lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char GovSteamCC::debugName[] = "GovSteamCC"; +const char* GovSteamCC::debugString() const +{ + return GovSteamCC::debugName; +} + +void GovSteamCC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamCC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamCC::declare() +{ + return BaseClassDefiner(GovSteamCC::addConstructToMap, GovSteamCC::addPrimitiveAssignFnsToMap, GovSteamCC::addClassAssignFnsToMap, GovSteamCC::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamCC_factory() + { + return new GovSteamCC; + } +} diff --git a/CGMES_3.0.0/GovSteamCC.hpp b/CGMES_3.0.0/GovSteamCC.hpp new file mode 100644 index 000000000..7b1cd02cb --- /dev/null +++ b/CGMES_3.0.0/GovSteamCC.hpp @@ -0,0 +1,59 @@ +#ifndef GovSteamCC_H +#define GovSteamCC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "CrossCompoundTurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Cross compound turbine governor. Unlike tandem compound units, cross compound units are not on the same shaft. + */ + class GovSteamCC : public CrossCompoundTurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamCC_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamEU.cpp b/CGMES_3.0.0/GovSteamEU.cpp new file mode 100644 index 000000000..e5dcd366a --- /dev/null +++ b/CGMES_3.0.0/GovSteamEU.cpp @@ -0,0 +1,607 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamEU.hpp" + +#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() {}; + + +bool assign_GovSteamEU_chc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->chc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_cho(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cho; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_cic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_cio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_hhpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hhpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ke; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_kfcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kfcor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->khp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_klp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->klp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_komegacor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->komegacor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_prhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_simx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->simx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tdp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_ten(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ten; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tfp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tlp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tvhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvhp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tvip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wfmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wmax1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wmax2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wwmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wwmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamEU_wwmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->wwmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamEU::debugName[] = "GovSteamEU"; +const char* GovSteamEU::debugString() const +{ + return GovSteamEU::debugName; +} + +void GovSteamEU::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamEU::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamEU::declare() +{ + return BaseClassDefiner(GovSteamEU::addConstructToMap, GovSteamEU::addPrimitiveAssignFnsToMap, GovSteamEU::addClassAssignFnsToMap, GovSteamEU::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamEU_factory() + { + return new GovSteamEU; + } +} diff --git a/CGMES_3.0.0/GovSteamEU.hpp b/CGMES_3.0.0/GovSteamEU.hpp new file mode 100644 index 000000000..1d7c2b971 --- /dev/null +++ b/CGMES_3.0.0/GovSteamEU.hpp @@ -0,0 +1,78 @@ +#ifndef GovSteamEU_H +#define GovSteamEU_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Simplified boiler and steam turbine with PID governor. + */ + class GovSteamEU : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamEU_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamFV2.cpp b/CGMES_3.0.0/GovSteamFV2.cpp new file mode 100644 index 000000000..348e0324d --- /dev/null +++ b/CGMES_3.0.0/GovSteamFV2.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamFV2.hpp" + +#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() {}; + + +bool assign_GovSteamFV2_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char GovSteamFV2::debugName[] = "GovSteamFV2"; +const char* GovSteamFV2::debugString() const +{ + return GovSteamFV2::debugName; +} + +void GovSteamFV2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamFV2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamFV2::declare() +{ + return BaseClassDefiner(GovSteamFV2::addConstructToMap, GovSteamFV2::addPrimitiveAssignFnsToMap, GovSteamFV2::addClassAssignFnsToMap, GovSteamFV2::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamFV2_factory() + { + return new GovSteamFV2; + } +} diff --git a/CGMES_3.0.0/GovSteamFV2.hpp b/CGMES_3.0.0/GovSteamFV2.hpp new file mode 100644 index 000000000..04f9d24ff --- /dev/null +++ b/CGMES_3.0.0/GovSteamFV2.hpp @@ -0,0 +1,54 @@ +#ifndef GovSteamFV2_H +#define GovSteamFV2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamFV2_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamFV3.cpp b/CGMES_3.0.0/GovSteamFV3.cpp new file mode 100644 index 000000000..e9cb356d5 --- /dev/null +++ b/CGMES_3.0.0/GovSteamFV3.cpp @@ -0,0 +1,543 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamFV3.hpp" + +#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() {}; + + +bool assign_GovSteamFV3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pgv6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_prmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV3_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamFV3::debugName[] = "GovSteamFV3"; +const char* GovSteamFV3::debugString() const +{ + return GovSteamFV3::debugName; +} + +void GovSteamFV3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamFV3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamFV3::declare() +{ + return BaseClassDefiner(GovSteamFV3::addConstructToMap, GovSteamFV3::addPrimitiveAssignFnsToMap, GovSteamFV3::addClassAssignFnsToMap, GovSteamFV3::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamFV3_factory() + { + return new GovSteamFV3; + } +} diff --git a/CGMES_3.0.0/GovSteamFV3.hpp b/CGMES_3.0.0/GovSteamFV3.hpp new file mode 100644 index 000000000..3cb519c4d --- /dev/null +++ b/CGMES_3.0.0/GovSteamFV3.hpp @@ -0,0 +1,74 @@ +#ifndef GovSteamFV3_H +#define GovSteamFV3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Simplified GovSteamIEEE1 steam turbine governor with Prmax limit and fast valving. + */ + class GovSteamFV3 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamFV3_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamFV4.cpp b/CGMES_3.0.0/GovSteamFV4.cpp new file mode 100644 index 000000000..b40041f9f --- /dev/null +++ b/CGMES_3.0.0/GovSteamFV4.cpp @@ -0,0 +1,863 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamFV4.hpp" + +#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() {}; + + +bool assign_GovSteamFV4_cpsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cpsmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_cpsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cpsmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_crmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->crmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_crmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->crmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->khp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kmp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmp1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kmp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmp2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_kpt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_krc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->krc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ksh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ksh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_lpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lpi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_lps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lps; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mnef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mxef; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_pr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pr1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_pr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pr2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_psmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->psmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rsmimn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rsmimn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rsmimx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rsmimx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rvgmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rvgmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_rvgmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rvgmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_srmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->srmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_srmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->srmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_srsmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->srsmp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_svmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->svmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_svmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->svmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tam; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tcm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tmp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->trh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ty; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->y; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_yhpmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yhpmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_yhpmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->yhpmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ympmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ympmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamFV4_ympmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ympmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamFV4::debugName[] = "GovSteamFV4"; +const char* GovSteamFV4::debugString() const +{ + return GovSteamFV4::debugName; +} + +void GovSteamFV4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamFV4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamFV4::declare() +{ + return BaseClassDefiner(GovSteamFV4::addConstructToMap, GovSteamFV4::addPrimitiveAssignFnsToMap, GovSteamFV4::addClassAssignFnsToMap, GovSteamFV4::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamFV4_factory() + { + return new GovSteamFV4; + } +} diff --git a/CGMES_3.0.0/GovSteamFV4.hpp b/CGMES_3.0.0/GovSteamFV4.hpp new file mode 100644 index 000000000..fa192e306 --- /dev/null +++ b/CGMES_3.0.0/GovSteamFV4.hpp @@ -0,0 +1,93 @@ +#ifndef GovSteamFV4_H +#define GovSteamFV4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Detailed electro-hydraulic governor for steam unit. + */ + class GovSteamFV4 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamFV4_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamIEEE1.cpp b/CGMES_3.0.0/GovSteamIEEE1.cpp new file mode 100644 index 000000000..ff2f96227 --- /dev/null +++ b/CGMES_3.0.0/GovSteamIEEE1.cpp @@ -0,0 +1,383 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamIEEE1.hpp" + +#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() {}; + + +bool assign_GovSteamIEEE1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamIEEE1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + +const char GovSteamIEEE1::debugName[] = "GovSteamIEEE1"; +const char* GovSteamIEEE1::debugString() const +{ + return GovSteamIEEE1::debugName; +} + +void GovSteamIEEE1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamIEEE1::declare() +{ + return BaseClassDefiner(GovSteamIEEE1::addConstructToMap, GovSteamIEEE1::addPrimitiveAssignFnsToMap, GovSteamIEEE1::addClassAssignFnsToMap, GovSteamIEEE1::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamIEEE1_factory() + { + return new GovSteamIEEE1; + } +} diff --git a/CGMES_3.0.0/GovSteamIEEE1.hpp b/CGMES_3.0.0/GovSteamIEEE1.hpp new file mode 100644 index 000000000..27103dea2 --- /dev/null +++ b/CGMES_3.0.0/GovSteamIEEE1.hpp @@ -0,0 +1,64 @@ +#ifndef GovSteamIEEE1_H +#define GovSteamIEEE1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class GovSteamIEEE1 : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamIEEE1_factory(); +} +#endif diff --git a/CGMES_3.0.0/GovSteamSGO.cpp b/CGMES_3.0.0/GovSteamSGO.cpp new file mode 100644 index 000000000..6ebbc4068 --- /dev/null +++ b/CGMES_3.0.0/GovSteamSGO.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GovSteamSGO.hpp" + +#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() {}; + + +bool assign_GovSteamSGO_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_GovSteamSGO_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char GovSteamSGO::debugName[] = "GovSteamSGO"; +const char* GovSteamSGO::debugString() const +{ + return GovSteamSGO::debugName; +} + +void GovSteamSGO::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GovSteamSGO::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GovSteamSGO::declare() +{ + return BaseClassDefiner(GovSteamSGO::addConstructToMap, GovSteamSGO::addPrimitiveAssignFnsToMap, GovSteamSGO::addClassAssignFnsToMap, GovSteamSGO::debugName); +} + +namespace CIMPP +{ + BaseClass* GovSteamSGO_factory() + { + return new GovSteamSGO; + } +} diff --git a/CGMES_3.0.0/GovSteamSGO.hpp b/CGMES_3.0.0/GovSteamSGO.hpp new file mode 100644 index 000000000..bca7f23a5 --- /dev/null +++ b/CGMES_3.0.0/GovSteamSGO.hpp @@ -0,0 +1,54 @@ +#ifndef GovSteamSGO_H +#define GovSteamSGO_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Simplified steam turbine governor. + */ + class GovSteamSGO : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GovSteamSGO_factory(); +} +#endif diff --git a/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp b/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp new file mode 100644 index 000000000..5613e7343 --- /dev/null +++ b/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GrossToNetActivePowerCurve.hpp" + +#include +#include + +#include "GeneratingUnit.hpp" + +using namespace CIMPP; + +GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {}; +GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {}; + + + + +bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass*, BaseClass*); +bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GrossToNetActivePowerCurve* 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_GrossToNetActivePowerCurves(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char GrossToNetActivePowerCurve::debugName[] = "GrossToNetActivePowerCurve"; +const char* GrossToNetActivePowerCurve::debugString() const +{ + return GrossToNetActivePowerCurve::debugName; +} + +void GrossToNetActivePowerCurve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve"), &GrossToNetActivePowerCurve_factory)); +} + +void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void GrossToNetActivePowerCurve::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve.GeneratingUnit"), &assign_GrossToNetActivePowerCurve_GeneratingUnit)); +} + +const BaseClassDefiner GrossToNetActivePowerCurve::declare() +{ + return BaseClassDefiner(GrossToNetActivePowerCurve::addConstructToMap, GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap, GrossToNetActivePowerCurve::addClassAssignFnsToMap, GrossToNetActivePowerCurve::debugName); +} + +namespace CIMPP +{ + BaseClass* GrossToNetActivePowerCurve_factory() + { + return new GrossToNetActivePowerCurve; + } +} diff --git a/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp b/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp new file mode 100644 index 000000000..1f6ed53a5 --- /dev/null +++ b/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp @@ -0,0 +1,41 @@ +#ifndef GrossToNetActivePowerCurve_H +#define GrossToNetActivePowerCurve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Curve.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class GrossToNetActivePowerCurve : public Curve + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GrossToNetActivePowerCurve_factory(); +} +#endif diff --git a/CGMES_3.0.0/Ground.cpp b/CGMES_3.0.0/Ground.cpp new file mode 100644 index 000000000..6ecc2e31b --- /dev/null +++ b/CGMES_3.0.0/Ground.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Ground.hpp" + +#include +#include + + +using namespace CIMPP; + +Ground::Ground() {}; +Ground::~Ground() {}; + + + +const char Ground::debugName[] = "Ground"; +const char* Ground::debugString() const +{ + return Ground::debugName; +} + +void Ground::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Ground"), &Ground_factory)); +} + +void Ground::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Ground::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Ground::declare() +{ + return BaseClassDefiner(Ground::addConstructToMap, Ground::addPrimitiveAssignFnsToMap, Ground::addClassAssignFnsToMap, Ground::debugName); +} + +namespace CIMPP +{ + BaseClass* Ground_factory() + { + return new Ground; + } +} diff --git a/CGMES_3.0.0/Ground.hpp b/CGMES_3.0.0/Ground.hpp new file mode 100644 index 000000000..884ee0ea2 --- /dev/null +++ b/CGMES_3.0.0/Ground.hpp @@ -0,0 +1,39 @@ +#ifndef Ground_H +#define Ground_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Ground : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + Ground(); + ~Ground() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Ground_factory(); +} +#endif diff --git a/CGMES_3.0.0/GroundDisconnector.cpp b/CGMES_3.0.0/GroundDisconnector.cpp new file mode 100644 index 000000000..0e0e20f77 --- /dev/null +++ b/CGMES_3.0.0/GroundDisconnector.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GroundDisconnector.hpp" + +#include +#include + + +using namespace CIMPP; + +GroundDisconnector::GroundDisconnector() {}; +GroundDisconnector::~GroundDisconnector() {}; + + + +const char GroundDisconnector::debugName[] = "GroundDisconnector"; +const char* GroundDisconnector::debugString() const +{ + return GroundDisconnector::debugName; +} + +void GroundDisconnector::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:GroundDisconnector"), &GroundDisconnector_factory)); +} + +void GroundDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void GroundDisconnector::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GroundDisconnector::declare() +{ + return BaseClassDefiner(GroundDisconnector::addConstructToMap, GroundDisconnector::addPrimitiveAssignFnsToMap, GroundDisconnector::addClassAssignFnsToMap, GroundDisconnector::debugName); +} + +namespace CIMPP +{ + BaseClass* GroundDisconnector_factory() + { + return new GroundDisconnector; + } +} diff --git a/CGMES_3.0.0/GroundDisconnector.hpp b/CGMES_3.0.0/GroundDisconnector.hpp new file mode 100644 index 000000000..205e960d4 --- /dev/null +++ b/CGMES_3.0.0/GroundDisconnector.hpp @@ -0,0 +1,39 @@ +#ifndef GroundDisconnector_H +#define GroundDisconnector_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. + */ + class GroundDisconnector : public Switch + { + public: + /* constructor initialising all attributes to null */ + GroundDisconnector(); + ~GroundDisconnector() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GroundDisconnector_factory(); +} +#endif diff --git a/CGMES_3.0.0/GroundingImpedance.cpp b/CGMES_3.0.0/GroundingImpedance.cpp new file mode 100644 index 000000000..69249ef74 --- /dev/null +++ b/CGMES_3.0.0/GroundingImpedance.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "GroundingImpedance.hpp" + +#include +#include + +#include "Reactance.hpp" + +using namespace CIMPP; + +GroundingImpedance::GroundingImpedance() {}; +GroundingImpedance::~GroundingImpedance() {}; + + +bool assign_GroundingImpedance_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char GroundingImpedance::debugName[] = "GroundingImpedance"; +const char* GroundingImpedance::debugString() const +{ + return GroundingImpedance::debugName; +} + +void GroundingImpedance::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void GroundingImpedance::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner GroundingImpedance::declare() +{ + return BaseClassDefiner(GroundingImpedance::addConstructToMap, GroundingImpedance::addPrimitiveAssignFnsToMap, GroundingImpedance::addClassAssignFnsToMap, GroundingImpedance::debugName); +} + +namespace CIMPP +{ + BaseClass* GroundingImpedance_factory() + { + return new GroundingImpedance; + } +} diff --git a/CGMES_3.0.0/GroundingImpedance.hpp b/CGMES_3.0.0/GroundingImpedance.hpp new file mode 100644 index 000000000..38e6733ff --- /dev/null +++ b/CGMES_3.0.0/GroundingImpedance.hpp @@ -0,0 +1,41 @@ +#ifndef GroundingImpedance_H +#define GroundingImpedance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EarthFaultCompensator.hpp" +#include "BaseClassDefiner.hpp" +#include "Reactance.hpp" + +namespace CIMPP +{ + + /* + A fixed impedance device used for grounding. + */ + class GroundingImpedance : public EarthFaultCompensator + { + public: + /* constructor initialising all attributes to null */ + GroundingImpedance(); + ~GroundingImpedance() override; + + CIMPP::Reactance x; /* Reactance of device. Default: nullptr */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* GroundingImpedance_factory(); +} +#endif diff --git a/CGMES_3.0.0/HVDCDynamics.cpp b/CGMES_3.0.0/HVDCDynamics.cpp new file mode 100644 index 000000000..be00cd2bd --- /dev/null +++ b/CGMES_3.0.0/HVDCDynamics.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HVDCDynamics.hpp" + +#include +#include + + +using namespace CIMPP; + +HVDCDynamics::HVDCDynamics() {}; +HVDCDynamics::~HVDCDynamics() {}; + + + +const char HVDCDynamics::debugName[] = "HVDCDynamics"; +const char* HVDCDynamics::debugString() const +{ + return HVDCDynamics::debugName; +} + +void HVDCDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:HVDCDynamics"), &HVDCDynamics_factory)); +} + +void HVDCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void HVDCDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner HVDCDynamics::declare() +{ + return BaseClassDefiner(HVDCDynamics::addConstructToMap, HVDCDynamics::addPrimitiveAssignFnsToMap, HVDCDynamics::addClassAssignFnsToMap, HVDCDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* HVDCDynamics_factory() + { + return new HVDCDynamics; + } +} diff --git a/CGMES_3.0.0/HVDCDynamics.hpp b/CGMES_3.0.0/HVDCDynamics.hpp new file mode 100644 index 000000000..8a3a9846c --- /dev/null +++ b/CGMES_3.0.0/HVDCDynamics.hpp @@ -0,0 +1,39 @@ +#ifndef HVDCDynamics_H +#define HVDCDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + HVDC whose behaviour is described by reference to a standard model or by definition of a user-defined model. + */ + class HVDCDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + HVDCDynamics(); + ~HVDCDynamics() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HVDCDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/HydroEnergyConversionKind.cpp b/CGMES_3.0.0/HydroEnergyConversionKind.cpp new file mode 100644 index 000000000..1bc81701f --- /dev/null +++ b/CGMES_3.0.0/HydroEnergyConversionKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroEnergyConversionKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +HydroEnergyConversionKind& HydroEnergyConversionKind::operator=(HydroEnergyConversionKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +HydroEnergyConversionKind::operator HydroEnergyConversionKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char HydroEnergyConversionKind::debugName[] = "HydroEnergyConversionKind"; +const char* HydroEnergyConversionKind::debugString() const +{ + return HydroEnergyConversionKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, HydroEnergyConversionKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = HydroEnergyConversionKind::generator; + return lop; + } + if(EnumSymbol == "pumpAndGenerator") + { + rop = HydroEnergyConversionKind::pumpAndGenerator; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const HydroEnergyConversionKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == HydroEnergyConversionKind::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == HydroEnergyConversionKind::pumpAndGenerator) + { + EnumSymbol = "pumpAndGenerator"; + } + + if (!EnumSymbol.empty()) + { + os << "HydroEnergyConversionKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/HydroEnergyConversionKind.hpp b/CGMES_3.0.0/HydroEnergyConversionKind.hpp new file mode 100644 index 000000000..fb666b097 --- /dev/null +++ b/CGMES_3.0.0/HydroEnergyConversionKind.hpp @@ -0,0 +1,46 @@ +#ifndef HydroEnergyConversionKind_H +#define HydroEnergyConversionKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + generator, + /** + * Able to both generate power and pump water for energy storage. + */ + pumpAndGenerator, + }; + + HydroEnergyConversionKind() : value(), initialized(false) {} + HydroEnergyConversionKind(HydroEnergyConversionKind_ENUM value) : value(value), initialized(true) {} + + HydroEnergyConversionKind& operator=(HydroEnergyConversionKind_ENUM rop); + operator HydroEnergyConversionKind_ENUM() const; + + HydroEnergyConversionKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, HydroEnergyConversionKind& rop); + friend std::ostream& operator<<(std::ostream& os, const HydroEnergyConversionKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/HydroGeneratingUnit.cpp b/CGMES_3.0.0/HydroGeneratingUnit.cpp new file mode 100644 index 000000000..fcc4977d1 --- /dev/null +++ b/CGMES_3.0.0/HydroGeneratingUnit.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroGeneratingUnit.hpp" + +#include +#include + +#include "HydroPowerPlant.hpp" +#include "Length.hpp" +#include "HydroEnergyConversionKind.hpp" +#include "HydroTurbineKind.hpp" + +using namespace CIMPP; + +HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {}; +HydroGeneratingUnit::~HydroGeneratingUnit() {}; + + + +bool assign_HydroGeneratingUnit_dropHeight(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dropHeight; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +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_HydroGeneratingUnit_turbineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->turbineType; + 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) +{ + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + HydroPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HydroPowerPlant != element2) + { + element->HydroPowerPlant = element2; + return assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char HydroGeneratingUnit::debugName[] = "HydroGeneratingUnit"; +const char* HydroGeneratingUnit::debugString() const +{ + return HydroGeneratingUnit::debugName; +} + +void HydroGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void HydroGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.HydroPowerPlant"), &assign_HydroGeneratingUnit_HydroPowerPlant)); +} + +const BaseClassDefiner HydroGeneratingUnit::declare() +{ + return BaseClassDefiner(HydroGeneratingUnit::addConstructToMap, HydroGeneratingUnit::addPrimitiveAssignFnsToMap, HydroGeneratingUnit::addClassAssignFnsToMap, HydroGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* HydroGeneratingUnit_factory() + { + return new HydroGeneratingUnit; + } +} diff --git a/CGMES_3.0.0/HydroGeneratingUnit.hpp b/CGMES_3.0.0/HydroGeneratingUnit.hpp new file mode 100644 index 000000000..81e69f508 --- /dev/null +++ b/CGMES_3.0.0/HydroGeneratingUnit.hpp @@ -0,0 +1,47 @@ +#ifndef HydroGeneratingUnit_H +#define HydroGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" +#include "HydroEnergyConversionKind.hpp" +#include "HydroTurbineKind.hpp" +#include "Length.hpp" + +namespace CIMPP +{ + class HydroPowerPlant; + + /* + A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). + */ + class HydroGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HydroGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/HydroPlantStorageKind.cpp b/CGMES_3.0.0/HydroPlantStorageKind.cpp new file mode 100644 index 000000000..4930efb66 --- /dev/null +++ b/CGMES_3.0.0/HydroPlantStorageKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroPlantStorageKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +HydroPlantStorageKind& HydroPlantStorageKind::operator=(HydroPlantStorageKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +HydroPlantStorageKind::operator HydroPlantStorageKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char HydroPlantStorageKind::debugName[] = "HydroPlantStorageKind"; +const char* HydroPlantStorageKind::debugString() const +{ + return HydroPlantStorageKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, HydroPlantStorageKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "runOfRiver") + { + rop = HydroPlantStorageKind::runOfRiver; + return lop; + } + if(EnumSymbol == "pumpedStorage") + { + rop = HydroPlantStorageKind::pumpedStorage; + return lop; + } + if(EnumSymbol == "storage") + { + rop = HydroPlantStorageKind::storage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const HydroPlantStorageKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == HydroPlantStorageKind::runOfRiver) + { + EnumSymbol = "runOfRiver"; + } + if (obj.value == HydroPlantStorageKind::pumpedStorage) + { + EnumSymbol = "pumpedStorage"; + } + if (obj.value == HydroPlantStorageKind::storage) + { + EnumSymbol = "storage"; + } + + if (!EnumSymbol.empty()) + { + os << "HydroPlantStorageKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/HydroPlantStorageKind.hpp b/CGMES_3.0.0/HydroPlantStorageKind.hpp new file mode 100644 index 000000000..ddd375110 --- /dev/null +++ b/CGMES_3.0.0/HydroPlantStorageKind.hpp @@ -0,0 +1,50 @@ +#ifndef HydroPlantStorageKind_H +#define HydroPlantStorageKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The type of hydro power plant. + */ + class HydroPlantStorageKind + { + public: + enum HydroPlantStorageKind_ENUM + { + /** + * Run of river. + */ + runOfRiver, + /** + * Pumped storage. + */ + pumpedStorage, + /** + * Storage. + */ + storage, + }; + + HydroPlantStorageKind() : value(), initialized(false) {} + HydroPlantStorageKind(HydroPlantStorageKind_ENUM value) : value(value), initialized(true) {} + + HydroPlantStorageKind& operator=(HydroPlantStorageKind_ENUM rop); + operator HydroPlantStorageKind_ENUM() const; + + HydroPlantStorageKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, HydroPlantStorageKind& rop); + friend std::ostream& operator<<(std::ostream& os, const HydroPlantStorageKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/HydroPowerPlant.cpp b/CGMES_3.0.0/HydroPowerPlant.cpp new file mode 100644 index 000000000..d17dd63dc --- /dev/null +++ b/CGMES_3.0.0/HydroPowerPlant.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroPowerPlant.hpp" + +#include +#include + +#include "HydroGeneratingUnit.hpp" +#include "HydroPump.hpp" +#include "HydroPlantStorageKind.hpp" + +using namespace CIMPP; + +HydroPowerPlant::HydroPowerPlant() {}; +HydroPowerPlant::~HydroPowerPlant() {}; + + + + +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) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + HydroGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HydroGeneratingUnits.begin(), element->HydroGeneratingUnits.end(), element2) == element->HydroGeneratingUnits.end()) + { + element->HydroGeneratingUnits.push_back(element2); + return assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_HydroPump_HydroPowerPlant(BaseClass*, BaseClass*); +bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HydroPumps.begin(), element->HydroPumps.end(), element2) == element->HydroPumps.end()) + { + element->HydroPumps.push_back(element2); + return assign_HydroPump_HydroPowerPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char HydroPowerPlant::debugName[] = "HydroPowerPlant"; +const char* HydroPowerPlant::debugString() const +{ + return HydroPowerPlant::debugName; +} + +void HydroPowerPlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner HydroPowerPlant::declare() +{ + return BaseClassDefiner(HydroPowerPlant::addConstructToMap, HydroPowerPlant::addPrimitiveAssignFnsToMap, HydroPowerPlant::addClassAssignFnsToMap, HydroPowerPlant::debugName); +} + +namespace CIMPP +{ + BaseClass* HydroPowerPlant_factory() + { + return new HydroPowerPlant; + } +} diff --git a/CGMES_3.0.0/HydroPowerPlant.hpp b/CGMES_3.0.0/HydroPowerPlant.hpp new file mode 100644 index 000000000..40f735bc6 --- /dev/null +++ b/CGMES_3.0.0/HydroPowerPlant.hpp @@ -0,0 +1,45 @@ +#ifndef HydroPowerPlant_H +#define HydroPowerPlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "HydroPlantStorageKind.hpp" + +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. + */ + class HydroPowerPlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HydroPowerPlant_factory(); +} +#endif diff --git a/CGMES_3.0.0/HydroPump.cpp b/CGMES_3.0.0/HydroPump.cpp new file mode 100644 index 000000000..0e80d09dc --- /dev/null +++ b/CGMES_3.0.0/HydroPump.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroPump.hpp" + +#include +#include + +#include "HydroPowerPlant.hpp" +#include "RotatingMachine.hpp" + +using namespace CIMPP; + +HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {}; +HydroPump::~HydroPump() {}; + + + + + +bool assign_HydroPowerPlant_HydroPumps(BaseClass*, BaseClass*); +bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + HydroPump* element = dynamic_cast(BaseClass_ptr1); + HydroPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HydroPowerPlant != element2) + { + element->HydroPowerPlant = element2; + return assign_HydroPowerPlant_HydroPumps(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RotatingMachine_HydroPump(BaseClass*, BaseClass*); +bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + HydroPump* element = dynamic_cast(BaseClass_ptr1); + RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RotatingMachine != element2) + { + element->RotatingMachine = element2; + return assign_RotatingMachine_HydroPump(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char HydroPump::debugName[] = "HydroPump"; +const char* HydroPump::debugString() const +{ + return HydroPump::debugName; +} + +void HydroPump::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:HydroPump"), &HydroPump_factory)); +} + +void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void HydroPump::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner HydroPump::declare() +{ + return BaseClassDefiner(HydroPump::addConstructToMap, HydroPump::addPrimitiveAssignFnsToMap, HydroPump::addClassAssignFnsToMap, HydroPump::debugName); +} + +namespace CIMPP +{ + BaseClass* HydroPump_factory() + { + return new HydroPump; + } +} diff --git a/CGMES_3.0.0/HydroPump.hpp b/CGMES_3.0.0/HydroPump.hpp new file mode 100644 index 000000000..54ab372d8 --- /dev/null +++ b/CGMES_3.0.0/HydroPump.hpp @@ -0,0 +1,43 @@ +#ifndef HydroPump_H +#define HydroPump_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class HydroPowerPlant; + class RotatingMachine; + + /* + A synchronous motor-driven pump, typically associated with a pumped storage plant. + */ + class HydroPump : public Equipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* HydroPump_factory(); +} +#endif diff --git a/CGMES_3.0.0/HydroTurbineKind.cpp b/CGMES_3.0.0/HydroTurbineKind.cpp new file mode 100644 index 000000000..017c0a686 --- /dev/null +++ b/CGMES_3.0.0/HydroTurbineKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "HydroTurbineKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +HydroTurbineKind& HydroTurbineKind::operator=(HydroTurbineKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +HydroTurbineKind::operator HydroTurbineKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char HydroTurbineKind::debugName[] = "HydroTurbineKind"; +const char* HydroTurbineKind::debugString() const +{ + return HydroTurbineKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, HydroTurbineKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "HydroTurbineKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "francis") + { + rop = HydroTurbineKind::francis; + return lop; + } + if(EnumSymbol == "pelton") + { + rop = HydroTurbineKind::pelton; + return lop; + } + if(EnumSymbol == "kaplan") + { + rop = HydroTurbineKind::kaplan; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const HydroTurbineKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == HydroTurbineKind::francis) + { + EnumSymbol = "francis"; + } + if (obj.value == HydroTurbineKind::pelton) + { + EnumSymbol = "pelton"; + } + if (obj.value == HydroTurbineKind::kaplan) + { + EnumSymbol = "kaplan"; + } + + if (!EnumSymbol.empty()) + { + os << "HydroTurbineKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/HydroTurbineKind.hpp b/CGMES_3.0.0/HydroTurbineKind.hpp new file mode 100644 index 000000000..e5037e37b --- /dev/null +++ b/CGMES_3.0.0/HydroTurbineKind.hpp @@ -0,0 +1,50 @@ +#ifndef HydroTurbineKind_H +#define HydroTurbineKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of turbine. + */ + class HydroTurbineKind + { + public: + enum HydroTurbineKind_ENUM + { + /** + * Francis. + */ + francis, + /** + * Pelton. + */ + pelton, + /** + * Kaplan. + */ + kaplan, + }; + + HydroTurbineKind() : value(), initialized(false) {} + HydroTurbineKind(HydroTurbineKind_ENUM value) : value(value), initialized(true) {} + + HydroTurbineKind& operator=(HydroTurbineKind_ENUM rop); + operator HydroTurbineKind_ENUM() const; + + HydroTurbineKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, HydroTurbineKind& rop); + friend std::ostream& operator<<(std::ostream& os, const HydroTurbineKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/IEC61970.hpp b/CGMES_3.0.0/IEC61970.hpp new file mode 100644 index 000000000..94fae3954 --- /dev/null +++ b/CGMES_3.0.0/IEC61970.hpp @@ -0,0 +1,447 @@ +#ifndef IEC61970_H +#define IEC61970_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include "ACDCConverter.hpp" +#include "ACDCConverterDCTerminal.hpp" +#include "ACDCTerminal.hpp" +#include "ACLineSegment.hpp" +#include "Accumulator.hpp" +#include "AccumulatorLimit.hpp" +#include "AccumulatorLimitSet.hpp" +#include "AccumulatorReset.hpp" +#include "AccumulatorValue.hpp" +#include "ActivePowerLimit.hpp" +#include "Analog.hpp" +#include "AnalogControl.hpp" +#include "AnalogLimit.hpp" +#include "AnalogLimitSet.hpp" +#include "AnalogValue.hpp" +#include "ApparentPowerLimit.hpp" +#include "AsynchronousMachine.hpp" +#include "AsynchronousMachineDynamics.hpp" +#include "AsynchronousMachineEquivalentCircuit.hpp" +#include "AsynchronousMachineTimeConstantReactance.hpp" +#include "AsynchronousMachineUserDefined.hpp" +#include "AuxiliaryEquipment.hpp" +#include "BaseVoltage.hpp" +#include "BasicIntervalSchedule.hpp" +#include "BatteryUnit.hpp" +#include "Bay.hpp" +#include "BoundaryPoint.hpp" +#include "Breaker.hpp" +#include "BusNameMarker.hpp" +#include "BusbarSection.hpp" +#include "CAESPlant.hpp" +#include "CSCDynamics.hpp" +#include "CSCUserDefined.hpp" +#include "Clamp.hpp" +#include "CogenerationPlant.hpp" +#include "CombinedCyclePlant.hpp" +#include "Command.hpp" +#include "ConductingEquipment.hpp" +#include "Conductor.hpp" +#include "ConformLoad.hpp" +#include "ConformLoadGroup.hpp" +#include "ConformLoadSchedule.hpp" +#include "ConnectivityNode.hpp" +#include "ConnectivityNodeContainer.hpp" +#include "Connector.hpp" +#include "Control.hpp" +#include "ControlArea.hpp" +#include "ControlAreaGeneratingUnit.hpp" +#include "CoordinateSystem.hpp" +#include "CrossCompoundTurbineGovernorDynamics.hpp" +#include "CsConverter.hpp" +#include "CurrentLimit.hpp" +#include "CurrentTransformer.hpp" +#include "Curve.hpp" +#include "CurveData.hpp" +#include "Cut.hpp" +#include "DCBaseTerminal.hpp" +#include "DCBreaker.hpp" +#include "DCBusbar.hpp" +#include "DCChopper.hpp" +#include "DCConductingEquipment.hpp" +#include "DCConverterUnit.hpp" +#include "DCDisconnector.hpp" +#include "DCEquipmentContainer.hpp" +#include "DCGround.hpp" +#include "DCLine.hpp" +#include "DCLineSegment.hpp" +#include "DCNode.hpp" +#include "DCSeriesDevice.hpp" +#include "DCShunt.hpp" +#include "DCSwitch.hpp" +#include "DCTerminal.hpp" +#include "DCTopologicalIsland.hpp" +#include "DCTopologicalNode.hpp" +#include "DayType.hpp" +#include "Diagram.hpp" +#include "DiagramObject.hpp" +#include "DiagramObjectGluePoint.hpp" +#include "DiagramObjectPoint.hpp" +#include "DiagramObjectStyle.hpp" +#include "DiagramStyle.hpp" +#include "DiscExcContIEEEDEC1A.hpp" +#include "DiscExcContIEEEDEC2A.hpp" +#include "DiscExcContIEEEDEC3A.hpp" +#include "DisconnectingCircuitBreaker.hpp" +#include "Disconnector.hpp" +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "DiscontinuousExcitationControlUserDefined.hpp" +#include "Discrete.hpp" +#include "DiscreteValue.hpp" +#include "DynamicsFunctionBlock.hpp" +#include "EarthFaultCompensator.hpp" +#include "EnergyArea.hpp" +#include "EnergyConnection.hpp" +#include "EnergyConsumer.hpp" +#include "EnergySchedulingType.hpp" +#include "EnergySource.hpp" +#include "Equipment.hpp" +#include "EquipmentContainer.hpp" +#include "EquivalentBranch.hpp" +#include "EquivalentEquipment.hpp" +#include "EquivalentInjection.hpp" +#include "EquivalentNetwork.hpp" +#include "EquivalentShunt.hpp" +#include "ExcAC1A.hpp" +#include "ExcAC2A.hpp" +#include "ExcAC3A.hpp" +#include "ExcAC4A.hpp" +#include "ExcAC5A.hpp" +#include "ExcAC6A.hpp" +#include "ExcAC8B.hpp" +#include "ExcANS.hpp" +#include "ExcAVR1.hpp" +#include "ExcAVR2.hpp" +#include "ExcAVR3.hpp" +#include "ExcAVR4.hpp" +#include "ExcAVR5.hpp" +#include "ExcAVR7.hpp" +#include "ExcBBC.hpp" +#include "ExcCZ.hpp" +#include "ExcDC1A.hpp" +#include "ExcDC2A.hpp" +#include "ExcDC3A.hpp" +#include "ExcDC3A1.hpp" +#include "ExcELIN1.hpp" +#include "ExcELIN2.hpp" +#include "ExcHU.hpp" +#include "ExcIEEEAC1A.hpp" +#include "ExcIEEEAC2A.hpp" +#include "ExcIEEEAC3A.hpp" +#include "ExcIEEEAC4A.hpp" +#include "ExcIEEEAC5A.hpp" +#include "ExcIEEEAC6A.hpp" +#include "ExcIEEEAC7B.hpp" +#include "ExcIEEEAC8B.hpp" +#include "ExcIEEEDC1A.hpp" +#include "ExcIEEEDC2A.hpp" +#include "ExcIEEEDC3A.hpp" +#include "ExcIEEEDC4B.hpp" +#include "ExcIEEEST1A.hpp" +#include "ExcIEEEST2A.hpp" +#include "ExcIEEEST3A.hpp" +#include "ExcIEEEST4B.hpp" +#include "ExcIEEEST5B.hpp" +#include "ExcIEEEST6B.hpp" +#include "ExcIEEEST7B.hpp" +#include "ExcNI.hpp" +#include "ExcOEX3T.hpp" +#include "ExcPIC.hpp" +#include "ExcREXS.hpp" +#include "ExcRQB.hpp" +#include "ExcSCRX.hpp" +#include "ExcSEXS.hpp" +#include "ExcSK.hpp" +#include "ExcST1A.hpp" +#include "ExcST2A.hpp" +#include "ExcST3A.hpp" +#include "ExcST4B.hpp" +#include "ExcST6B.hpp" +#include "ExcST7B.hpp" +#include "ExcitationSystemDynamics.hpp" +#include "ExcitationSystemUserDefined.hpp" +#include "ExternalNetworkInjection.hpp" +#include "FaultIndicator.hpp" +#include "FossilFuel.hpp" +#include "Fuse.hpp" +#include "GenICompensationForGenJ.hpp" +#include "GeneratingUnit.hpp" +#include "GeographicalRegion.hpp" +#include "GovCT1.hpp" +#include "GovCT2.hpp" +#include "GovGAST.hpp" +#include "GovGAST1.hpp" +#include "GovGAST2.hpp" +#include "GovGAST3.hpp" +#include "GovGAST4.hpp" +#include "GovGASTWD.hpp" +#include "GovHydro1.hpp" +#include "GovHydro2.hpp" +#include "GovHydro3.hpp" +#include "GovHydro4.hpp" +#include "GovHydroDD.hpp" +#include "GovHydroFrancis.hpp" +#include "GovHydroIEEE0.hpp" +#include "GovHydroIEEE2.hpp" +#include "GovHydroPID.hpp" +#include "GovHydroPID2.hpp" +#include "GovHydroPelton.hpp" +#include "GovHydroR.hpp" +#include "GovHydroWEH.hpp" +#include "GovHydroWPID.hpp" +#include "GovSteam0.hpp" +#include "GovSteam1.hpp" +#include "GovSteam2.hpp" +#include "GovSteamBB.hpp" +#include "GovSteamCC.hpp" +#include "GovSteamEU.hpp" +#include "GovSteamFV2.hpp" +#include "GovSteamFV3.hpp" +#include "GovSteamFV4.hpp" +#include "GovSteamIEEE1.hpp" +#include "GovSteamSGO.hpp" +#include "GrossToNetActivePowerCurve.hpp" +#include "Ground.hpp" +#include "GroundDisconnector.hpp" +#include "GroundingImpedance.hpp" +#include "HVDCDynamics.hpp" +#include "HydroGeneratingUnit.hpp" +#include "HydroPowerPlant.hpp" +#include "HydroPump.hpp" +#include "IOPoint.hpp" +#include "IdentifiedObject.hpp" +#include "Jumper.hpp" +#include "Junction.hpp" +#include "Limit.hpp" +#include "LimitSet.hpp" +#include "Line.hpp" +#include "LinearShuntCompensator.hpp" +#include "LoadAggregate.hpp" +#include "LoadArea.hpp" +#include "LoadBreakSwitch.hpp" +#include "LoadComposite.hpp" +#include "LoadDynamics.hpp" +#include "LoadGenericNonLinear.hpp" +#include "LoadGroup.hpp" +#include "LoadMotor.hpp" +#include "LoadResponseCharacteristic.hpp" +#include "LoadStatic.hpp" +#include "LoadUserDefined.hpp" +#include "Location.hpp" +#include "Measurement.hpp" +#include "MeasurementValue.hpp" +#include "MeasurementValueQuality.hpp" +#include "MeasurementValueSource.hpp" +#include "MechLoad1.hpp" +#include "MechanicalLoadDynamics.hpp" +#include "MechanicalLoadUserDefined.hpp" +#include "MutualCoupling.hpp" +#include "NonConformLoad.hpp" +#include "NonConformLoadGroup.hpp" +#include "NonConformLoadSchedule.hpp" +#include "NonlinearShuntCompensator.hpp" +#include "NonlinearShuntCompensatorPoint.hpp" +#include "NuclearGeneratingUnit.hpp" +#include "OperationalLimit.hpp" +#include "OperationalLimitSet.hpp" +#include "OperationalLimitType.hpp" +#include "OverexcLim2.hpp" +#include "OverexcLimIEEE.hpp" +#include "OverexcLimX1.hpp" +#include "OverexcLimX2.hpp" +#include "OverexcitationLimiterDynamics.hpp" +#include "OverexcitationLimiterUserDefined.hpp" +#include "PFVArControllerType1Dynamics.hpp" +#include "PFVArControllerType1UserDefined.hpp" +#include "PFVArControllerType2Dynamics.hpp" +#include "PFVArControllerType2UserDefined.hpp" +#include "PFVArType1IEEEPFController.hpp" +#include "PFVArType1IEEEVArController.hpp" +#include "PFVArType2Common1.hpp" +#include "PFVArType2IEEEPFController.hpp" +#include "PFVArType2IEEEVArController.hpp" +#include "PetersenCoil.hpp" +#include "PhaseTapChanger.hpp" +#include "PhaseTapChangerAsymmetrical.hpp" +#include "PhaseTapChangerLinear.hpp" +#include "PhaseTapChangerNonLinear.hpp" +#include "PhaseTapChangerSymmetrical.hpp" +#include "PhaseTapChangerTable.hpp" +#include "PhaseTapChangerTablePoint.hpp" +#include "PhaseTapChangerTabular.hpp" +#include "PhotoVoltaicUnit.hpp" +#include "PositionPoint.hpp" +#include "PostLineSensor.hpp" +#include "PotentialTransformer.hpp" +#include "PowerElectronicsConnection.hpp" +#include "PowerElectronicsUnit.hpp" +#include "PowerElectronicsWindUnit.hpp" +#include "PowerSystemResource.hpp" +#include "PowerSystemStabilizerDynamics.hpp" +#include "PowerSystemStabilizerUserDefined.hpp" +#include "PowerTransformer.hpp" +#include "PowerTransformerEnd.hpp" +#include "ProprietaryParameterDynamics.hpp" +#include "ProtectedSwitch.hpp" +#include "Pss1.hpp" +#include "Pss1A.hpp" +#include "Pss2B.hpp" +#include "Pss2ST.hpp" +#include "Pss5.hpp" +#include "PssELIN2.hpp" +#include "PssIEEE1A.hpp" +#include "PssIEEE2B.hpp" +#include "PssIEEE3B.hpp" +#include "PssIEEE4B.hpp" +#include "PssPTIST1.hpp" +#include "PssPTIST3.hpp" +#include "PssRQB.hpp" +#include "PssSB4.hpp" +#include "PssSH.hpp" +#include "PssSK.hpp" +#include "PssSTAB2A.hpp" +#include "PssWECC.hpp" +#include "Quality61850.hpp" +#include "RaiseLowerCommand.hpp" +#include "RatioTapChanger.hpp" +#include "RatioTapChangerTable.hpp" +#include "RatioTapChangerTablePoint.hpp" +#include "ReactiveCapabilityCurve.hpp" +#include "RegularIntervalSchedule.hpp" +#include "RegularTimePoint.hpp" +#include "RegulatingCondEq.hpp" +#include "RegulatingControl.hpp" +#include "RegulationSchedule.hpp" +#include "RemoteInputSignal.hpp" +#include "ReportingGroup.hpp" +#include "RotatingMachine.hpp" +#include "RotatingMachineDynamics.hpp" +#include "SVCUserDefined.hpp" +#include "Season.hpp" +#include "SeasonDayTypeSchedule.hpp" +#include "Sensor.hpp" +#include "SeriesCompensator.hpp" +#include "ServiceLocation.hpp" +#include "SetPoint.hpp" +#include "ShuntCompensator.hpp" +#include "SolarGeneratingUnit.hpp" +#include "SolarPowerPlant.hpp" +#include "StaticVarCompensator.hpp" +#include "StaticVarCompensatorDynamics.hpp" +#include "StationSupply.hpp" +#include "Status.hpp" +#include "StreetAddress.hpp" +#include "StreetDetail.hpp" +#include "StringMeasurement.hpp" +#include "StringMeasurementValue.hpp" +#include "SubGeographicalRegion.hpp" +#include "SubLoadArea.hpp" +#include "Substation.hpp" +#include "SurgeArrester.hpp" +#include "SvInjection.hpp" +#include "SvPowerFlow.hpp" +#include "SvShuntCompensatorSections.hpp" +#include "SvStatus.hpp" +#include "SvSwitch.hpp" +#include "SvTapStep.hpp" +#include "SvVoltage.hpp" +#include "Switch.hpp" +#include "SwitchSchedule.hpp" +#include "SynchronousMachine.hpp" +#include "SynchronousMachineDetailed.hpp" +#include "SynchronousMachineDynamics.hpp" +#include "SynchronousMachineEquivalentCircuit.hpp" +#include "SynchronousMachineSimplified.hpp" +#include "SynchronousMachineTimeConstantReactance.hpp" +#include "SynchronousMachineUserDefined.hpp" +#include "TapChanger.hpp" +#include "TapChangerControl.hpp" +#include "TapChangerTablePoint.hpp" +#include "TapSchedule.hpp" +#include "Terminal.hpp" +#include "TextDiagramObject.hpp" +#include "ThermalGeneratingUnit.hpp" +#include "TieFlow.hpp" +#include "TopologicalIsland.hpp" +#include "TopologicalNode.hpp" +#include "TownDetail.hpp" +#include "TransformerEnd.hpp" +#include "TurbLCFB1.hpp" +#include "TurbineGovernorDynamics.hpp" +#include "TurbineGovernorUserDefined.hpp" +#include "TurbineLoadControllerDynamics.hpp" +#include "TurbineLoadControllerUserDefined.hpp" +#include "UnderexcLim2Simplified.hpp" +#include "UnderexcLimIEEE1.hpp" +#include "UnderexcLimIEEE2.hpp" +#include "UnderexcLimX1.hpp" +#include "UnderexcLimX2.hpp" +#include "UnderexcitationLimiterDynamics.hpp" +#include "UnderexcitationLimiterUserDefined.hpp" +#include "VAdjIEEE.hpp" +#include "VCompIEEEType1.hpp" +#include "VCompIEEEType2.hpp" +#include "VSCDynamics.hpp" +#include "VSCUserDefined.hpp" +#include "ValueAliasSet.hpp" +#include "ValueToAlias.hpp" +#include "VisibilityLayer.hpp" +#include "VoltageAdjusterDynamics.hpp" +#include "VoltageAdjusterUserDefined.hpp" +#include "VoltageCompensatorDynamics.hpp" +#include "VoltageCompensatorUserDefined.hpp" +#include "VoltageLevel.hpp" +#include "VoltageLimit.hpp" +#include "VsCapabilityCurve.hpp" +#include "VsConverter.hpp" +#include "WaveTrap.hpp" +#include "WindAeroConstIEC.hpp" +#include "WindAeroOneDimIEC.hpp" +#include "WindAeroTwoDimIEC.hpp" +#include "WindContCurrLimIEC.hpp" +#include "WindContPType3IEC.hpp" +#include "WindContPType4aIEC.hpp" +#include "WindContPType4bIEC.hpp" +#include "WindContPitchAngleIEC.hpp" +#include "WindContQIEC.hpp" +#include "WindContQLimIEC.hpp" +#include "WindContQPQULimIEC.hpp" +#include "WindContRotorRIEC.hpp" +#include "WindDynamicsLookupTable.hpp" +#include "WindGenTurbineType1aIEC.hpp" +#include "WindGenTurbineType1bIEC.hpp" +#include "WindGenTurbineType2IEC.hpp" +#include "WindGenType3IEC.hpp" +#include "WindGenType3aIEC.hpp" +#include "WindGenType3bIEC.hpp" +#include "WindGenType4IEC.hpp" +#include "WindGeneratingUnit.hpp" +#include "WindMechIEC.hpp" +#include "WindPitchContPowerIEC.hpp" +#include "WindPlantDynamics.hpp" +#include "WindPlantFreqPcontrolIEC.hpp" +#include "WindPlantIEC.hpp" +#include "WindPlantReactiveControlIEC.hpp" +#include "WindPlantUserDefined.hpp" +#include "WindPowerPlant.hpp" +#include "WindProtectionIEC.hpp" +#include "WindRefFrameRotIEC.hpp" +#include "WindTurbineType1or2Dynamics.hpp" +#include "WindTurbineType1or2IEC.hpp" +#include "WindTurbineType3IEC.hpp" +#include "WindTurbineType3or4Dynamics.hpp" +#include "WindTurbineType3or4IEC.hpp" +#include "WindTurbineType4IEC.hpp" +#include "WindTurbineType4aIEC.hpp" +#include "WindTurbineType4bIEC.hpp" +#include "WindType1or2UserDefined.hpp" +#include "WindType3or4UserDefined.hpp" +#include "WorkLocation.hpp" +#include "UnknownType.hpp" +#endif \ No newline at end of file diff --git a/CGMES_3.0.0/IOPoint.cpp b/CGMES_3.0.0/IOPoint.cpp new file mode 100644 index 000000000..0b957b337 --- /dev/null +++ b/CGMES_3.0.0/IOPoint.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "IOPoint.hpp" + +#include +#include + + +using namespace CIMPP; + +IOPoint::IOPoint() {}; +IOPoint::~IOPoint() {}; + + + +const char IOPoint::debugName[] = "IOPoint"; +const char* IOPoint::debugString() const +{ + return IOPoint::debugName; +} + +void IOPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:IOPoint"), &IOPoint_factory)); +} + +void IOPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void IOPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner IOPoint::declare() +{ + return BaseClassDefiner(IOPoint::addConstructToMap, IOPoint::addPrimitiveAssignFnsToMap, IOPoint::addClassAssignFnsToMap, IOPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* IOPoint_factory() + { + return new IOPoint; + } +} diff --git a/CGMES_3.0.0/IOPoint.hpp b/CGMES_3.0.0/IOPoint.hpp new file mode 100644 index 000000000..c467c9e53 --- /dev/null +++ b/CGMES_3.0.0/IOPoint.hpp @@ -0,0 +1,39 @@ +#ifndef IOPoint_H +#define IOPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + IOPoint(); + ~IOPoint() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* IOPoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/IdentifiedObject.cpp b/CGMES_3.0.0/IdentifiedObject.cpp new file mode 100644 index 000000000..764198002 --- /dev/null +++ b/CGMES_3.0.0/IdentifiedObject.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "IdentifiedObject.hpp" + +#include +#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() {}; + + + +bool assign_IdentifiedObject_description(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->description = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->energyIdentCodeEic = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_mRID(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->mRID = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->name = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_IdentifiedObject_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->shortName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); +bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + +const char IdentifiedObject::debugName[] = "IdentifiedObject"; +const char* IdentifiedObject::debugString() const +{ + return IdentifiedObject::debugName; +} + +void IdentifiedObject::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void IdentifiedObject::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.DiagramObjects"), &assign_IdentifiedObject_DiagramObjects)); +} + +const BaseClassDefiner IdentifiedObject::declare() +{ + return BaseClassDefiner(IdentifiedObject::addConstructToMap, IdentifiedObject::addPrimitiveAssignFnsToMap, IdentifiedObject::addClassAssignFnsToMap, IdentifiedObject::debugName); +} + +namespace CIMPP +{ + BaseClass* IdentifiedObject_factory() + { + return new IdentifiedObject; + } +} diff --git a/CGMES_3.0.0/IdentifiedObject.hpp b/CGMES_3.0.0/IdentifiedObject.hpp new file mode 100644 index 000000000..66dfef405 --- /dev/null +++ b/CGMES_3.0.0/IdentifiedObject.hpp @@ -0,0 +1,47 @@ +#ifndef IdentifiedObject_H +#define IdentifiedObject_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class DiagramObject; + + /* + This is a root class to provide common identification for all classes needing identification and naming attributes. + */ + class IdentifiedObject : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* IdentifiedObject_factory(); +} +#endif diff --git a/CGMES_3.0.0/IfdBaseKind.cpp b/CGMES_3.0.0/IfdBaseKind.cpp new file mode 100644 index 000000000..bc4a474a5 --- /dev/null +++ b/CGMES_3.0.0/IfdBaseKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "IfdBaseKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +IfdBaseKind& IfdBaseKind::operator=(IfdBaseKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +IfdBaseKind::operator IfdBaseKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char IfdBaseKind::debugName[] = "IfdBaseKind"; +const char* IfdBaseKind::debugString() const +{ + return IfdBaseKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, IfdBaseKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "IfdBaseKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "ifag") + { + rop = IfdBaseKind::ifag; + return lop; + } + if(EnumSymbol == "ifnl") + { + rop = IfdBaseKind::ifnl; + return lop; + } + if(EnumSymbol == "iffl") + { + rop = IfdBaseKind::iffl; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const IfdBaseKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == IfdBaseKind::ifag) + { + EnumSymbol = "ifag"; + } + if (obj.value == IfdBaseKind::ifnl) + { + EnumSymbol = "ifnl"; + } + if (obj.value == IfdBaseKind::iffl) + { + EnumSymbol = "iffl"; + } + + if (!EnumSymbol.empty()) + { + os << "IfdBaseKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/IfdBaseKind.hpp b/CGMES_3.0.0/IfdBaseKind.hpp new file mode 100644 index 000000000..0c3b4052c --- /dev/null +++ b/CGMES_3.0.0/IfdBaseKind.hpp @@ -0,0 +1,50 @@ +#ifndef IfdBaseKind_H +#define IfdBaseKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Excitation base system mode. + */ + class IfdBaseKind + { + public: + enum IfdBaseKind_ENUM + { + /** + * Air gap line mode. + */ + ifag, + /** + * No load system with saturation mode. + */ + ifnl, + /** + * Full load system mode. + */ + iffl, + }; + + IfdBaseKind() : value(), initialized(false) {} + IfdBaseKind(IfdBaseKind_ENUM value) : value(value), initialized(true) {} + + IfdBaseKind& operator=(IfdBaseKind_ENUM rop); + operator IfdBaseKind_ENUM() const; + + IfdBaseKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, IfdBaseKind& rop); + friend std::ostream& operator<<(std::ostream& os, const IfdBaseKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Inductance.cpp b/CGMES_3.0.0/Inductance.cpp new file mode 100644 index 000000000..8a13c71fe --- /dev/null +++ b/CGMES_3.0.0/Inductance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Inductance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Inductance& Inductance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Inductance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Inductance::debugName[] = "Inductance"; +const char* Inductance::debugString() const +{ + return Inductance::debugName; +} + +Inductance& Inductance::operator+=(const Inductance& rhs) +{ + value += rhs.value; + return *this; +} + +Inductance& Inductance::operator-=(const Inductance& rhs) +{ + value -= rhs.value; + return *this; +} + +Inductance& Inductance::operator*=(const Inductance& rhs) +{ + value *= rhs.value; + return *this; +} + +Inductance& Inductance::operator/=(const Inductance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Inductance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Inductance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Inductance.hpp b/CGMES_3.0.0/Inductance.hpp new file mode 100644 index 000000000..9d5005915 --- /dev/null +++ b/CGMES_3.0.0/Inductance.hpp @@ -0,0 +1,39 @@ +#ifndef Inductance_H +#define Inductance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Inductive part of reactance (imaginary part of impedance), at rated frequency. + */ + class Inductance + { + public: + Inductance() : value(0.0), initialized(false) {} + Inductance(long double value) : value(value), initialized(true) {} + + Inductance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Inductance& operator+=(const Inductance& rhs); + Inductance& operator-=(const Inductance& rhs); + Inductance& operator*=(const Inductance& rhs); + Inductance& operator/=(const Inductance& rhs); + + friend std::istream& operator>>(std::istream& lop, Inductance& rop); + friend std::ostream& operator<<(std::ostream& os, const Inductance& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/InputSignalKind.cpp b/CGMES_3.0.0/InputSignalKind.cpp new file mode 100644 index 000000000..2c91ecef8 --- /dev/null +++ b/CGMES_3.0.0/InputSignalKind.cpp @@ -0,0 +1,171 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "InputSignalKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +InputSignalKind& InputSignalKind::operator=(InputSignalKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +InputSignalKind::operator InputSignalKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char InputSignalKind::debugName[] = "InputSignalKind"; +const char* InputSignalKind::debugString() const +{ + return InputSignalKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, InputSignalKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "InputSignalKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "rotorSpeed") + { + rop = InputSignalKind::rotorSpeed; + return lop; + } + if(EnumSymbol == "rotorAngularFrequencyDeviation") + { + rop = InputSignalKind::rotorAngularFrequencyDeviation; + return lop; + } + if(EnumSymbol == "busFrequency") + { + rop = InputSignalKind::busFrequency; + return lop; + } + if(EnumSymbol == "busFrequencyDeviation") + { + rop = InputSignalKind::busFrequencyDeviation; + return lop; + } + if(EnumSymbol == "generatorElectricalPower") + { + rop = InputSignalKind::generatorElectricalPower; + return lop; + } + if(EnumSymbol == "generatorAcceleratingPower") + { + rop = InputSignalKind::generatorAcceleratingPower; + return lop; + } + if(EnumSymbol == "busVoltage") + { + rop = InputSignalKind::busVoltage; + return lop; + } + if(EnumSymbol == "busVoltageDerivative") + { + rop = InputSignalKind::busVoltageDerivative; + return lop; + } + if(EnumSymbol == "branchCurrent") + { + rop = InputSignalKind::branchCurrent; + return lop; + } + if(EnumSymbol == "fieldCurrent") + { + rop = InputSignalKind::fieldCurrent; + return lop; + } + if(EnumSymbol == "generatorMechanicalPower") + { + rop = InputSignalKind::generatorMechanicalPower; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const InputSignalKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == InputSignalKind::rotorSpeed) + { + EnumSymbol = "rotorSpeed"; + } + if (obj.value == InputSignalKind::rotorAngularFrequencyDeviation) + { + EnumSymbol = "rotorAngularFrequencyDeviation"; + } + if (obj.value == InputSignalKind::busFrequency) + { + EnumSymbol = "busFrequency"; + } + if (obj.value == InputSignalKind::busFrequencyDeviation) + { + EnumSymbol = "busFrequencyDeviation"; + } + if (obj.value == InputSignalKind::generatorElectricalPower) + { + EnumSymbol = "generatorElectricalPower"; + } + if (obj.value == InputSignalKind::generatorAcceleratingPower) + { + EnumSymbol = "generatorAcceleratingPower"; + } + if (obj.value == InputSignalKind::busVoltage) + { + EnumSymbol = "busVoltage"; + } + if (obj.value == InputSignalKind::busVoltageDerivative) + { + EnumSymbol = "busVoltageDerivative"; + } + if (obj.value == InputSignalKind::branchCurrent) + { + EnumSymbol = "branchCurrent"; + } + if (obj.value == InputSignalKind::fieldCurrent) + { + EnumSymbol = "fieldCurrent"; + } + if (obj.value == InputSignalKind::generatorMechanicalPower) + { + EnumSymbol = "generatorMechanicalPower"; + } + + if (!EnumSymbol.empty()) + { + os << "InputSignalKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/InputSignalKind.hpp b/CGMES_3.0.0/InputSignalKind.hpp new file mode 100644 index 000000000..f1dbacfc2 --- /dev/null +++ b/CGMES_3.0.0/InputSignalKind.hpp @@ -0,0 +1,82 @@ +#ifndef InputSignalKind_H +#define InputSignalKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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). + */ + rotorSpeed, + /** + * 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> + */ + 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> + */ + busFrequencyDeviation, + /** + * Input signal is generator electrical power on rated <i>S</i>. + */ + generatorElectricalPower, + /** + * 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> + */ + busVoltage, + /** + * 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. + */ + branchCurrent, + /** + * Input signal is generator field current. + */ + fieldCurrent, + /** + * Input signal is generator mechanical power. + */ + generatorMechanicalPower, + }; + + InputSignalKind() : value(), initialized(false) {} + InputSignalKind(InputSignalKind_ENUM value) : value(value), initialized(true) {} + + InputSignalKind& operator=(InputSignalKind_ENUM rop); + operator InputSignalKind_ENUM() const; + + InputSignalKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, InputSignalKind& rop); + friend std::ostream& operator<<(std::ostream& os, const InputSignalKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Jumper.cpp b/CGMES_3.0.0/Jumper.cpp new file mode 100644 index 000000000..c0d1d1a69 --- /dev/null +++ b/CGMES_3.0.0/Jumper.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Jumper.hpp" + +#include +#include + + +using namespace CIMPP; + +Jumper::Jumper() {}; +Jumper::~Jumper() {}; + + + +const char Jumper::debugName[] = "Jumper"; +const char* Jumper::debugString() const +{ + return Jumper::debugName; +} + +void Jumper::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Jumper"), &Jumper_factory)); +} + +void Jumper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Jumper::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Jumper::declare() +{ + return BaseClassDefiner(Jumper::addConstructToMap, Jumper::addPrimitiveAssignFnsToMap, Jumper::addClassAssignFnsToMap, Jumper::debugName); +} + +namespace CIMPP +{ + BaseClass* Jumper_factory() + { + return new Jumper; + } +} diff --git a/CGMES_3.0.0/Jumper.hpp b/CGMES_3.0.0/Jumper.hpp new file mode 100644 index 000000000..9ee62cea0 --- /dev/null +++ b/CGMES_3.0.0/Jumper.hpp @@ -0,0 +1,39 @@ +#ifndef Jumper_H +#define Jumper_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Jumper : public Switch + { + public: + /* constructor initialising all attributes to null */ + Jumper(); + ~Jumper() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Jumper_factory(); +} +#endif diff --git a/CGMES_3.0.0/Junction.cpp b/CGMES_3.0.0/Junction.cpp new file mode 100644 index 000000000..0ffba7325 --- /dev/null +++ b/CGMES_3.0.0/Junction.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Junction.hpp" + +#include +#include + + +using namespace CIMPP; + +Junction::Junction() {}; +Junction::~Junction() {}; + + + +const char Junction::debugName[] = "Junction"; +const char* Junction::debugString() const +{ + return Junction::debugName; +} + +void Junction::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Junction"), &Junction_factory)); +} + +void Junction::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Junction::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Junction::declare() +{ + return BaseClassDefiner(Junction::addConstructToMap, Junction::addPrimitiveAssignFnsToMap, Junction::addClassAssignFnsToMap, Junction::debugName); +} + +namespace CIMPP +{ + BaseClass* Junction_factory() + { + return new Junction; + } +} diff --git a/CGMES_3.0.0/Junction.hpp b/CGMES_3.0.0/Junction.hpp new file mode 100644 index 000000000..bf1c7f41e --- /dev/null +++ b/CGMES_3.0.0/Junction.hpp @@ -0,0 +1,39 @@ +#ifndef Junction_H +#define Junction_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Connector.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A point where one or more conducting equipments are connected with zero resistance. + */ + class Junction : public Connector + { + public: + /* constructor initialising all attributes to null */ + Junction(); + ~Junction() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Junction_factory(); +} +#endif diff --git a/CGMES_3.0.0/Length.cpp b/CGMES_3.0.0/Length.cpp new file mode 100644 index 000000000..2c089f847 --- /dev/null +++ b/CGMES_3.0.0/Length.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Length.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Length& Length::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Length::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Length::debugName[] = "Length"; +const char* Length::debugString() const +{ + return Length::debugName; +} + +Length& Length::operator+=(const Length& rhs) +{ + value += rhs.value; + return *this; +} + +Length& Length::operator-=(const Length& rhs) +{ + value -= rhs.value; + return *this; +} + +Length& Length::operator*=(const Length& rhs) +{ + value *= rhs.value; + return *this; +} + +Length& Length::operator/=(const Length& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Length& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Length& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Length.hpp b/CGMES_3.0.0/Length.hpp new file mode 100644 index 000000000..6d56bd794 --- /dev/null +++ b/CGMES_3.0.0/Length.hpp @@ -0,0 +1,39 @@ +#ifndef Length_H +#define Length_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Unit of length. It shall be a positive value or zero. + */ + class Length + { + public: + Length() : value(0.0), initialized(false) {} + Length(long double value) : value(value), initialized(true) {} + + Length& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Length& operator+=(const Length& rhs); + Length& operator-=(const Length& rhs); + Length& operator*=(const Length& rhs); + Length& operator/=(const Length& rhs); + + friend std::istream& operator>>(std::istream& lop, Length& rop); + friend std::ostream& operator<<(std::ostream& os, const Length& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Limit.cpp b/CGMES_3.0.0/Limit.cpp new file mode 100644 index 000000000..487b4c6c8 --- /dev/null +++ b/CGMES_3.0.0/Limit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Limit.hpp" + +#include +#include + + +using namespace CIMPP; + +Limit::Limit() {}; +Limit::~Limit() {}; + + + +const char Limit::debugName[] = "Limit"; +const char* Limit::debugString() const +{ + return Limit::debugName; +} + +void Limit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Limit"), &Limit_factory)); +} + +void Limit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Limit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Limit::declare() +{ + return BaseClassDefiner(Limit::addConstructToMap, Limit::addPrimitiveAssignFnsToMap, Limit::addClassAssignFnsToMap, Limit::debugName); +} + +namespace CIMPP +{ + BaseClass* Limit_factory() + { + return new Limit; + } +} diff --git a/CGMES_3.0.0/Limit.hpp b/CGMES_3.0.0/Limit.hpp new file mode 100644 index 000000000..47dda3684 --- /dev/null +++ b/CGMES_3.0.0/Limit.hpp @@ -0,0 +1,39 @@ +#ifndef Limit_H +#define Limit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Limit : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + Limit(); + ~Limit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Limit_factory(); +} +#endif diff --git a/CGMES_3.0.0/LimitKind.cpp b/CGMES_3.0.0/LimitKind.cpp new file mode 100644 index 000000000..664a55374 --- /dev/null +++ b/CGMES_3.0.0/LimitKind.cpp @@ -0,0 +1,171 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LimitKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +LimitKind& LimitKind::operator=(LimitKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +LimitKind::operator LimitKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char LimitKind::debugName[] = "LimitKind"; +const char* LimitKind::debugString() const +{ + return LimitKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, LimitKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "LimitKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "patl") + { + rop = LimitKind::patl; + return lop; + } + if(EnumSymbol == "patlt") + { + rop = LimitKind::patlt; + return lop; + } + if(EnumSymbol == "tatl") + { + rop = LimitKind::tatl; + return lop; + } + if(EnumSymbol == "tc") + { + rop = LimitKind::tc; + return lop; + } + if(EnumSymbol == "tct") + { + rop = LimitKind::tct; + return lop; + } + if(EnumSymbol == "highVoltage") + { + rop = LimitKind::highVoltage; + return lop; + } + if(EnumSymbol == "lowVoltage") + { + rop = LimitKind::lowVoltage; + return lop; + } + if(EnumSymbol == "operationalVoltageLimit") + { + rop = LimitKind::operationalVoltageLimit; + return lop; + } + if(EnumSymbol == "alarmVoltage") + { + rop = LimitKind::alarmVoltage; + return lop; + } + if(EnumSymbol == "warningVoltage") + { + rop = LimitKind::warningVoltage; + return lop; + } + if(EnumSymbol == "stability") + { + rop = LimitKind::stability; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const LimitKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == LimitKind::patl) + { + EnumSymbol = "patl"; + } + if (obj.value == LimitKind::patlt) + { + EnumSymbol = "patlt"; + } + if (obj.value == LimitKind::tatl) + { + EnumSymbol = "tatl"; + } + if (obj.value == LimitKind::tc) + { + EnumSymbol = "tc"; + } + if (obj.value == LimitKind::tct) + { + EnumSymbol = "tct"; + } + if (obj.value == LimitKind::highVoltage) + { + EnumSymbol = "highVoltage"; + } + if (obj.value == LimitKind::lowVoltage) + { + EnumSymbol = "lowVoltage"; + } + if (obj.value == LimitKind::operationalVoltageLimit) + { + EnumSymbol = "operationalVoltageLimit"; + } + if (obj.value == LimitKind::alarmVoltage) + { + EnumSymbol = "alarmVoltage"; + } + if (obj.value == LimitKind::warningVoltage) + { + EnumSymbol = "warningVoltage"; + } + if (obj.value == LimitKind::stability) + { + EnumSymbol = "stability"; + } + + if (!EnumSymbol.empty()) + { + os << "LimitKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/LimitKind.hpp b/CGMES_3.0.0/LimitKind.hpp new file mode 100644 index 000000000..9f88bab7e --- /dev/null +++ b/CGMES_3.0.0/LimitKind.hpp @@ -0,0 +1,82 @@ +#ifndef LimitKind_H +#define LimitKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + lowVoltage, + /** + * Operational voltage limit. + */ + operationalVoltageLimit, + /** + * Voltage alarm. + */ + alarmVoltage, + /** + * Voltage warning. + */ + warningVoltage, + /** + * Stability. + */ + stability, + }; + + LimitKind() : value(), initialized(false) {} + LimitKind(LimitKind_ENUM value) : value(value), initialized(true) {} + + LimitKind& operator=(LimitKind_ENUM rop); + operator LimitKind_ENUM() const; + + LimitKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, LimitKind& rop); + friend std::ostream& operator<<(std::ostream& os, const LimitKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/LimitSet.cpp b/CGMES_3.0.0/LimitSet.cpp new file mode 100644 index 000000000..0622bd81f --- /dev/null +++ b/CGMES_3.0.0/LimitSet.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LimitSet.hpp" + +#include +#include + +#include "Boolean.hpp" + +using namespace CIMPP; + +LimitSet::LimitSet() {}; +LimitSet::~LimitSet() {}; + + +bool assign_LimitSet_isPercentageLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LimitSet* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isPercentageLimits; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char LimitSet::debugName[] = "LimitSet"; +const char* LimitSet::debugString() const +{ + return LimitSet::debugName; +} + +void LimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LimitSet::declare() +{ + return BaseClassDefiner(LimitSet::addConstructToMap, LimitSet::addPrimitiveAssignFnsToMap, LimitSet::addClassAssignFnsToMap, LimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* LimitSet_factory() + { + return new LimitSet; + } +} diff --git a/CGMES_3.0.0/LimitSet.hpp b/CGMES_3.0.0/LimitSet.hpp new file mode 100644 index 000000000..553b70ef6 --- /dev/null +++ b/CGMES_3.0.0/LimitSet.hpp @@ -0,0 +1,41 @@ +#ifndef LimitSet_H +#define LimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +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. + */ + class LimitSet : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LimitSet_factory(); +} +#endif diff --git a/CGMES_3.0.0/Line.cpp b/CGMES_3.0.0/Line.cpp new file mode 100644 index 000000000..d115a5496 --- /dev/null +++ b/CGMES_3.0.0/Line.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Line.hpp" + +#include +#include + +#include "SubGeographicalRegion.hpp" + +using namespace CIMPP; + +Line::Line() : Region(nullptr) {}; +Line::~Line() {}; + + + + +bool assign_SubGeographicalRegion_Lines(BaseClass*, BaseClass*); +bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Line* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_SubGeographicalRegion_Lines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Line::debugName[] = "Line"; +const char* Line::debugString() const +{ + return Line::debugName; +} + +void Line::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Line"), &Line_factory)); +} + +void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Line::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Line.Region"), &assign_Line_Region)); +} + +const BaseClassDefiner Line::declare() +{ + return BaseClassDefiner(Line::addConstructToMap, Line::addPrimitiveAssignFnsToMap, Line::addClassAssignFnsToMap, Line::debugName); +} + +namespace CIMPP +{ + BaseClass* Line_factory() + { + return new Line; + } +} diff --git a/CGMES_3.0.0/Line.hpp b/CGMES_3.0.0/Line.hpp new file mode 100644 index 000000000..d25cf35aa --- /dev/null +++ b/CGMES_3.0.0/Line.hpp @@ -0,0 +1,41 @@ +#ifndef Line_H +#define Line_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SubGeographicalRegion; + + /* + Contains equipment beyond a substation belonging to a power transmission line. + */ + class Line : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + Line(); + ~Line() override; + + CIMPP::SubGeographicalRegion* Region; /* The sub-geographical region of the line. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Line_factory(); +} +#endif diff --git a/CGMES_3.0.0/LinearShuntCompensator.cpp b/CGMES_3.0.0/LinearShuntCompensator.cpp new file mode 100644 index 000000000..06b73e6ad --- /dev/null +++ b/CGMES_3.0.0/LinearShuntCompensator.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LinearShuntCompensator.hpp" + +#include +#include + +#include "Susceptance.hpp" +#include "Susceptance.hpp" +#include "Conductance.hpp" +#include "Conductance.hpp" + +using namespace CIMPP; + +LinearShuntCompensator::LinearShuntCompensator() {}; +LinearShuntCompensator::~LinearShuntCompensator() {}; + + +bool assign_LinearShuntCompensator_b0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0PerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LinearShuntCompensator_bPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bPerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LinearShuntCompensator_g0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0PerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LinearShuntCompensator_gPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->gPerSection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char LinearShuntCompensator::debugName[] = "LinearShuntCompensator"; +const char* LinearShuntCompensator::debugString() const +{ + return LinearShuntCompensator::debugName; +} + +void LinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LinearShuntCompensator::declare() +{ + return BaseClassDefiner(LinearShuntCompensator::addConstructToMap, LinearShuntCompensator::addPrimitiveAssignFnsToMap, LinearShuntCompensator::addClassAssignFnsToMap, LinearShuntCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* LinearShuntCompensator_factory() + { + return new LinearShuntCompensator; + } +} diff --git a/CGMES_3.0.0/LinearShuntCompensator.hpp b/CGMES_3.0.0/LinearShuntCompensator.hpp new file mode 100644 index 000000000..c56622d29 --- /dev/null +++ b/CGMES_3.0.0/LinearShuntCompensator.hpp @@ -0,0 +1,45 @@ +#ifndef LinearShuntCompensator_H +#define LinearShuntCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ShuntCompensator.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + + /* + A linear shunt compensator has banks or sections with equal admittance values. + */ + class LinearShuntCompensator : public ShuntCompensator + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LinearShuntCompensator_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadAggregate.cpp b/CGMES_3.0.0/LoadAggregate.cpp new file mode 100644 index 000000000..d6a367b9d --- /dev/null +++ b/CGMES_3.0.0/LoadAggregate.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadAggregate.hpp" + +#include +#include + +#include "LoadMotor.hpp" +#include "LoadStatic.hpp" + +using namespace CIMPP; + +LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {}; +LoadAggregate::~LoadAggregate() {}; + + + + + +bool assign_LoadMotor_LoadAggregate(BaseClass*, BaseClass*); +bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadAggregate* element = dynamic_cast(BaseClass_ptr1); + LoadMotor* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadMotor != element2) + { + element->LoadMotor = element2; + return assign_LoadMotor_LoadAggregate(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_LoadStatic_LoadAggregate(BaseClass*, BaseClass*); +bool assign_LoadAggregate_LoadStatic(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadAggregate* element = dynamic_cast(BaseClass_ptr1); + LoadStatic* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadStatic != element2) + { + element->LoadStatic = element2; + return assign_LoadStatic_LoadAggregate(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadAggregate::debugName[] = "LoadAggregate"; +const char* LoadAggregate::debugString() const +{ + return LoadAggregate::debugName; +} + +void LoadAggregate::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadAggregate"), &LoadAggregate_factory)); +} + +void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadAggregate::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner LoadAggregate::declare() +{ + return BaseClassDefiner(LoadAggregate::addConstructToMap, LoadAggregate::addPrimitiveAssignFnsToMap, LoadAggregate::addClassAssignFnsToMap, LoadAggregate::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadAggregate_factory() + { + return new LoadAggregate; + } +} diff --git a/CGMES_3.0.0/LoadAggregate.hpp b/CGMES_3.0.0/LoadAggregate.hpp new file mode 100644 index 000000000..ca5b4fe2c --- /dev/null +++ b/CGMES_3.0.0/LoadAggregate.hpp @@ -0,0 +1,43 @@ +#ifndef LoadAggregate_H +#define LoadAggregate_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadAggregate : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadAggregate_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadArea.cpp b/CGMES_3.0.0/LoadArea.cpp new file mode 100644 index 000000000..ed24626bc --- /dev/null +++ b/CGMES_3.0.0/LoadArea.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadArea.hpp" + +#include +#include + +#include "SubLoadArea.hpp" + +using namespace CIMPP; + +LoadArea::LoadArea() {}; +LoadArea::~LoadArea() {}; + + + + +bool assign_SubLoadArea_LoadArea(BaseClass*, BaseClass*); +bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadArea* element = dynamic_cast(BaseClass_ptr1); + SubLoadArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->SubLoadAreas.begin(), element->SubLoadAreas.end(), element2) == element->SubLoadAreas.end()) + { + element->SubLoadAreas.push_back(element2); + return assign_SubLoadArea_LoadArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadArea::debugName[] = "LoadArea"; +const char* LoadArea::debugString() const +{ + return LoadArea::debugName; +} + +void LoadArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadArea"), &LoadArea_factory)); +} + +void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadArea::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadArea.SubLoadAreas"), &assign_LoadArea_SubLoadAreas)); +} + +const BaseClassDefiner LoadArea::declare() +{ + return BaseClassDefiner(LoadArea::addConstructToMap, LoadArea::addPrimitiveAssignFnsToMap, LoadArea::addClassAssignFnsToMap, LoadArea::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadArea_factory() + { + return new LoadArea; + } +} diff --git a/CGMES_3.0.0/LoadArea.hpp b/CGMES_3.0.0/LoadArea.hpp new file mode 100644 index 000000000..c4bd5f831 --- /dev/null +++ b/CGMES_3.0.0/LoadArea.hpp @@ -0,0 +1,41 @@ +#ifndef LoadArea_H +#define LoadArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyArea.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadArea : public EnergyArea + { + public: + /* constructor initialising all attributes to null */ + LoadArea(); + ~LoadArea() override; + + std::list SubLoadAreas; /* The SubLoadAreas in the LoadArea. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadArea_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadBreakSwitch.cpp b/CGMES_3.0.0/LoadBreakSwitch.cpp new file mode 100644 index 000000000..bc2238810 --- /dev/null +++ b/CGMES_3.0.0/LoadBreakSwitch.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadBreakSwitch.hpp" + +#include +#include + + +using namespace CIMPP; + +LoadBreakSwitch::LoadBreakSwitch() {}; +LoadBreakSwitch::~LoadBreakSwitch() {}; + + + +const char LoadBreakSwitch::debugName[] = "LoadBreakSwitch"; +const char* LoadBreakSwitch::debugString() const +{ + return LoadBreakSwitch::debugName; +} + +void LoadBreakSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadBreakSwitch"), &LoadBreakSwitch_factory)); +} + +void LoadBreakSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadBreakSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LoadBreakSwitch::declare() +{ + return BaseClassDefiner(LoadBreakSwitch::addConstructToMap, LoadBreakSwitch::addPrimitiveAssignFnsToMap, LoadBreakSwitch::addClassAssignFnsToMap, LoadBreakSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadBreakSwitch_factory() + { + return new LoadBreakSwitch; + } +} diff --git a/CGMES_3.0.0/LoadBreakSwitch.hpp b/CGMES_3.0.0/LoadBreakSwitch.hpp new file mode 100644 index 000000000..843b54d07 --- /dev/null +++ b/CGMES_3.0.0/LoadBreakSwitch.hpp @@ -0,0 +1,39 @@ +#ifndef LoadBreakSwitch_H +#define LoadBreakSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ProtectedSwitch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. + */ + class LoadBreakSwitch : public ProtectedSwitch + { + public: + /* constructor initialising all attributes to null */ + LoadBreakSwitch(); + ~LoadBreakSwitch() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadBreakSwitch_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadComposite.cpp b/CGMES_3.0.0/LoadComposite.cpp new file mode 100644 index 000000000..5d907ef04 --- /dev/null +++ b/CGMES_3.0.0/LoadComposite.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadComposite.hpp" + +#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() {}; + + +bool assign_LoadComposite_epfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_epfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epfs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_epvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_epvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->epvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqfs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqvd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_eqvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eqvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lfac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadComposite_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfrac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char LoadComposite::debugName[] = "LoadComposite"; +const char* LoadComposite::debugString() const +{ + return LoadComposite::debugName; +} + +void LoadComposite::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadComposite::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LoadComposite::declare() +{ + return BaseClassDefiner(LoadComposite::addConstructToMap, LoadComposite::addPrimitiveAssignFnsToMap, LoadComposite::addClassAssignFnsToMap, LoadComposite::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadComposite_factory() + { + return new LoadComposite; + } +} diff --git a/CGMES_3.0.0/LoadComposite.hpp b/CGMES_3.0.0/LoadComposite.hpp new file mode 100644 index 000000000..95879fb01 --- /dev/null +++ b/CGMES_3.0.0/LoadComposite.hpp @@ -0,0 +1,52 @@ +#ifndef LoadComposite_H +#define LoadComposite_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadComposite_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadDynamics.cpp b/CGMES_3.0.0/LoadDynamics.cpp new file mode 100644 index 000000000..2dc9c9f3e --- /dev/null +++ b/CGMES_3.0.0/LoadDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadDynamics.hpp" + +#include +#include + +#include "EnergyConsumer.hpp" + +using namespace CIMPP; + +LoadDynamics::LoadDynamics() {}; +LoadDynamics::~LoadDynamics() {}; + + + + +bool assign_EnergyConsumer_LoadDynamics(BaseClass*, BaseClass*); +bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadDynamics* 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_LoadDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadDynamics::debugName[] = "LoadDynamics"; +const char* LoadDynamics::debugString() const +{ + return LoadDynamics::debugName; +} + +void LoadDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadDynamics"), &LoadDynamics_factory)); +} + +void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadDynamics.EnergyConsumer"), &assign_LoadDynamics_EnergyConsumer)); +} + +const BaseClassDefiner LoadDynamics::declare() +{ + return BaseClassDefiner(LoadDynamics::addConstructToMap, LoadDynamics::addPrimitiveAssignFnsToMap, LoadDynamics::addClassAssignFnsToMap, LoadDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadDynamics_factory() + { + return new LoadDynamics; + } +} diff --git a/CGMES_3.0.0/LoadDynamics.hpp b/CGMES_3.0.0/LoadDynamics.hpp new file mode 100644 index 000000000..1b77ccf60 --- /dev/null +++ b/CGMES_3.0.0/LoadDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef LoadDynamics_H +#define LoadDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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). + */ + class LoadDynamics : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + LoadDynamics(); + ~LoadDynamics() override; + + std::list EnergyConsumer; /* Energy consumer to which this dynamics load model applies. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadGenericNonLinear.cpp b/CGMES_3.0.0/LoadGenericNonLinear.cpp new file mode 100644 index 000000000..8d1d5a066 --- /dev/null +++ b/CGMES_3.0.0/LoadGenericNonLinear.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadGenericNonLinear.hpp" + +#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() {}; + + +bool assign_LoadGenericNonLinear_bs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_bt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->genericNonLinearLoadModelType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ls; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_lt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadGenericNonLinear_tq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char LoadGenericNonLinear::debugName[] = "LoadGenericNonLinear"; +const char* LoadGenericNonLinear::debugString() const +{ + return LoadGenericNonLinear::debugName; +} + +void LoadGenericNonLinear::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadGenericNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner LoadGenericNonLinear::declare() +{ + return BaseClassDefiner(LoadGenericNonLinear::addConstructToMap, LoadGenericNonLinear::addPrimitiveAssignFnsToMap, LoadGenericNonLinear::addClassAssignFnsToMap, LoadGenericNonLinear::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadGenericNonLinear_factory() + { + return new LoadGenericNonLinear; + } +} diff --git a/CGMES_3.0.0/LoadGenericNonLinear.hpp b/CGMES_3.0.0/LoadGenericNonLinear.hpp new file mode 100644 index 000000000..ca9c53e2e --- /dev/null +++ b/CGMES_3.0.0/LoadGenericNonLinear.hpp @@ -0,0 +1,49 @@ +#ifndef LoadGenericNonLinear_H +#define LoadGenericNonLinear_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "GenericNonLinearLoadModelKind.hpp" +#include "Seconds.hpp" + +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. + */ + class LoadGenericNonLinear : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadGenericNonLinear_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadGroup.cpp b/CGMES_3.0.0/LoadGroup.cpp new file mode 100644 index 000000000..4dce2a407 --- /dev/null +++ b/CGMES_3.0.0/LoadGroup.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadGroup.hpp" + +#include +#include + +#include "SubLoadArea.hpp" + +using namespace CIMPP; + +LoadGroup::LoadGroup() : SubLoadArea(nullptr) {}; +LoadGroup::~LoadGroup() {}; + + + + +bool assign_SubLoadArea_LoadGroups(BaseClass*, BaseClass*); +bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadGroup* element = dynamic_cast(BaseClass_ptr1); + SubLoadArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SubLoadArea != element2) + { + element->SubLoadArea = element2; + return assign_SubLoadArea_LoadGroups(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char LoadGroup::debugName[] = "LoadGroup"; +const char* LoadGroup::debugString() const +{ + return LoadGroup::debugName; +} + +void LoadGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:LoadGroup"), &LoadGroup_factory)); +} + +void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void LoadGroup::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadGroup.SubLoadArea"), &assign_LoadGroup_SubLoadArea)); +} + +const BaseClassDefiner LoadGroup::declare() +{ + return BaseClassDefiner(LoadGroup::addConstructToMap, LoadGroup::addPrimitiveAssignFnsToMap, LoadGroup::addClassAssignFnsToMap, LoadGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadGroup_factory() + { + return new LoadGroup; + } +} diff --git a/CGMES_3.0.0/LoadGroup.hpp b/CGMES_3.0.0/LoadGroup.hpp new file mode 100644 index 000000000..768f27c0c --- /dev/null +++ b/CGMES_3.0.0/LoadGroup.hpp @@ -0,0 +1,41 @@ +#ifndef LoadGroup_H +#define LoadGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class LoadGroup : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + LoadGroup(); + ~LoadGroup() override; + + CIMPP::SubLoadArea* SubLoadArea; /* The SubLoadArea where the Loadgroup belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadGroup_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadMotor.cpp b/CGMES_3.0.0/LoadMotor.cpp new file mode 100644 index 000000000..3c4e44b3e --- /dev/null +++ b/CGMES_3.0.0/LoadMotor.cpp @@ -0,0 +1,275 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadMotor.hpp" + +#include +#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() {}; + + + +bool assign_LoadMotor_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->h; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lfac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_lpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ls; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfrac; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_ra(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ra; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tbkr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tbkr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadMotor_vt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + +const char LoadMotor::debugName[] = "LoadMotor"; +const char* LoadMotor::debugString() const +{ + return LoadMotor::debugName; +} + +void LoadMotor::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadMotor::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadMotor.LoadAggregate"), &assign_LoadMotor_LoadAggregate)); +} + +const BaseClassDefiner LoadMotor::declare() +{ + return BaseClassDefiner(LoadMotor::addConstructToMap, LoadMotor::addPrimitiveAssignFnsToMap, LoadMotor::addClassAssignFnsToMap, LoadMotor::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadMotor_factory() + { + return new LoadMotor; + } +} diff --git a/CGMES_3.0.0/LoadMotor.hpp b/CGMES_3.0.0/LoadMotor.hpp new file mode 100644 index 000000000..74b179e18 --- /dev/null +++ b/CGMES_3.0.0/LoadMotor.hpp @@ -0,0 +1,57 @@ +#ifndef LoadMotor_H +#define LoadMotor_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class LoadMotor : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadMotor_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadResponseCharacteristic.cpp b/CGMES_3.0.0/LoadResponseCharacteristic.cpp new file mode 100644 index 000000000..31c2d4fe2 --- /dev/null +++ b/CGMES_3.0.0/LoadResponseCharacteristic.cpp @@ -0,0 +1,243 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadResponseCharacteristic.hpp" + +#include +#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() {}; + + + +bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exponentModel; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pConstantCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pConstantImpedance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pConstantPower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pFrequencyExponent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pVoltageExponent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qConstantCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qConstantImpedance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qConstantPower; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + +const char LoadResponseCharacteristic::debugName[] = "LoadResponseCharacteristic"; +const char* LoadResponseCharacteristic::debugString() const +{ + return LoadResponseCharacteristic::debugName; +} + +void LoadResponseCharacteristic::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadResponseCharacteristic::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.EnergyConsumer"), &assign_LoadResponseCharacteristic_EnergyConsumer)); +} + +const BaseClassDefiner LoadResponseCharacteristic::declare() +{ + return BaseClassDefiner(LoadResponseCharacteristic::addConstructToMap, LoadResponseCharacteristic::addPrimitiveAssignFnsToMap, LoadResponseCharacteristic::addClassAssignFnsToMap, LoadResponseCharacteristic::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadResponseCharacteristic_factory() + { + return new LoadResponseCharacteristic; + } +} diff --git a/CGMES_3.0.0/LoadResponseCharacteristic.hpp b/CGMES_3.0.0/LoadResponseCharacteristic.hpp new file mode 100644 index 000000000..0362098fe --- /dev/null +++ b/CGMES_3.0.0/LoadResponseCharacteristic.hpp @@ -0,0 +1,54 @@ +#ifndef LoadResponseCharacteristic_H +#define LoadResponseCharacteristic_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" + +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. + */ + class LoadResponseCharacteristic : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadResponseCharacteristic_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadStatic.cpp b/CGMES_3.0.0/LoadStatic.cpp new file mode 100644 index 000000000..effe0fc0a --- /dev/null +++ b/CGMES_3.0.0/LoadStatic.cpp @@ -0,0 +1,339 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadStatic.hpp" + +#include +#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() {}; + + + +bool assign_LoadStatic_ep1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ep1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_ep2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ep2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_ep3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ep3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_eq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eq1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_eq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eq2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_eq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->eq3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kq4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kq4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_kqf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_LoadStatic_staticLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->staticLoadModelType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + + + + + +const char LoadStatic::debugName[] = "LoadStatic"; +const char* LoadStatic::debugString() const +{ + return LoadStatic::debugName; +} + +void LoadStatic::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadStatic::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadStatic.LoadAggregate"), &assign_LoadStatic_LoadAggregate)); +} + +const BaseClassDefiner LoadStatic::declare() +{ + return BaseClassDefiner(LoadStatic::addConstructToMap, LoadStatic::addPrimitiveAssignFnsToMap, LoadStatic::addClassAssignFnsToMap, LoadStatic::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadStatic_factory() + { + return new LoadStatic; + } +} diff --git a/CGMES_3.0.0/LoadStatic.hpp b/CGMES_3.0.0/LoadStatic.hpp new file mode 100644 index 000000000..319d73377 --- /dev/null +++ b/CGMES_3.0.0/LoadStatic.hpp @@ -0,0 +1,60 @@ +#ifndef LoadStatic_H +#define LoadStatic_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "StaticLoadModelKind.hpp" + +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. + */ + class LoadStatic : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadStatic_factory(); +} +#endif diff --git a/CGMES_3.0.0/LoadUserDefined.cpp b/CGMES_3.0.0/LoadUserDefined.cpp new file mode 100644 index 000000000..e183a2407 --- /dev/null +++ b/CGMES_3.0.0/LoadUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "LoadUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +LoadUserDefined::LoadUserDefined() {}; +LoadUserDefined::~LoadUserDefined() {}; + + + +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) +{ + LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char LoadUserDefined::debugName[] = "LoadUserDefined"; +const char* LoadUserDefined::debugString() const +{ + return LoadUserDefined::debugName; +} + +void LoadUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void LoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.ProprietaryParameterDynamics"), &assign_LoadUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner LoadUserDefined::declare() +{ + return BaseClassDefiner(LoadUserDefined::addConstructToMap, LoadUserDefined::addPrimitiveAssignFnsToMap, LoadUserDefined::addClassAssignFnsToMap, LoadUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* LoadUserDefined_factory() + { + return new LoadUserDefined; + } +} diff --git a/CGMES_3.0.0/LoadUserDefined.hpp b/CGMES_3.0.0/LoadUserDefined.hpp new file mode 100644 index 000000000..ac9a764b4 --- /dev/null +++ b/CGMES_3.0.0/LoadUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef LoadUserDefined_H +#define LoadUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Load whose dynamic behaviour is described by a user-defined model. + */ + class LoadUserDefined : public LoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* LoadUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/Location.cpp b/CGMES_3.0.0/Location.cpp new file mode 100644 index 000000000..a4582bd84 --- /dev/null +++ b/CGMES_3.0.0/Location.cpp @@ -0,0 +1,123 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Location.hpp" + +#include +#include + +#include "CoordinateSystem.hpp" +#include "PositionPoint.hpp" +#include "PowerSystemResource.hpp" +#include "StreetAddress.hpp" + +using namespace CIMPP; + +Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr), mainAddress(nullptr) {}; +Location::~Location() {}; + + + + + + + +bool assign_CoordinateSystem_Locations(BaseClass*, BaseClass*); +bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Location* element = dynamic_cast(BaseClass_ptr1); + CoordinateSystem* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CoordinateSystem != element2) + { + element->CoordinateSystem = element2; + return assign_CoordinateSystem_Locations(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PositionPoint_Location(BaseClass*, BaseClass*); +bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Location* element = dynamic_cast(BaseClass_ptr1); + PositionPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->PositionPoints.begin(), element->PositionPoints.end(), element2) == element->PositionPoints.end()) + { + element->PositionPoints.push_back(element2); + return assign_PositionPoint_Location(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemResource_Location(BaseClass*, BaseClass*); +bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Location* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemResources != element2) + { + element->PowerSystemResources = element2; + return assign_PowerSystemResource_Location(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Location_mainAddress(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + if(Location* element = dynamic_cast(BaseClass_ptr1)) + { + element->mainAddress = dynamic_cast(BaseClass_ptr2); + if (element->mainAddress != nullptr) + { + return true; + } + } + return false; +} + +const char Location::debugName[] = "Location"; +const char* Location::debugString() const +{ + return Location::debugName; +} + +void Location::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Location"), &Location_factory)); +} + +void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Location::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Location::declare() +{ + return BaseClassDefiner(Location::addConstructToMap, Location::addPrimitiveAssignFnsToMap, Location::addClassAssignFnsToMap, Location::debugName); +} + +namespace CIMPP +{ + BaseClass* Location_factory() + { + return new Location; + } +} diff --git a/CGMES_3.0.0/Location.hpp b/CGMES_3.0.0/Location.hpp new file mode 100644 index 000000000..dada4d279 --- /dev/null +++ b/CGMES_3.0.0/Location.hpp @@ -0,0 +1,47 @@ +#ifndef Location_H +#define Location_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class CoordinateSystem; + class PositionPoint; + 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. + */ + class Location : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Location_factory(); +} +#endif diff --git a/CGMES_3.0.0/Measurement.cpp b/CGMES_3.0.0/Measurement.cpp new file mode 100644 index 000000000..fb5a3137e --- /dev/null +++ b/CGMES_3.0.0/Measurement.cpp @@ -0,0 +1,151 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Measurement.hpp" + +#include +#include + +#include "PowerSystemResource.hpp" +#include "ACDCTerminal.hpp" +#include "String.hpp" +#include "PhaseCode.hpp" +#include "UnitMultiplier.hpp" +#include "UnitSymbol.hpp" + +using namespace CIMPP; + +Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {}; +Measurement::~Measurement() {}; + + + + +bool assign_Measurement_measurementType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + { + element->measurementType = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Measurement_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->phases; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Measurement_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->unitMultiplier; + if (buffer.fail()) + return false; + else + 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) +{ + Measurement* 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_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Measurement* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char Measurement::debugName[] = "Measurement"; +const char* Measurement::debugString() const +{ + return Measurement::debugName; +} + +void Measurement::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Measurement::declare() +{ + return BaseClassDefiner(Measurement::addConstructToMap, Measurement::addPrimitiveAssignFnsToMap, Measurement::addClassAssignFnsToMap, Measurement::debugName); +} + +namespace CIMPP +{ + BaseClass* Measurement_factory() + { + return new Measurement; + } +} diff --git a/CGMES_3.0.0/Measurement.hpp b/CGMES_3.0.0/Measurement.hpp new file mode 100644 index 000000000..36628013a --- /dev/null +++ b/CGMES_3.0.0/Measurement.hpp @@ -0,0 +1,51 @@ +#ifndef Measurement_H +#define Measurement_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PhaseCode.hpp" +#include "String.hpp" +#include "UnitMultiplier.hpp" +#include "UnitSymbol.hpp" + +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. + */ + class Measurement : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Measurement_factory(); +} +#endif diff --git a/CGMES_3.0.0/MeasurementValue.cpp b/CGMES_3.0.0/MeasurementValue.cpp new file mode 100644 index 000000000..84231fa0a --- /dev/null +++ b/CGMES_3.0.0/MeasurementValue.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MeasurementValue.hpp" + +#include +#include + +#include "MeasurementValueQuality.hpp" +#include "MeasurementValueSource.hpp" +#include "PerCent.hpp" +#include "DateTime.hpp" + +using namespace CIMPP; + +MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {}; +MeasurementValue::~MeasurementValue() {}; + + + + +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) +{ + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + MeasurementValueQuality* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MeasurementValueQuality != element2) + { + element->MeasurementValueQuality = element2; + return assign_MeasurementValueQuality_MeasurementValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MeasurementValueSource_MeasurementValues(BaseClass*, BaseClass*); +bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + MeasurementValueSource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MeasurementValueSource != element2) + { + element->MeasurementValueSource = element2; + return assign_MeasurementValueSource_MeasurementValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char MeasurementValue::debugName[] = "MeasurementValue"; +const char* MeasurementValue::debugString() const +{ + return MeasurementValue::debugName; +} + +void MeasurementValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner MeasurementValue::declare() +{ + return BaseClassDefiner(MeasurementValue::addConstructToMap, MeasurementValue::addPrimitiveAssignFnsToMap, MeasurementValue::addClassAssignFnsToMap, MeasurementValue::debugName); +} + +namespace CIMPP +{ + BaseClass* MeasurementValue_factory() + { + return new MeasurementValue; + } +} diff --git a/CGMES_3.0.0/MeasurementValue.hpp b/CGMES_3.0.0/MeasurementValue.hpp new file mode 100644 index 000000000..82ab044c0 --- /dev/null +++ b/CGMES_3.0.0/MeasurementValue.hpp @@ -0,0 +1,47 @@ +#ifndef MeasurementValue_H +#define MeasurementValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IOPoint.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "PerCent.hpp" + +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. + */ + class MeasurementValue : public IOPoint + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MeasurementValue_factory(); +} +#endif diff --git a/CGMES_3.0.0/MeasurementValueQuality.cpp b/CGMES_3.0.0/MeasurementValueQuality.cpp new file mode 100644 index 000000000..4200ee1df --- /dev/null +++ b/CGMES_3.0.0/MeasurementValueQuality.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MeasurementValueQuality.hpp" + +#include +#include + +#include "MeasurementValue.hpp" + +using namespace CIMPP; + +MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {}; +MeasurementValueQuality::~MeasurementValueQuality() {}; + + + + +bool assign_MeasurementValue_MeasurementValueQuality(BaseClass*, BaseClass*); +bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1); + MeasurementValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MeasurementValue != element2) + { + element->MeasurementValue = element2; + return assign_MeasurementValue_MeasurementValueQuality(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char MeasurementValueQuality::debugName[] = "MeasurementValueQuality"; +const char* MeasurementValueQuality::debugString() const +{ + return MeasurementValueQuality::debugName; +} + +void MeasurementValueQuality::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality"), &MeasurementValueQuality_factory)); +} + +void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void MeasurementValueQuality::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality.MeasurementValue"), &assign_MeasurementValueQuality_MeasurementValue)); +} + +const BaseClassDefiner MeasurementValueQuality::declare() +{ + return BaseClassDefiner(MeasurementValueQuality::addConstructToMap, MeasurementValueQuality::addPrimitiveAssignFnsToMap, MeasurementValueQuality::addClassAssignFnsToMap, MeasurementValueQuality::debugName); +} + +namespace CIMPP +{ + BaseClass* MeasurementValueQuality_factory() + { + return new MeasurementValueQuality; + } +} diff --git a/CGMES_3.0.0/MeasurementValueQuality.hpp b/CGMES_3.0.0/MeasurementValueQuality.hpp new file mode 100644 index 000000000..f2125ba70 --- /dev/null +++ b/CGMES_3.0.0/MeasurementValueQuality.hpp @@ -0,0 +1,41 @@ +#ifndef MeasurementValueQuality_H +#define MeasurementValueQuality_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Quality61850.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class MeasurementValueQuality : public Quality61850 + { + public: + /* constructor initialising all attributes to null */ + MeasurementValueQuality(); + ~MeasurementValueQuality() override; + + CIMPP::MeasurementValue* MeasurementValue; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MeasurementValueQuality_factory(); +} +#endif diff --git a/CGMES_3.0.0/MeasurementValueSource.cpp b/CGMES_3.0.0/MeasurementValueSource.cpp new file mode 100644 index 000000000..6c8c10f30 --- /dev/null +++ b/CGMES_3.0.0/MeasurementValueSource.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MeasurementValueSource.hpp" + +#include +#include + +#include "MeasurementValue.hpp" + +using namespace CIMPP; + +MeasurementValueSource::MeasurementValueSource() {}; +MeasurementValueSource::~MeasurementValueSource() {}; + + + + +bool assign_MeasurementValue_MeasurementValueSource(BaseClass*, BaseClass*); +bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MeasurementValueSource* element = dynamic_cast(BaseClass_ptr1); + MeasurementValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->MeasurementValues.begin(), element->MeasurementValues.end(), element2) == element->MeasurementValues.end()) + { + element->MeasurementValues.push_back(element2); + return assign_MeasurementValue_MeasurementValueSource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char MeasurementValueSource::debugName[] = "MeasurementValueSource"; +const char* MeasurementValueSource::debugString() const +{ + return MeasurementValueSource::debugName; +} + +void MeasurementValueSource::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:MeasurementValueSource"), &MeasurementValueSource_factory)); +} + +void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void MeasurementValueSource::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:MeasurementValueSource.MeasurementValues"), &assign_MeasurementValueSource_MeasurementValues)); +} + +const BaseClassDefiner MeasurementValueSource::declare() +{ + return BaseClassDefiner(MeasurementValueSource::addConstructToMap, MeasurementValueSource::addPrimitiveAssignFnsToMap, MeasurementValueSource::addClassAssignFnsToMap, MeasurementValueSource::debugName); +} + +namespace CIMPP +{ + BaseClass* MeasurementValueSource_factory() + { + return new MeasurementValueSource; + } +} diff --git a/CGMES_3.0.0/MeasurementValueSource.hpp b/CGMES_3.0.0/MeasurementValueSource.hpp new file mode 100644 index 000000000..d94210e91 --- /dev/null +++ b/CGMES_3.0.0/MeasurementValueSource.hpp @@ -0,0 +1,41 @@ +#ifndef MeasurementValueSource_H +#define MeasurementValueSource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class MeasurementValueSource : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + MeasurementValueSource(); + ~MeasurementValueSource() override; + + std::list MeasurementValues; /* The MeasurementValues updated by the source. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MeasurementValueSource_factory(); +} +#endif diff --git a/CGMES_3.0.0/MechLoad1.cpp b/CGMES_3.0.0/MechLoad1.cpp new file mode 100644 index 000000000..8211e9dae --- /dev/null +++ b/CGMES_3.0.0/MechLoad1.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MechLoad1.hpp" + +#include +#include + +#include "Float.hpp" +#include "Float.hpp" +#include "Float.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +MechLoad1::MechLoad1() {}; +MechLoad1::~MechLoad1() {}; + + +bool assign_MechLoad1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MechLoad1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MechLoad1_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MechLoad1_e(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->e; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char MechLoad1::debugName[] = "MechLoad1"; +const char* MechLoad1::debugString() const +{ + return MechLoad1::debugName; +} + +void MechLoad1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void MechLoad1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner MechLoad1::declare() +{ + return BaseClassDefiner(MechLoad1::addConstructToMap, MechLoad1::addPrimitiveAssignFnsToMap, MechLoad1::addClassAssignFnsToMap, MechLoad1::debugName); +} + +namespace CIMPP +{ + BaseClass* MechLoad1_factory() + { + return new MechLoad1; + } +} diff --git a/CGMES_3.0.0/MechLoad1.hpp b/CGMES_3.0.0/MechLoad1.hpp new file mode 100644 index 000000000..e23d294af --- /dev/null +++ b/CGMES_3.0.0/MechLoad1.hpp @@ -0,0 +1,44 @@ +#ifndef MechLoad1_H +#define MechLoad1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MechanicalLoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + + /* + Mechanical load model type 1. + */ + class MechLoad1 : public MechanicalLoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MechLoad1_factory(); +} +#endif diff --git a/CGMES_3.0.0/MechanicalLoadDynamics.cpp b/CGMES_3.0.0/MechanicalLoadDynamics.cpp new file mode 100644 index 000000000..1309e97f3 --- /dev/null +++ b/CGMES_3.0.0/MechanicalLoadDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MechanicalLoadDynamics.hpp" + +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" + +using namespace CIMPP; + +MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {}; +MechanicalLoadDynamics::~MechanicalLoadDynamics() {}; + + + + + +bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); +bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MechanicalLoadDynamics* 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_MechanicalLoadDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); +bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MechanicalLoadDynamics* 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_MechanicalLoadDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char MechanicalLoadDynamics::debugName[] = "MechanicalLoadDynamics"; +const char* MechanicalLoadDynamics::debugString() const +{ + return MechanicalLoadDynamics::debugName; +} + +void MechanicalLoadDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics"), &MechanicalLoadDynamics_factory)); +} + +void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void MechanicalLoadDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner MechanicalLoadDynamics::declare() +{ + return BaseClassDefiner(MechanicalLoadDynamics::addConstructToMap, MechanicalLoadDynamics::addPrimitiveAssignFnsToMap, MechanicalLoadDynamics::addClassAssignFnsToMap, MechanicalLoadDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* MechanicalLoadDynamics_factory() + { + return new MechanicalLoadDynamics; + } +} diff --git a/CGMES_3.0.0/MechanicalLoadDynamics.hpp b/CGMES_3.0.0/MechanicalLoadDynamics.hpp new file mode 100644 index 000000000..5cbbf17b5 --- /dev/null +++ b/CGMES_3.0.0/MechanicalLoadDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef MechanicalLoadDynamics_H +#define MechanicalLoadDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class MechanicalLoadDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MechanicalLoadDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/MechanicalLoadUserDefined.cpp b/CGMES_3.0.0/MechanicalLoadUserDefined.cpp new file mode 100644 index 000000000..64c23efdf --- /dev/null +++ b/CGMES_3.0.0/MechanicalLoadUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MechanicalLoadUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +MechanicalLoadUserDefined::MechanicalLoadUserDefined() {}; +MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {}; + + + +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) +{ + MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char MechanicalLoadUserDefined::debugName[] = "MechanicalLoadUserDefined"; +const char* MechanicalLoadUserDefined::debugString() const +{ + return MechanicalLoadUserDefined::debugName; +} + +void MechanicalLoadUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void MechanicalLoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics"), &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner MechanicalLoadUserDefined::declare() +{ + return BaseClassDefiner(MechanicalLoadUserDefined::addConstructToMap, MechanicalLoadUserDefined::addPrimitiveAssignFnsToMap, MechanicalLoadUserDefined::addClassAssignFnsToMap, MechanicalLoadUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* MechanicalLoadUserDefined_factory() + { + return new MechanicalLoadUserDefined; + } +} diff --git a/CGMES_3.0.0/MechanicalLoadUserDefined.hpp b/CGMES_3.0.0/MechanicalLoadUserDefined.hpp new file mode 100644 index 000000000..f56fb947a --- /dev/null +++ b/CGMES_3.0.0/MechanicalLoadUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef MechanicalLoadUserDefined_H +#define MechanicalLoadUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MechanicalLoadDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Mechanical load function block whose dynamic behaviour is described by a user-defined model. + */ + class MechanicalLoadUserDefined : public MechanicalLoadDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MechanicalLoadUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/Money.cpp b/CGMES_3.0.0/Money.cpp new file mode 100644 index 000000000..89e8271c2 --- /dev/null +++ b/CGMES_3.0.0/Money.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Money.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Money& Money::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Money::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Money::debugName[] = "Money"; +const char* Money::debugString() const +{ + return Money::debugName; +} + +Money& Money::operator+=(const Money& rhs) +{ + value += rhs.value; + return *this; +} + +Money& Money::operator-=(const Money& rhs) +{ + value -= rhs.value; + return *this; +} + +Money& Money::operator*=(const Money& rhs) +{ + value *= rhs.value; + return *this; +} + +Money& Money::operator/=(const Money& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Money& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Money& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Money.hpp b/CGMES_3.0.0/Money.hpp new file mode 100644 index 000000000..b6c47f743 --- /dev/null +++ b/CGMES_3.0.0/Money.hpp @@ -0,0 +1,39 @@ +#ifndef Money_H +#define Money_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Amount of money. + */ + class Money + { + public: + Money() : value(0.0), initialized(false) {} + Money(long double value) : value(value), initialized(true) {} + + Money& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Money& operator+=(const Money& rhs); + Money& operator-=(const Money& rhs); + Money& operator*=(const Money& rhs); + Money& operator/=(const Money& rhs); + + friend std::istream& operator>>(std::istream& lop, Money& rop); + friend std::ostream& operator<<(std::ostream& os, const Money& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/MonthDay.cpp b/CGMES_3.0.0/MonthDay.cpp new file mode 100644 index 000000000..2ef4c8b7e --- /dev/null +++ b/CGMES_3.0.0/MonthDay.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MonthDay.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +MonthDay& MonthDay::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +MonthDay::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char MonthDay::debugName[] = "MonthDay"; +const char* MonthDay::debugString() const +{ + return MonthDay::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, MonthDay& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const MonthDay& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/MonthDay.hpp b/CGMES_3.0.0/MonthDay.hpp new file mode 100644 index 000000000..1669168fe --- /dev/null +++ b/CGMES_3.0.0/MonthDay.hpp @@ -0,0 +1,35 @@ +#ifndef MonthDay_H +#define MonthDay_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +namespace CIMPP +{ + /* + 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); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, MonthDay& rop); + friend std::ostream& operator<<(std::ostream& os, const MonthDay& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/MutualCoupling.cpp b/CGMES_3.0.0/MutualCoupling.cpp new file mode 100644 index 000000000..3d54c7cc1 --- /dev/null +++ b/CGMES_3.0.0/MutualCoupling.cpp @@ -0,0 +1,215 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "MutualCoupling.hpp" + +#include +#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() {}; + + + + +bool assign_MutualCoupling_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance21; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_distance22(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->distance22; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0ch; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_MutualCoupling_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + +const char MutualCoupling::debugName[] = "MutualCoupling"; +const char* MutualCoupling::debugString() const +{ + return MutualCoupling::debugName; +} + +void MutualCoupling::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner MutualCoupling::declare() +{ + return BaseClassDefiner(MutualCoupling::addConstructToMap, MutualCoupling::addPrimitiveAssignFnsToMap, MutualCoupling::addClassAssignFnsToMap, MutualCoupling::debugName); +} + +namespace CIMPP +{ + BaseClass* MutualCoupling_factory() + { + return new MutualCoupling; + } +} diff --git a/CGMES_3.0.0/MutualCoupling.hpp b/CGMES_3.0.0/MutualCoupling.hpp new file mode 100644 index 000000000..7e9437378 --- /dev/null +++ b/CGMES_3.0.0/MutualCoupling.hpp @@ -0,0 +1,55 @@ +#ifndef MutualCoupling_H +#define MutualCoupling_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Length.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Susceptance.hpp" + +namespace CIMPP +{ + class Terminal; + + /* + This class represents the zero sequence line mutual coupling. + */ + class MutualCoupling : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* MutualCoupling_factory(); +} +#endif diff --git a/CGMES_3.0.0/NonConformLoad.cpp b/CGMES_3.0.0/NonConformLoad.cpp new file mode 100644 index 000000000..2ef76bf9b --- /dev/null +++ b/CGMES_3.0.0/NonConformLoad.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonConformLoad.hpp" + +#include +#include + +#include "NonConformLoadGroup.hpp" + +using namespace CIMPP; + +NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {}; +NonConformLoad::~NonConformLoad() {}; + + + + +bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); +bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoad* element = dynamic_cast(BaseClass_ptr1); + NonConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadGroup != element2) + { + element->LoadGroup = element2; + return assign_NonConformLoadGroup_EnergyConsumers(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonConformLoad::debugName[] = "NonConformLoad"; +const char* NonConformLoad::debugString() const +{ + return NonConformLoad::debugName; +} + +void NonConformLoad::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonConformLoad"), &NonConformLoad_factory)); +} + +void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonConformLoad::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonConformLoad.LoadGroup"), &assign_NonConformLoad_LoadGroup)); +} + +const BaseClassDefiner NonConformLoad::declare() +{ + return BaseClassDefiner(NonConformLoad::addConstructToMap, NonConformLoad::addPrimitiveAssignFnsToMap, NonConformLoad::addClassAssignFnsToMap, NonConformLoad::debugName); +} + +namespace CIMPP +{ + BaseClass* NonConformLoad_factory() + { + return new NonConformLoad; + } +} diff --git a/CGMES_3.0.0/NonConformLoad.hpp b/CGMES_3.0.0/NonConformLoad.hpp new file mode 100644 index 000000000..ea31f6b3a --- /dev/null +++ b/CGMES_3.0.0/NonConformLoad.hpp @@ -0,0 +1,41 @@ +#ifndef NonConformLoad_H +#define NonConformLoad_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConsumer.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class NonConformLoad : public EnergyConsumer + { + public: + /* constructor initialising all attributes to null */ + NonConformLoad(); + ~NonConformLoad() override; + + CIMPP::NonConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonConformLoad_factory(); +} +#endif diff --git a/CGMES_3.0.0/NonConformLoadGroup.cpp b/CGMES_3.0.0/NonConformLoadGroup.cpp new file mode 100644 index 000000000..6382d77c5 --- /dev/null +++ b/CGMES_3.0.0/NonConformLoadGroup.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonConformLoadGroup.hpp" + +#include +#include + +#include "NonConformLoad.hpp" +#include "NonConformLoadSchedule.hpp" + +using namespace CIMPP; + +NonConformLoadGroup::NonConformLoadGroup() {}; +NonConformLoadGroup::~NonConformLoadGroup() {}; + + + + + +bool assign_NonConformLoad_LoadGroup(BaseClass*, BaseClass*); +bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + NonConformLoad* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumers.begin(), element->EnergyConsumers.end(), element2) == element->EnergyConsumers.end()) + { + element->EnergyConsumers.push_back(element2); + return assign_NonConformLoad_LoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass*, BaseClass*); +bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoadGroup* element = dynamic_cast(BaseClass_ptr1); + NonConformLoadSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->NonConformLoadSchedules.begin(), element->NonConformLoadSchedules.end(), element2) == element->NonConformLoadSchedules.end()) + { + element->NonConformLoadSchedules.push_back(element2); + return assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonConformLoadGroup::debugName[] = "NonConformLoadGroup"; +const char* NonConformLoadGroup::debugString() const +{ + return NonConformLoadGroup::debugName; +} + +void NonConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup"), &NonConformLoadGroup_factory)); +} + +void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonConformLoadGroup::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner NonConformLoadGroup::declare() +{ + return BaseClassDefiner(NonConformLoadGroup::addConstructToMap, NonConformLoadGroup::addPrimitiveAssignFnsToMap, NonConformLoadGroup::addClassAssignFnsToMap, NonConformLoadGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* NonConformLoadGroup_factory() + { + return new NonConformLoadGroup; + } +} diff --git a/CGMES_3.0.0/NonConformLoadGroup.hpp b/CGMES_3.0.0/NonConformLoadGroup.hpp new file mode 100644 index 000000000..145b3f296 --- /dev/null +++ b/CGMES_3.0.0/NonConformLoadGroup.hpp @@ -0,0 +1,43 @@ +#ifndef NonConformLoadGroup_H +#define NonConformLoadGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "LoadGroup.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class NonConformLoad; + class NonConformLoadSchedule; + + /* + Loads that do not follow a daily and seasonal load variation pattern. + */ + class NonConformLoadGroup : public LoadGroup + { + public: + /* constructor initialising all attributes to null */ + NonConformLoadGroup(); + ~NonConformLoadGroup() override; + + std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + std::list NonConformLoadSchedules; /* The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonConformLoadGroup_factory(); +} +#endif diff --git a/CGMES_3.0.0/NonConformLoadSchedule.cpp b/CGMES_3.0.0/NonConformLoadSchedule.cpp new file mode 100644 index 000000000..aaf9d0641 --- /dev/null +++ b/CGMES_3.0.0/NonConformLoadSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonConformLoadSchedule.hpp" + +#include +#include + +#include "NonConformLoadGroup.hpp" + +using namespace CIMPP; + +NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {}; +NonConformLoadSchedule::~NonConformLoadSchedule() {}; + + + + +bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass*, BaseClass*); +bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + NonConformLoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->NonConformLoadGroup != element2) + { + element->NonConformLoadGroup = element2; + return assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonConformLoadSchedule::debugName[] = "NonConformLoadSchedule"; +const char* NonConformLoadSchedule::debugString() const +{ + return NonConformLoadSchedule::debugName; +} + +void NonConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule"), &NonConformLoadSchedule_factory)); +} + +void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonConformLoadSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule.NonConformLoadGroup"), &assign_NonConformLoadSchedule_NonConformLoadGroup)); +} + +const BaseClassDefiner NonConformLoadSchedule::declare() +{ + return BaseClassDefiner(NonConformLoadSchedule::addConstructToMap, NonConformLoadSchedule::addPrimitiveAssignFnsToMap, NonConformLoadSchedule::addClassAssignFnsToMap, NonConformLoadSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* NonConformLoadSchedule_factory() + { + return new NonConformLoadSchedule; + } +} diff --git a/CGMES_3.0.0/NonConformLoadSchedule.hpp b/CGMES_3.0.0/NonConformLoadSchedule.hpp new file mode 100644 index 000000000..ad0e220b2 --- /dev/null +++ b/CGMES_3.0.0/NonConformLoadSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef NonConformLoadSchedule_H +#define NonConformLoadSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +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). + */ + class NonConformLoadSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + NonConformLoadSchedule(); + ~NonConformLoadSchedule() override; + + CIMPP::NonConformLoadGroup* NonConformLoadGroup; /* The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonConformLoadSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/NonlinearShuntCompensator.cpp b/CGMES_3.0.0/NonlinearShuntCompensator.cpp new file mode 100644 index 000000000..99a0ef8cc --- /dev/null +++ b/CGMES_3.0.0/NonlinearShuntCompensator.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonlinearShuntCompensator.hpp" + +#include +#include + +#include "NonlinearShuntCompensatorPoint.hpp" + +using namespace CIMPP; + +NonlinearShuntCompensator::NonlinearShuntCompensator() {}; +NonlinearShuntCompensator::~NonlinearShuntCompensator() {}; + + + + +bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass*, BaseClass*); +bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonlinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + NonlinearShuntCompensatorPoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->NonlinearShuntCompensatorPoints.begin(), element->NonlinearShuntCompensatorPoints.end(), element2) == element->NonlinearShuntCompensatorPoints.end()) + { + element->NonlinearShuntCompensatorPoints.push_back(element2); + return assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char NonlinearShuntCompensator::debugName[] = "NonlinearShuntCompensator"; +const char* NonlinearShuntCompensator::debugString() const +{ + return NonlinearShuntCompensator::debugName; +} + +void NonlinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator"), &NonlinearShuntCompensator_factory)); +} + +void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NonlinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints"), &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints)); +} + +const BaseClassDefiner NonlinearShuntCompensator::declare() +{ + return BaseClassDefiner(NonlinearShuntCompensator::addConstructToMap, NonlinearShuntCompensator::addPrimitiveAssignFnsToMap, NonlinearShuntCompensator::addClassAssignFnsToMap, NonlinearShuntCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* NonlinearShuntCompensator_factory() + { + return new NonlinearShuntCompensator; + } +} diff --git a/CGMES_3.0.0/NonlinearShuntCompensator.hpp b/CGMES_3.0.0/NonlinearShuntCompensator.hpp new file mode 100644 index 000000000..f1f3c1246 --- /dev/null +++ b/CGMES_3.0.0/NonlinearShuntCompensator.hpp @@ -0,0 +1,41 @@ +#ifndef NonlinearShuntCompensator_H +#define NonlinearShuntCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ShuntCompensator.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class NonlinearShuntCompensator : public ShuntCompensator + { + public: + /* constructor initialising all attributes to null */ + NonlinearShuntCompensator(); + ~NonlinearShuntCompensator() override; + + std::list NonlinearShuntCompensatorPoints; /* All points of the non-linear shunt compensator. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonlinearShuntCompensator_factory(); +} +#endif diff --git a/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp new file mode 100644 index 000000000..41ee84d9c --- /dev/null +++ b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp @@ -0,0 +1,147 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NonlinearShuntCompensatorPoint.hpp" + +#include +#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() {}; + + + +bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sectionNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + +const char NonlinearShuntCompensatorPoint::debugName[] = "NonlinearShuntCompensatorPoint"; +const char* NonlinearShuntCompensatorPoint::debugString() const +{ + return NonlinearShuntCompensatorPoint::debugName; +} + +void NonlinearShuntCompensatorPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void NonlinearShuntCompensatorPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator"), &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator)); +} + +const BaseClassDefiner NonlinearShuntCompensatorPoint::declare() +{ + return BaseClassDefiner(NonlinearShuntCompensatorPoint::addConstructToMap, NonlinearShuntCompensatorPoint::addPrimitiveAssignFnsToMap, NonlinearShuntCompensatorPoint::addClassAssignFnsToMap, NonlinearShuntCompensatorPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* NonlinearShuntCompensatorPoint_factory() + { + return new NonlinearShuntCompensatorPoint; + } +} diff --git a/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp new file mode 100644 index 000000000..d5ca7fd77 --- /dev/null +++ b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp @@ -0,0 +1,49 @@ +#ifndef NonlinearShuntCompensatorPoint_H +#define NonlinearShuntCompensatorPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Conductance.hpp" +#include "Integer.hpp" +#include "Susceptance.hpp" + +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. + */ + class NonlinearShuntCompensatorPoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NonlinearShuntCompensatorPoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/NuclearGeneratingUnit.cpp b/CGMES_3.0.0/NuclearGeneratingUnit.cpp new file mode 100644 index 000000000..98d7415bb --- /dev/null +++ b/CGMES_3.0.0/NuclearGeneratingUnit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "NuclearGeneratingUnit.hpp" + +#include +#include + + +using namespace CIMPP; + +NuclearGeneratingUnit::NuclearGeneratingUnit() {}; +NuclearGeneratingUnit::~NuclearGeneratingUnit() {}; + + + +const char NuclearGeneratingUnit::debugName[] = "NuclearGeneratingUnit"; +const char* NuclearGeneratingUnit::debugString() const +{ + return NuclearGeneratingUnit::debugName; +} + +void NuclearGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:NuclearGeneratingUnit"), &NuclearGeneratingUnit_factory)); +} + +void NuclearGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void NuclearGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner NuclearGeneratingUnit::declare() +{ + return BaseClassDefiner(NuclearGeneratingUnit::addConstructToMap, NuclearGeneratingUnit::addPrimitiveAssignFnsToMap, NuclearGeneratingUnit::addClassAssignFnsToMap, NuclearGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* NuclearGeneratingUnit_factory() + { + return new NuclearGeneratingUnit; + } +} diff --git a/CGMES_3.0.0/NuclearGeneratingUnit.hpp b/CGMES_3.0.0/NuclearGeneratingUnit.hpp new file mode 100644 index 000000000..81f68a25f --- /dev/null +++ b/CGMES_3.0.0/NuclearGeneratingUnit.hpp @@ -0,0 +1,39 @@ +#ifndef NuclearGeneratingUnit_H +#define NuclearGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A nuclear generating unit. + */ + class NuclearGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + NuclearGeneratingUnit(); + ~NuclearGeneratingUnit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* NuclearGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/OperationalLimit.cpp b/CGMES_3.0.0/OperationalLimit.cpp new file mode 100644 index 000000000..469d42fdc --- /dev/null +++ b/CGMES_3.0.0/OperationalLimit.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimit.hpp" + +#include +#include + +#include "OperationalLimitSet.hpp" +#include "OperationalLimitType.hpp" + +using namespace CIMPP; + +OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {}; +OperationalLimit::~OperationalLimit() {}; + + + + + +bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass*, BaseClass*); +bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OperationalLimitSet != element2) + { + element->OperationalLimitSet = element2; + return assign_OperationalLimitSet_OperationalLimitValue(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimitType_OperationalLimit(BaseClass*, BaseClass*); +bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OperationalLimitType != element2) + { + element->OperationalLimitType = element2; + return assign_OperationalLimitType_OperationalLimit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char OperationalLimit::debugName[] = "OperationalLimit"; +const char* OperationalLimit::debugString() const +{ + return OperationalLimit::debugName; +} + +void OperationalLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:OperationalLimit"), &OperationalLimit_factory)); +} + +void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void OperationalLimit::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner OperationalLimit::declare() +{ + return BaseClassDefiner(OperationalLimit::addConstructToMap, OperationalLimit::addPrimitiveAssignFnsToMap, OperationalLimit::addClassAssignFnsToMap, OperationalLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* OperationalLimit_factory() + { + return new OperationalLimit; + } +} diff --git a/CGMES_3.0.0/OperationalLimit.hpp b/CGMES_3.0.0/OperationalLimit.hpp new file mode 100644 index 000000000..504a834e5 --- /dev/null +++ b/CGMES_3.0.0/OperationalLimit.hpp @@ -0,0 +1,43 @@ +#ifndef OperationalLimit_H +#define OperationalLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class OperationalLimit : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OperationalLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/OperationalLimitDirectionKind.cpp b/CGMES_3.0.0/OperationalLimitDirectionKind.cpp new file mode 100644 index 000000000..4aeb56e6d --- /dev/null +++ b/CGMES_3.0.0/OperationalLimitDirectionKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimitDirectionKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +OperationalLimitDirectionKind& OperationalLimitDirectionKind::operator=(OperationalLimitDirectionKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +OperationalLimitDirectionKind::operator OperationalLimitDirectionKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char OperationalLimitDirectionKind::debugName[] = "OperationalLimitDirectionKind"; +const char* OperationalLimitDirectionKind::debugString() const +{ + return OperationalLimitDirectionKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, OperationalLimitDirectionKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "high") + { + rop = OperationalLimitDirectionKind::high; + return lop; + } + if(EnumSymbol == "low") + { + rop = OperationalLimitDirectionKind::low; + return lop; + } + if(EnumSymbol == "absoluteValue") + { + rop = OperationalLimitDirectionKind::absoluteValue; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const OperationalLimitDirectionKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == OperationalLimitDirectionKind::high) + { + EnumSymbol = "high"; + } + if (obj.value == OperationalLimitDirectionKind::low) + { + EnumSymbol = "low"; + } + if (obj.value == OperationalLimitDirectionKind::absoluteValue) + { + EnumSymbol = "absoluteValue"; + } + + if (!EnumSymbol.empty()) + { + os << "OperationalLimitDirectionKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/OperationalLimitDirectionKind.hpp b/CGMES_3.0.0/OperationalLimitDirectionKind.hpp new file mode 100644 index 000000000..33d23f39a --- /dev/null +++ b/CGMES_3.0.0/OperationalLimitDirectionKind.hpp @@ -0,0 +1,50 @@ +#ifndef OperationalLimitDirectionKind_H +#define OperationalLimitDirectionKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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, + /** + * 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. + */ + absoluteValue, + }; + + OperationalLimitDirectionKind() : value(), initialized(false) {} + OperationalLimitDirectionKind(OperationalLimitDirectionKind_ENUM value) : value(value), initialized(true) {} + + OperationalLimitDirectionKind& operator=(OperationalLimitDirectionKind_ENUM rop); + operator OperationalLimitDirectionKind_ENUM() const; + + OperationalLimitDirectionKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, OperationalLimitDirectionKind& rop); + friend std::ostream& operator<<(std::ostream& os, const OperationalLimitDirectionKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/OperationalLimitSet.cpp b/CGMES_3.0.0/OperationalLimitSet.cpp new file mode 100644 index 000000000..65fd3559f --- /dev/null +++ b/CGMES_3.0.0/OperationalLimitSet.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimitSet.hpp" + +#include +#include + +#include "Equipment.hpp" +#include "OperationalLimit.hpp" +#include "ACDCTerminal.hpp" + +using namespace CIMPP; + +OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {}; +OperationalLimitSet::~OperationalLimitSet() {}; + + + + + + +bool assign_Equipment_OperationalLimitSet(BaseClass*, BaseClass*); +bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + Equipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Equipment != element2) + { + element->Equipment = element2; + return assign_Equipment_OperationalLimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OperationalLimit_OperationalLimitSet(BaseClass*, BaseClass*); +bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->OperationalLimitValue.begin(), element->OperationalLimitValue.end(), element2) == element->OperationalLimitValue.end()) + { + element->OperationalLimitValue.push_back(element2); + return assign_OperationalLimit_OperationalLimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCTerminal_OperationalLimitSet(BaseClass*, BaseClass*); +bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_OperationalLimitSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char OperationalLimitSet::debugName[] = "OperationalLimitSet"; +const char* OperationalLimitSet::debugString() const +{ + return OperationalLimitSet::debugName; +} + +void OperationalLimitSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:OperationalLimitSet"), &OperationalLimitSet_factory)); +} + +void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void OperationalLimitSet::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner OperationalLimitSet::declare() +{ + return BaseClassDefiner(OperationalLimitSet::addConstructToMap, OperationalLimitSet::addPrimitiveAssignFnsToMap, OperationalLimitSet::addClassAssignFnsToMap, OperationalLimitSet::debugName); +} + +namespace CIMPP +{ + BaseClass* OperationalLimitSet_factory() + { + return new OperationalLimitSet; + } +} diff --git a/CGMES_3.0.0/OperationalLimitSet.hpp b/CGMES_3.0.0/OperationalLimitSet.hpp new file mode 100644 index 000000000..c133904e1 --- /dev/null +++ b/CGMES_3.0.0/OperationalLimitSet.hpp @@ -0,0 +1,45 @@ +#ifndef OperationalLimitSet_H +#define OperationalLimitSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ACDCTerminal; + 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. + */ + class OperationalLimitSet : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OperationalLimitSet_factory(); +} +#endif diff --git a/CGMES_3.0.0/OperationalLimitType.cpp b/CGMES_3.0.0/OperationalLimitType.cpp new file mode 100644 index 000000000..7d474aab6 --- /dev/null +++ b/CGMES_3.0.0/OperationalLimitType.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OperationalLimitType.hpp" + +#include +#include + +#include "OperationalLimit.hpp" +#include "Seconds.hpp" +#include "OperationalLimitDirectionKind.hpp" +#include "Boolean.hpp" +#include "LimitKind.hpp" + +using namespace CIMPP; + +OperationalLimitType::OperationalLimitType() {}; +OperationalLimitType::~OperationalLimitType() {}; + + + +bool assign_OperationalLimitType_acceptableDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->acceptableDuration; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OperationalLimitType_direction(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->direction; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OperationalLimitType_isInfiniteDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isInfiniteDuration; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OperationalLimitType_kind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kind; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); +bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + +const char OperationalLimitType::debugName[] = "OperationalLimitType"; +const char* OperationalLimitType::debugString() const +{ + return OperationalLimitType::debugName; +} + +void OperationalLimitType::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OperationalLimitType::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.OperationalLimit"), &assign_OperationalLimitType_OperationalLimit)); +} + +const BaseClassDefiner OperationalLimitType::declare() +{ + return BaseClassDefiner(OperationalLimitType::addConstructToMap, OperationalLimitType::addPrimitiveAssignFnsToMap, OperationalLimitType::addClassAssignFnsToMap, OperationalLimitType::debugName); +} + +namespace CIMPP +{ + BaseClass* OperationalLimitType_factory() + { + return new OperationalLimitType; + } +} diff --git a/CGMES_3.0.0/OperationalLimitType.hpp b/CGMES_3.0.0/OperationalLimitType.hpp new file mode 100644 index 000000000..d8ea68d49 --- /dev/null +++ b/CGMES_3.0.0/OperationalLimitType.hpp @@ -0,0 +1,49 @@ +#ifndef OperationalLimitType_H +#define OperationalLimitType_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "LimitKind.hpp" +#include "OperationalLimitDirectionKind.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class OperationalLimit; + + /* + The operational meaning of a category of limits. + */ + class OperationalLimitType : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OperationalLimitType_factory(); +} +#endif diff --git a/CGMES_3.0.0/OrientationKind.cpp b/CGMES_3.0.0/OrientationKind.cpp new file mode 100644 index 000000000..d03a1fb25 --- /dev/null +++ b/CGMES_3.0.0/OrientationKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OrientationKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +OrientationKind& OrientationKind::operator=(OrientationKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +OrientationKind::operator OrientationKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char OrientationKind::debugName[] = "OrientationKind"; +const char* OrientationKind::debugString() const +{ + return OrientationKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, OrientationKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "OrientationKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "positive") + { + rop = OrientationKind::positive; + return lop; + } + if(EnumSymbol == "negative") + { + rop = OrientationKind::negative; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const OrientationKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == OrientationKind::positive) + { + EnumSymbol = "positive"; + } + if (obj.value == OrientationKind::negative) + { + EnumSymbol = "negative"; + } + + if (!EnumSymbol.empty()) + { + os << "OrientationKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/OrientationKind.hpp b/CGMES_3.0.0/OrientationKind.hpp new file mode 100644 index 000000000..72a413425 --- /dev/null +++ b/CGMES_3.0.0/OrientationKind.hpp @@ -0,0 +1,46 @@ +#ifndef OrientationKind_H +#define OrientationKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + negative, + }; + + OrientationKind() : value(), initialized(false) {} + OrientationKind(OrientationKind_ENUM value) : value(value), initialized(true) {} + + OrientationKind& operator=(OrientationKind_ENUM rop); + operator OrientationKind_ENUM() const; + + OrientationKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, OrientationKind& rop); + friend std::ostream& operator<<(std::ostream& os, const OrientationKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/OverexcLim2.cpp b/CGMES_3.0.0/OverexcLim2.cpp new file mode 100644 index 000000000..4b41edb94 --- /dev/null +++ b/CGMES_3.0.0/OverexcLim2.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLim2.hpp" + +#include +#include + +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +OverexcLim2::OverexcLim2() {}; +OverexcLim2::~OverexcLim2() {}; + + +bool assign_OverexcLim2_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLim2_koi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->koi; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLim2_voimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLim2_voimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char OverexcLim2::debugName[] = "OverexcLim2"; +const char* OverexcLim2::debugString() const +{ + return OverexcLim2::debugName; +} + +void OverexcLim2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLim2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLim2::declare() +{ + return BaseClassDefiner(OverexcLim2::addConstructToMap, OverexcLim2::addPrimitiveAssignFnsToMap, OverexcLim2::addClassAssignFnsToMap, OverexcLim2::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLim2_factory() + { + return new OverexcLim2; + } +} diff --git a/CGMES_3.0.0/OverexcLim2.hpp b/CGMES_3.0.0/OverexcLim2.hpp new file mode 100644 index 000000000..6c47096e9 --- /dev/null +++ b/CGMES_3.0.0/OverexcLim2.hpp @@ -0,0 +1,44 @@ +#ifndef OverexcLim2_H +#define OverexcLim2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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). + */ + class OverexcLim2 : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLim2_factory(); +} +#endif diff --git a/CGMES_3.0.0/OverexcLimIEEE.cpp b/CGMES_3.0.0/OverexcLimIEEE.cpp new file mode 100644 index 000000000..ffea10227 --- /dev/null +++ b/CGMES_3.0.0/OverexcLimIEEE.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLimIEEE.hpp" + +#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() {}; + + +bool assign_OverexcLimIEEE_hyst(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hyst; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_ifdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_itfpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->itfpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_kcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kcd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimIEEE_kramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kramp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char OverexcLimIEEE::debugName[] = "OverexcLimIEEE"; +const char* OverexcLimIEEE::debugString() const +{ + return OverexcLimIEEE::debugName; +} + +void OverexcLimIEEE::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLimIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLimIEEE::declare() +{ + return BaseClassDefiner(OverexcLimIEEE::addConstructToMap, OverexcLimIEEE::addPrimitiveAssignFnsToMap, OverexcLimIEEE::addClassAssignFnsToMap, OverexcLimIEEE::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLimIEEE_factory() + { + return new OverexcLimIEEE; + } +} diff --git a/CGMES_3.0.0/OverexcLimIEEE.hpp b/CGMES_3.0.0/OverexcLimIEEE.hpp new file mode 100644 index 000000000..9466ff863 --- /dev/null +++ b/CGMES_3.0.0/OverexcLimIEEE.hpp @@ -0,0 +1,47 @@ +#ifndef OverexcLimIEEE_H +#define OverexcLimIEEE_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" + +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. + */ + class OverexcLimIEEE : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLimIEEE_factory(); +} +#endif diff --git a/CGMES_3.0.0/OverexcLimX1.cpp b/CGMES_3.0.0/OverexcLimX1.cpp new file mode 100644 index 000000000..ab18dfe51 --- /dev/null +++ b/CGMES_3.0.0/OverexcLimX1.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLimX1.hpp" + +#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() {}; + + +bool assign_OverexcLimX1_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efddes; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdrated; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX1_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlow; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char OverexcLimX1::debugName[] = "OverexcLimX1"; +const char* OverexcLimX1::debugString() const +{ + return OverexcLimX1::debugName; +} + +void OverexcLimX1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLimX1::declare() +{ + return BaseClassDefiner(OverexcLimX1::addConstructToMap, OverexcLimX1::addPrimitiveAssignFnsToMap, OverexcLimX1::addClassAssignFnsToMap, OverexcLimX1::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLimX1_factory() + { + return new OverexcLimX1; + } +} diff --git a/CGMES_3.0.0/OverexcLimX1.hpp b/CGMES_3.0.0/OverexcLimX1.hpp new file mode 100644 index 000000000..5819e618a --- /dev/null +++ b/CGMES_3.0.0/OverexcLimX1.hpp @@ -0,0 +1,51 @@ +#ifndef OverexcLimX1_H +#define OverexcLimX1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Field voltage over excitation limiter. + */ + class OverexcLimX1 : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLimX1_factory(); +} +#endif diff --git a/CGMES_3.0.0/OverexcLimX2.cpp b/CGMES_3.0.0/OverexcLimX2.cpp new file mode 100644 index 000000000..88677bf5f --- /dev/null +++ b/CGMES_3.0.0/OverexcLimX2.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcLimX2.hpp" + +#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() {}; + + +bool assign_OverexcLimX2_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efd3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efddes; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdrated; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_OverexcLimX2_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlow; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char OverexcLimX2::debugName[] = "OverexcLimX2"; +const char* OverexcLimX2::debugString() const +{ + return OverexcLimX2::debugName; +} + +void OverexcLimX2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner OverexcLimX2::declare() +{ + return BaseClassDefiner(OverexcLimX2::addConstructToMap, OverexcLimX2::addPrimitiveAssignFnsToMap, OverexcLimX2::addClassAssignFnsToMap, OverexcLimX2::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcLimX2_factory() + { + return new OverexcLimX2; + } +} diff --git a/CGMES_3.0.0/OverexcLimX2.hpp b/CGMES_3.0.0/OverexcLimX2.hpp new file mode 100644 index 000000000..937859c61 --- /dev/null +++ b/CGMES_3.0.0/OverexcLimX2.hpp @@ -0,0 +1,53 @@ +#ifndef OverexcLimX2_H +#define OverexcLimX2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class OverexcLimX2 : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcLimX2_factory(); +} +#endif diff --git a/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp b/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp new file mode 100644 index 000000000..a1adf0088 --- /dev/null +++ b/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcitationLimiterDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" + +using namespace CIMPP; + +OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {}; +OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {}; + + + + +bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass*, BaseClass*); +bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char OverexcitationLimiterDynamics::debugName[] = "OverexcitationLimiterDynamics"; +const char* OverexcitationLimiterDynamics::debugString() const +{ + return OverexcitationLimiterDynamics::debugName; +} + +void OverexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics"), &OverexcitationLimiterDynamics_factory)); +} + +void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void OverexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics)); +} + +const BaseClassDefiner OverexcitationLimiterDynamics::declare() +{ + return BaseClassDefiner(OverexcitationLimiterDynamics::addConstructToMap, OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap, OverexcitationLimiterDynamics::addClassAssignFnsToMap, OverexcitationLimiterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcitationLimiterDynamics_factory() + { + return new OverexcitationLimiterDynamics; + } +} diff --git a/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp b/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp new file mode 100644 index 000000000..2bdfeddf3 --- /dev/null +++ b/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef OverexcitationLimiterDynamics_H +#define OverexcitationLimiterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class OverexcitationLimiterDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + OverexcitationLimiterDynamics(); + ~OverexcitationLimiterDynamics() override; + + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcitationLimiterDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp b/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp new file mode 100644 index 000000000..bd8419785 --- /dev/null +++ b/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "OverexcitationLimiterUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {}; +OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {}; + + + +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) +{ + OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char OverexcitationLimiterUserDefined::debugName[] = "OverexcitationLimiterUserDefined"; +const char* OverexcitationLimiterUserDefined::debugString() const +{ + return OverexcitationLimiterUserDefined::debugName; +} + +void OverexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void OverexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner OverexcitationLimiterUserDefined::declare() +{ + return BaseClassDefiner(OverexcitationLimiterUserDefined::addConstructToMap, OverexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap, OverexcitationLimiterUserDefined::addClassAssignFnsToMap, OverexcitationLimiterUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* OverexcitationLimiterUserDefined_factory() + { + return new OverexcitationLimiterUserDefined; + } +} diff --git a/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp b/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp new file mode 100644 index 000000000..9db6df057 --- /dev/null +++ b/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef OverexcitationLimiterUserDefined_H +#define OverexcitationLimiterUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OverexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Overexcitation limiter system function block whose dynamic behaviour is described by a user-defined model. + */ + class OverexcitationLimiterUserDefined : public OverexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* OverexcitationLimiterUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp b/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp new file mode 100644 index 000000000..72bd784f3 --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType1Dynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" +#include "VoltageAdjusterDynamics.hpp" + +using namespace CIMPP; + +PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {}; +PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {}; + + + + + + +bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageAdjusterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageAdjusterDynamics != element2) + { + element->VoltageAdjusterDynamics = element2; + return assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PFVArControllerType1Dynamics::debugName[] = "PFVArControllerType1Dynamics"; +const char* PFVArControllerType1Dynamics::debugString() const +{ + return PFVArControllerType1Dynamics::debugName; +} + +void PFVArControllerType1Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics"), &PFVArControllerType1Dynamics_factory)); +} + +void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner PFVArControllerType1Dynamics::declare() +{ + return BaseClassDefiner(PFVArControllerType1Dynamics::addConstructToMap, PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap, PFVArControllerType1Dynamics::addClassAssignFnsToMap, PFVArControllerType1Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType1Dynamics_factory() + { + return new PFVArControllerType1Dynamics; + } +} diff --git a/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp b/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp new file mode 100644 index 000000000..39a21f47b --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp @@ -0,0 +1,45 @@ +#ifndef PFVArControllerType1Dynamics_H +#define PFVArControllerType1Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class ExcitationSystemDynamics; + 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. + */ + class PFVArControllerType1Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType1Dynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp b/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp new file mode 100644 index 000000000..f58a6b228 --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType1UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {}; +PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {}; + + + +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) +{ + PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PFVArControllerType1UserDefined::debugName[] = "PFVArControllerType1UserDefined"; +const char* PFVArControllerType1UserDefined::debugString() const +{ + return PFVArControllerType1UserDefined::debugName; +} + +void PFVArControllerType1UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArControllerType1UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner PFVArControllerType1UserDefined::declare() +{ + return BaseClassDefiner(PFVArControllerType1UserDefined::addConstructToMap, PFVArControllerType1UserDefined::addPrimitiveAssignFnsToMap, PFVArControllerType1UserDefined::addClassAssignFnsToMap, PFVArControllerType1UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType1UserDefined_factory() + { + return new PFVArControllerType1UserDefined; + } +} diff --git a/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp b/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp new file mode 100644 index 000000000..8d771cb68 --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef PFVArControllerType1UserDefined_H +#define PFVArControllerType1UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Power factor or VAr controller type 1 function block whose dynamic behaviour is described by a user-defined model. + */ + class PFVArControllerType1UserDefined : public PFVArControllerType1Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType1UserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp b/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp new file mode 100644 index 000000000..2c2640a53 --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType2Dynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" + +using namespace CIMPP; + +PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {}; +PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {}; + + + + +bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass*, BaseClass*); +bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PFVArControllerType2Dynamics::debugName[] = "PFVArControllerType2Dynamics"; +const char* PFVArControllerType2Dynamics::debugString() const +{ + return PFVArControllerType2Dynamics::debugName; +} + +void PFVArControllerType2Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics"), &PFVArControllerType2Dynamics_factory)); +} + +void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PFVArControllerType2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics)); +} + +const BaseClassDefiner PFVArControllerType2Dynamics::declare() +{ + return BaseClassDefiner(PFVArControllerType2Dynamics::addConstructToMap, PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap, PFVArControllerType2Dynamics::addClassAssignFnsToMap, PFVArControllerType2Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType2Dynamics_factory() + { + return new PFVArControllerType2Dynamics; + } +} diff --git a/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp b/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp new file mode 100644 index 000000000..91ec83161 --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp @@ -0,0 +1,41 @@ +#ifndef PFVArControllerType2Dynamics_H +#define PFVArControllerType2Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PFVArControllerType2Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + PFVArControllerType2Dynamics(); + ~PFVArControllerType2Dynamics() override; + + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power factor or VAr controller type 2 is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType2Dynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp b/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp new file mode 100644 index 000000000..527718fc6 --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArControllerType2UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {}; +PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {}; + + + +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) +{ + PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PFVArControllerType2UserDefined::debugName[] = "PFVArControllerType2UserDefined"; +const char* PFVArControllerType2UserDefined::debugString() const +{ + return PFVArControllerType2UserDefined::debugName; +} + +void PFVArControllerType2UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArControllerType2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner PFVArControllerType2UserDefined::declare() +{ + return BaseClassDefiner(PFVArControllerType2UserDefined::addConstructToMap, PFVArControllerType2UserDefined::addPrimitiveAssignFnsToMap, PFVArControllerType2UserDefined::addClassAssignFnsToMap, PFVArControllerType2UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArControllerType2UserDefined_factory() + { + return new PFVArControllerType2UserDefined; + } +} diff --git a/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp b/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp new file mode 100644 index 000000000..2f18d753c --- /dev/null +++ b/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef PFVArControllerType2UserDefined_H +#define PFVArControllerType2UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Power factor or VAr controller type 2 function block whose dynamic behaviour is described by a user-defined model. + */ + class PFVArControllerType2UserDefined : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArControllerType2UserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArType1IEEEPFController.cpp b/CGMES_3.0.0/PFVArType1IEEEPFController.cpp new file mode 100644 index 000000000..676925fab --- /dev/null +++ b/CGMES_3.0.0/PFVArType1IEEEPFController.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType1IEEEPFController.hpp" + +#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() {}; + + +bool assign_PFVArType1IEEEPFController_ovex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ovex; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vitmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpfcbw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vpfref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char PFVArType1IEEEPFController::debugName[] = "PFVArType1IEEEPFController"; +const char* PFVArType1IEEEPFController::debugString() const +{ + return PFVArType1IEEEPFController::debugName; +} + +void PFVArType1IEEEPFController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType1IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType1IEEEPFController::declare() +{ + return BaseClassDefiner(PFVArType1IEEEPFController::addConstructToMap, PFVArType1IEEEPFController::addPrimitiveAssignFnsToMap, PFVArType1IEEEPFController::addClassAssignFnsToMap, PFVArType1IEEEPFController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType1IEEEPFController_factory() + { + return new PFVArType1IEEEPFController; + } +} diff --git a/CGMES_3.0.0/PFVArType1IEEEPFController.hpp b/CGMES_3.0.0/PFVArType1IEEEPFController.hpp new file mode 100644 index 000000000..3ed91990b --- /dev/null +++ b/CGMES_3.0.0/PFVArType1IEEEPFController.hpp @@ -0,0 +1,51 @@ +#ifndef PFVArType1IEEEPFController_H +#define PFVArType1IEEEPFController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType1IEEEPFController_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArType1IEEEVArController.cpp b/CGMES_3.0.0/PFVArType1IEEEVArController.cpp new file mode 100644 index 000000000..783ea4a78 --- /dev/null +++ b/CGMES_3.0.0/PFVArType1IEEEVArController.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType1IEEEVArController.hpp" + +#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() {}; + + +bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tvarc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvar(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvar; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvarcbw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvarref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vvtmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char PFVArType1IEEEVArController::debugName[] = "PFVArType1IEEEVArController"; +const char* PFVArType1IEEEVArController::debugString() const +{ + return PFVArType1IEEEVArController::debugName; +} + +void PFVArType1IEEEVArController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType1IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType1IEEEVArController::declare() +{ + return BaseClassDefiner(PFVArType1IEEEVArController::addConstructToMap, PFVArType1IEEEVArController::addPrimitiveAssignFnsToMap, PFVArType1IEEEVArController::addClassAssignFnsToMap, PFVArType1IEEEVArController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType1IEEEVArController_factory() + { + return new PFVArType1IEEEVArController; + } +} diff --git a/CGMES_3.0.0/PFVArType1IEEEVArController.hpp b/CGMES_3.0.0/PFVArType1IEEEVArController.hpp new file mode 100644 index 000000000..e53b44f9e --- /dev/null +++ b/CGMES_3.0.0/PFVArType1IEEEVArController.hpp @@ -0,0 +1,48 @@ +#ifndef PFVArType1IEEEVArController_H +#define PFVArType1IEEEVArController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType1IEEEVArController_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArType2Common1.cpp b/CGMES_3.0.0/PFVArType2Common1.cpp new file mode 100644 index 000000000..706c30675 --- /dev/null +++ b/CGMES_3.0.0/PFVArType2Common1.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType2Common1.hpp" + +#include +#include + +#include "Boolean.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +PFVArType2Common1::PFVArType2Common1() {}; +PFVArType2Common1::~PFVArType2Common1() {}; + + +bool assign_PFVArType2Common1_j(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->j; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2Common1_ref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char PFVArType2Common1::debugName[] = "PFVArType2Common1"; +const char* PFVArType2Common1::debugString() const +{ + return PFVArType2Common1::debugName; +} + +void PFVArType2Common1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType2Common1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType2Common1::declare() +{ + return BaseClassDefiner(PFVArType2Common1::addConstructToMap, PFVArType2Common1::addPrimitiveAssignFnsToMap, PFVArType2Common1::addClassAssignFnsToMap, PFVArType2Common1::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType2Common1_factory() + { + return new PFVArType2Common1; + } +} diff --git a/CGMES_3.0.0/PFVArType2Common1.hpp b/CGMES_3.0.0/PFVArType2Common1.hpp new file mode 100644 index 000000000..39a1f5918 --- /dev/null +++ b/CGMES_3.0.0/PFVArType2Common1.hpp @@ -0,0 +1,46 @@ +#ifndef PFVArType2Common1_H +#define PFVArType2Common1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" + +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.] + */ + class PFVArType2Common1 : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType2Common1_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArType2IEEEPFController.cpp b/CGMES_3.0.0/PFVArType2IEEEPFController.cpp new file mode 100644 index 000000000..a71b109e8 --- /dev/null +++ b/CGMES_3.0.0/PFVArType2IEEEPFController.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType2IEEEPFController.hpp" + +#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() {}; + + +bool assign_PFVArType2IEEEPFController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exlon; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_pfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pfref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vclmt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEPFController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char PFVArType2IEEEPFController::debugName[] = "PFVArType2IEEEPFController"; +const char* PFVArType2IEEEPFController::debugString() const +{ + return PFVArType2IEEEPFController::debugName; +} + +void PFVArType2IEEEPFController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType2IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType2IEEEPFController::declare() +{ + return BaseClassDefiner(PFVArType2IEEEPFController::addConstructToMap, PFVArType2IEEEPFController::addPrimitiveAssignFnsToMap, PFVArType2IEEEPFController::addClassAssignFnsToMap, PFVArType2IEEEPFController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType2IEEEPFController_factory() + { + return new PFVArType2IEEEPFController; + } +} diff --git a/CGMES_3.0.0/PFVArType2IEEEPFController.hpp b/CGMES_3.0.0/PFVArType2IEEEPFController.hpp new file mode 100644 index 000000000..32b32a895 --- /dev/null +++ b/CGMES_3.0.0/PFVArType2IEEEPFController.hpp @@ -0,0 +1,49 @@ +#ifndef PFVArType2IEEEPFController_H +#define PFVArType2IEEEPFController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" + +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. + */ + class PFVArType2IEEEPFController : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType2IEEEPFController_factory(); +} +#endif diff --git a/CGMES_3.0.0/PFVArType2IEEEVArController.cpp b/CGMES_3.0.0/PFVArType2IEEEVArController.cpp new file mode 100644 index 000000000..eb22394e5 --- /dev/null +++ b/CGMES_3.0.0/PFVArType2IEEEVArController.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PFVArType2IEEEVArController.hpp" + +#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() {}; + + +bool assign_PFVArType2IEEEVArController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->exlon; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_qref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vclmt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PFVArType2IEEEVArController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char PFVArType2IEEEVArController::debugName[] = "PFVArType2IEEEVArController"; +const char* PFVArType2IEEEVArController::debugString() const +{ + return PFVArType2IEEEVArController::debugName; +} + +void PFVArType2IEEEVArController::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PFVArType2IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PFVArType2IEEEVArController::declare() +{ + return BaseClassDefiner(PFVArType2IEEEVArController::addConstructToMap, PFVArType2IEEEVArController::addPrimitiveAssignFnsToMap, PFVArType2IEEEVArController::addClassAssignFnsToMap, PFVArType2IEEEVArController::debugName); +} + +namespace CIMPP +{ + BaseClass* PFVArType2IEEEVArController_factory() + { + return new PFVArType2IEEEVArController; + } +} diff --git a/CGMES_3.0.0/PFVArType2IEEEVArController.hpp b/CGMES_3.0.0/PFVArType2IEEEVArController.hpp new file mode 100644 index 000000000..bff39af0b --- /dev/null +++ b/CGMES_3.0.0/PFVArType2IEEEVArController.hpp @@ -0,0 +1,49 @@ +#ifndef PFVArType2IEEEVArController_H +#define PFVArType2IEEEVArController_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PFVArControllerType2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" + +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. + */ + class PFVArType2IEEEVArController : public PFVArControllerType2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PFVArType2IEEEVArController_factory(); +} +#endif diff --git a/CGMES_3.0.0/PU.cpp b/CGMES_3.0.0/PU.cpp new file mode 100644 index 000000000..2c17173ca --- /dev/null +++ b/CGMES_3.0.0/PU.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PU.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PU& PU::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +PU::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PU::debugName[] = "PU"; +const char* PU::debugString() const +{ + return PU::debugName; +} + +PU& PU::operator+=(const PU& rhs) +{ + value += rhs.value; + return *this; +} + +PU& PU::operator-=(const PU& rhs) +{ + value -= rhs.value; + return *this; +} + +PU& PU::operator*=(const PU& rhs) +{ + value *= rhs.value; + return *this; +} + +PU& PU::operator/=(const PU& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PU& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PU& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/PU.hpp b/CGMES_3.0.0/PU.hpp new file mode 100644 index 000000000..51a1d1117 --- /dev/null +++ b/CGMES_3.0.0/PU.hpp @@ -0,0 +1,39 @@ +#ifndef PU_H +#define PU_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. + */ + class PU + { + public: + PU() : value(0.0), initialized(false) {} + PU(long double value) : value(value), initialized(true) {} + + PU& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + PU& operator+=(const PU& rhs); + PU& operator-=(const PU& rhs); + PU& operator*=(const PU& rhs); + PU& operator/=(const PU& rhs); + + friend std::istream& operator>>(std::istream& lop, PU& rop); + friend std::ostream& operator<<(std::ostream& os, const PU& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/PerCent.cpp b/CGMES_3.0.0/PerCent.cpp new file mode 100644 index 000000000..34fe37067 --- /dev/null +++ b/CGMES_3.0.0/PerCent.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PerCent.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PerCent& PerCent::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +PerCent::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PerCent::debugName[] = "PerCent"; +const char* PerCent::debugString() const +{ + return PerCent::debugName; +} + +PerCent& PerCent::operator+=(const PerCent& rhs) +{ + value += rhs.value; + return *this; +} + +PerCent& PerCent::operator-=(const PerCent& rhs) +{ + value -= rhs.value; + return *this; +} + +PerCent& PerCent::operator*=(const PerCent& rhs) +{ + value *= rhs.value; + return *this; +} + +PerCent& PerCent::operator/=(const PerCent& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PerCent& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PerCent& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/PerCent.hpp b/CGMES_3.0.0/PerCent.hpp new file mode 100644 index 000000000..67bb36e78 --- /dev/null +++ b/CGMES_3.0.0/PerCent.hpp @@ -0,0 +1,39 @@ +#ifndef PerCent_H +#define PerCent_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Percentage on a defined base. For example, specify as 100 to indicate at the defined base. + */ + class PerCent + { + public: + PerCent() : value(0.0), initialized(false) {} + PerCent(long double value) : value(value), initialized(true) {} + + PerCent& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + PerCent& operator+=(const PerCent& rhs); + PerCent& operator-=(const PerCent& rhs); + PerCent& operator*=(const PerCent& rhs); + PerCent& operator/=(const PerCent& rhs); + + friend std::istream& operator>>(std::istream& lop, PerCent& rop); + friend std::ostream& operator<<(std::ostream& os, const PerCent& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/PetersenCoil.cpp b/CGMES_3.0.0/PetersenCoil.cpp new file mode 100644 index 000000000..d0ab8eb1d --- /dev/null +++ b/CGMES_3.0.0/PetersenCoil.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PetersenCoil.hpp" + +#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() {}; + + +bool assign_PetersenCoil_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_nominalU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nominalU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_offsetCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->offsetCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_positionCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->positionCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_xGroundMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xGroundMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_xGroundMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xGroundMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PetersenCoil_xGroundNominal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xGroundNominal; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char PetersenCoil::debugName[] = "PetersenCoil"; +const char* PetersenCoil::debugString() const +{ + return PetersenCoil::debugName; +} + +void PetersenCoil::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PetersenCoil::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PetersenCoil::declare() +{ + return BaseClassDefiner(PetersenCoil::addConstructToMap, PetersenCoil::addPrimitiveAssignFnsToMap, PetersenCoil::addClassAssignFnsToMap, PetersenCoil::debugName); +} + +namespace CIMPP +{ + BaseClass* PetersenCoil_factory() + { + return new PetersenCoil; + } +} diff --git a/CGMES_3.0.0/PetersenCoil.hpp b/CGMES_3.0.0/PetersenCoil.hpp new file mode 100644 index 000000000..27b8c00ff --- /dev/null +++ b/CGMES_3.0.0/PetersenCoil.hpp @@ -0,0 +1,50 @@ +#ifndef PetersenCoil_H +#define PetersenCoil_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EarthFaultCompensator.hpp" +#include "BaseClassDefiner.hpp" +#include "CurrentFlow.hpp" +#include "PetersenCoilModeKind.hpp" +#include "Reactance.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PetersenCoil_factory(); +} +#endif diff --git a/CGMES_3.0.0/PetersenCoilModeKind.cpp b/CGMES_3.0.0/PetersenCoilModeKind.cpp new file mode 100644 index 000000000..a2e6dcbf7 --- /dev/null +++ b/CGMES_3.0.0/PetersenCoilModeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PetersenCoilModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PetersenCoilModeKind& PetersenCoilModeKind::operator=(PetersenCoilModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +PetersenCoilModeKind::operator PetersenCoilModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PetersenCoilModeKind::debugName[] = "PetersenCoilModeKind"; +const char* PetersenCoilModeKind::debugString() const +{ + return PetersenCoilModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PetersenCoilModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "fixed") + { + rop = PetersenCoilModeKind::fixed; + return lop; + } + if(EnumSymbol == "manual") + { + rop = PetersenCoilModeKind::manual; + return lop; + } + if(EnumSymbol == "automaticPositioning") + { + rop = PetersenCoilModeKind::automaticPositioning; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PetersenCoilModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == PetersenCoilModeKind::fixed) + { + EnumSymbol = "fixed"; + } + if (obj.value == PetersenCoilModeKind::manual) + { + EnumSymbol = "manual"; + } + if (obj.value == PetersenCoilModeKind::automaticPositioning) + { + EnumSymbol = "automaticPositioning"; + } + + if (!EnumSymbol.empty()) + { + os << "PetersenCoilModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/PetersenCoilModeKind.hpp b/CGMES_3.0.0/PetersenCoilModeKind.hpp new file mode 100644 index 000000000..6bfff0ea0 --- /dev/null +++ b/CGMES_3.0.0/PetersenCoilModeKind.hpp @@ -0,0 +1,50 @@ +#ifndef PetersenCoilModeKind_H +#define PetersenCoilModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The mode of operation for a Petersen coil. + */ + class PetersenCoilModeKind + { + public: + enum PetersenCoilModeKind_ENUM + { + /** + * Fixed position. + */ + fixed, + /** + * Manual positioning. + */ + manual, + /** + * Automatic positioning. + */ + automaticPositioning, + }; + + PetersenCoilModeKind() : value(), initialized(false) {} + PetersenCoilModeKind(PetersenCoilModeKind_ENUM value) : value(value), initialized(true) {} + + PetersenCoilModeKind& operator=(PetersenCoilModeKind_ENUM rop); + operator PetersenCoilModeKind_ENUM() const; + + PetersenCoilModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, PetersenCoilModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const PetersenCoilModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/PhaseCode.cpp b/CGMES_3.0.0/PhaseCode.cpp new file mode 100644 index 000000000..856caa7ea --- /dev/null +++ b/CGMES_3.0.0/PhaseCode.cpp @@ -0,0 +1,306 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseCode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +PhaseCode& PhaseCode::operator=(PhaseCode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +PhaseCode::operator PhaseCode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char PhaseCode::debugName[] = "PhaseCode"; +const char* PhaseCode::debugString() const +{ + return PhaseCode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, PhaseCode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "PhaseCode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "ABCN") + { + rop = PhaseCode::ABCN; + return lop; + } + if(EnumSymbol == "ABC") + { + rop = PhaseCode::ABC; + return lop; + } + if(EnumSymbol == "ABN") + { + rop = PhaseCode::ABN; + return lop; + } + if(EnumSymbol == "ACN") + { + rop = PhaseCode::ACN; + return lop; + } + if(EnumSymbol == "BCN") + { + rop = PhaseCode::BCN; + return lop; + } + if(EnumSymbol == "AB") + { + rop = PhaseCode::AB; + return lop; + } + if(EnumSymbol == "AC") + { + rop = PhaseCode::AC; + return lop; + } + if(EnumSymbol == "BC") + { + rop = PhaseCode::BC; + return lop; + } + if(EnumSymbol == "AN") + { + rop = PhaseCode::AN; + return lop; + } + if(EnumSymbol == "BN") + { + rop = PhaseCode::BN; + return lop; + } + if(EnumSymbol == "CN") + { + rop = PhaseCode::CN; + return lop; + } + if(EnumSymbol == "A") + { + rop = PhaseCode::A; + return lop; + } + if(EnumSymbol == "B") + { + rop = PhaseCode::B; + return lop; + } + if(EnumSymbol == "C") + { + rop = PhaseCode::C; + return lop; + } + if(EnumSymbol == "N") + { + rop = PhaseCode::N; + return lop; + } + if(EnumSymbol == "s1N") + { + rop = PhaseCode::s1N; + return lop; + } + if(EnumSymbol == "s2N") + { + rop = PhaseCode::s2N; + return lop; + } + if(EnumSymbol == "s12N") + { + rop = PhaseCode::s12N; + return lop; + } + if(EnumSymbol == "s1") + { + rop = PhaseCode::s1; + return lop; + } + if(EnumSymbol == "s2") + { + rop = PhaseCode::s2; + return lop; + } + if(EnumSymbol == "s12") + { + rop = PhaseCode::s12; + return lop; + } + if(EnumSymbol == "none") + { + rop = PhaseCode::none; + return lop; + } + if(EnumSymbol == "X") + { + rop = PhaseCode::X; + return lop; + } + if(EnumSymbol == "XY") + { + rop = PhaseCode::XY; + return lop; + } + if(EnumSymbol == "XN") + { + rop = PhaseCode::XN; + return lop; + } + if(EnumSymbol == "XYN") + { + rop = PhaseCode::XYN; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const PhaseCode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == PhaseCode::ABCN) + { + EnumSymbol = "ABCN"; + } + if (obj.value == PhaseCode::ABC) + { + EnumSymbol = "ABC"; + } + if (obj.value == PhaseCode::ABN) + { + EnumSymbol = "ABN"; + } + if (obj.value == PhaseCode::ACN) + { + EnumSymbol = "ACN"; + } + if (obj.value == PhaseCode::BCN) + { + EnumSymbol = "BCN"; + } + if (obj.value == PhaseCode::AB) + { + EnumSymbol = "AB"; + } + if (obj.value == PhaseCode::AC) + { + EnumSymbol = "AC"; + } + if (obj.value == PhaseCode::BC) + { + EnumSymbol = "BC"; + } + if (obj.value == PhaseCode::AN) + { + EnumSymbol = "AN"; + } + if (obj.value == PhaseCode::BN) + { + EnumSymbol = "BN"; + } + if (obj.value == PhaseCode::CN) + { + EnumSymbol = "CN"; + } + if (obj.value == PhaseCode::A) + { + EnumSymbol = "A"; + } + if (obj.value == PhaseCode::B) + { + EnumSymbol = "B"; + } + if (obj.value == PhaseCode::C) + { + EnumSymbol = "C"; + } + if (obj.value == PhaseCode::N) + { + EnumSymbol = "N"; + } + if (obj.value == PhaseCode::s1N) + { + EnumSymbol = "s1N"; + } + if (obj.value == PhaseCode::s2N) + { + EnumSymbol = "s2N"; + } + if (obj.value == PhaseCode::s12N) + { + EnumSymbol = "s12N"; + } + if (obj.value == PhaseCode::s1) + { + EnumSymbol = "s1"; + } + if (obj.value == PhaseCode::s2) + { + EnumSymbol = "s2"; + } + if (obj.value == PhaseCode::s12) + { + EnumSymbol = "s12"; + } + if (obj.value == PhaseCode::none) + { + EnumSymbol = "none"; + } + if (obj.value == PhaseCode::X) + { + EnumSymbol = "X"; + } + if (obj.value == PhaseCode::XY) + { + EnumSymbol = "XY"; + } + if (obj.value == PhaseCode::XN) + { + EnumSymbol = "XN"; + } + if (obj.value == PhaseCode::XYN) + { + EnumSymbol = "XYN"; + } + + if (!EnumSymbol.empty()) + { + os << "PhaseCode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/PhaseCode.hpp b/CGMES_3.0.0/PhaseCode.hpp new file mode 100644 index 000000000..2f5373cac --- /dev/null +++ b/CGMES_3.0.0/PhaseCode.hpp @@ -0,0 +1,142 @@ +#ifndef PhaseCode_H +#define PhaseCode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +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. + */ + class PhaseCode + { + public: + enum PhaseCode_ENUM + { + /** + * Phases A, B, C, and N. + */ + ABCN, + /** + * Phases A, B, and C. + */ + ABC, + /** + * Phases A, B, and neutral. + */ + ABN, + /** + * Phases A, C and neutral. + */ + ACN, + /** + * Phases B, C, and neutral. + */ + BCN, + /** + * Phases A and B. + */ + AB, + /** + * Phases A and C. + */ + AC, + /** + * Phases B and C. + */ + BC, + /** + * Phases A and neutral. + */ + AN, + /** + * Phases B and neutral. + */ + BN, + /** + * Phases C and neutral. + */ + CN, + /** + * Phase A. + */ + A, + /** + * Phase B. + */ + B, + /** + * Phase C. + */ + C, + /** + * Neutral phase. + */ + N, + /** + * Secondary phase 1 and neutral. + */ + s1N, + /** + * Secondary phase 2 and neutral. + */ + s2N, + /** + * Secondary phases 1, 2, and neutral. + */ + s12N, + /** + * Secondary phase 1. + */ + s1, + /** + * Secondary phase 2. + */ + s2, + /** + * Secondary phase 1 and 2. + */ + s12, + /** + * No phases specified. + */ + none, + /** + * Unknown non-neutral phase. + */ + X, + /** + * Two unknown non-neutral phases. + */ + XY, + /** + * Unknown non-neutral phase plus neutral. + */ + XN, + /** + * Two unknown non-neutral phases plus neutral. + */ + XYN, + }; + + PhaseCode() : value(), initialized(false) {} + PhaseCode(PhaseCode_ENUM value) : value(value), initialized(true) {} + + PhaseCode& operator=(PhaseCode_ENUM rop); + operator PhaseCode_ENUM() const; + + PhaseCode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, PhaseCode& rop); + friend std::ostream& operator<<(std::ostream& os, const PhaseCode& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChanger.cpp b/CGMES_3.0.0/PhaseTapChanger.cpp new file mode 100644 index 000000000..709d1c4c2 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChanger.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChanger.hpp" + +#include +#include + +#include "TransformerEnd.hpp" + +using namespace CIMPP; + +PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {}; +PhaseTapChanger::~PhaseTapChanger() {}; + + + + +bool assign_TransformerEnd_PhaseTapChanger(BaseClass*, BaseClass*); +bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TransformerEnd != element2) + { + element->TransformerEnd = element2; + return assign_TransformerEnd_PhaseTapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PhaseTapChanger::debugName[] = "PhaseTapChanger"; +const char* PhaseTapChanger::debugString() const +{ + return PhaseTapChanger::debugName; +} + +void PhaseTapChanger::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChanger"), &PhaseTapChanger_factory)); +} + +void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PhaseTapChanger.TransformerEnd"), &assign_PhaseTapChanger_TransformerEnd)); +} + +const BaseClassDefiner PhaseTapChanger::declare() +{ + return BaseClassDefiner(PhaseTapChanger::addConstructToMap, PhaseTapChanger::addPrimitiveAssignFnsToMap, PhaseTapChanger::addClassAssignFnsToMap, PhaseTapChanger::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChanger_factory() + { + return new PhaseTapChanger; + } +} diff --git a/CGMES_3.0.0/PhaseTapChanger.hpp b/CGMES_3.0.0/PhaseTapChanger.hpp new file mode 100644 index 000000000..2a6057d85 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChanger.hpp @@ -0,0 +1,41 @@ +#ifndef PhaseTapChanger_H +#define PhaseTapChanger_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChanger.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PhaseTapChanger : public TapChanger + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChanger(); + ~PhaseTapChanger() override; + + CIMPP::TransformerEnd* TransformerEnd; /* Transformer end to which this phase tap changer belongs. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChanger_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp new file mode 100644 index 000000000..d56507fe1 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerAsymmetrical.hpp" + +#include +#include + +#include "AngleDegrees.hpp" + +using namespace CIMPP; + +PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {}; +PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {}; + + +bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->windingConnectionAngle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char PhaseTapChangerAsymmetrical::debugName[] = "PhaseTapChangerAsymmetrical"; +const char* PhaseTapChangerAsymmetrical::debugString() const +{ + return PhaseTapChangerAsymmetrical::debugName; +} + +void PhaseTapChangerAsymmetrical::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerAsymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerAsymmetrical::declare() +{ + return BaseClassDefiner(PhaseTapChangerAsymmetrical::addConstructToMap, PhaseTapChangerAsymmetrical::addPrimitiveAssignFnsToMap, PhaseTapChangerAsymmetrical::addClassAssignFnsToMap, PhaseTapChangerAsymmetrical::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerAsymmetrical_factory() + { + return new PhaseTapChangerAsymmetrical; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp new file mode 100644 index 000000000..ecc8b9350 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp @@ -0,0 +1,41 @@ +#ifndef PhaseTapChangerAsymmetrical_H +#define PhaseTapChangerAsymmetrical_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChangerNonLinear.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" + +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. + */ + class PhaseTapChangerAsymmetrical : public PhaseTapChangerNonLinear + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerAsymmetrical_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerLinear.cpp b/CGMES_3.0.0/PhaseTapChangerLinear.cpp new file mode 100644 index 000000000..aebc14b4b --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerLinear.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerLinear.hpp" + +#include +#include + +#include "AngleDegrees.hpp" +#include "Reactance.hpp" +#include "Reactance.hpp" + +using namespace CIMPP; + +PhaseTapChangerLinear::PhaseTapChangerLinear() {}; +PhaseTapChangerLinear::~PhaseTapChangerLinear() {}; + + +bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->stepPhaseShiftIncrement; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char PhaseTapChangerLinear::debugName[] = "PhaseTapChangerLinear"; +const char* PhaseTapChangerLinear::debugString() const +{ + return PhaseTapChangerLinear::debugName; +} + +void PhaseTapChangerLinear::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerLinear::declare() +{ + return BaseClassDefiner(PhaseTapChangerLinear::addConstructToMap, PhaseTapChangerLinear::addPrimitiveAssignFnsToMap, PhaseTapChangerLinear::addClassAssignFnsToMap, PhaseTapChangerLinear::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerLinear_factory() + { + return new PhaseTapChangerLinear; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerLinear.hpp b/CGMES_3.0.0/PhaseTapChangerLinear.hpp new file mode 100644 index 000000000..24cab036f --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerLinear.hpp @@ -0,0 +1,44 @@ +#ifndef PhaseTapChangerLinear_H +#define PhaseTapChangerLinear_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChanger.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Reactance.hpp" + +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. + */ + class PhaseTapChangerLinear : public PhaseTapChanger + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerLinear_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp b/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp new file mode 100644 index 000000000..10a2c21f0 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerNonLinear.hpp" + +#include +#include + +#include "PerCent.hpp" +#include "Reactance.hpp" +#include "Reactance.hpp" + +using namespace CIMPP; + +PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {}; +PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {}; + + +bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageStepIncrement; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xMin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char PhaseTapChangerNonLinear::debugName[] = "PhaseTapChangerNonLinear"; +const char* PhaseTapChangerNonLinear::debugString() const +{ + return PhaseTapChangerNonLinear::debugName; +} + +void PhaseTapChangerNonLinear::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerNonLinear::declare() +{ + return BaseClassDefiner(PhaseTapChangerNonLinear::addConstructToMap, PhaseTapChangerNonLinear::addPrimitiveAssignFnsToMap, PhaseTapChangerNonLinear::addClassAssignFnsToMap, PhaseTapChangerNonLinear::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerNonLinear_factory() + { + return new PhaseTapChangerNonLinear; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp b/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp new file mode 100644 index 000000000..f1a73c98e --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp @@ -0,0 +1,44 @@ +#ifndef PhaseTapChangerNonLinear_H +#define PhaseTapChangerNonLinear_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChanger.hpp" +#include "BaseClassDefiner.hpp" +#include "PerCent.hpp" +#include "Reactance.hpp" + +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. + */ + class PhaseTapChangerNonLinear : public PhaseTapChanger + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerNonLinear_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp b/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp new file mode 100644 index 000000000..349239582 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerSymmetrical.hpp" + +#include +#include + + +using namespace CIMPP; + +PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {}; +PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {}; + + + +const char PhaseTapChangerSymmetrical::debugName[] = "PhaseTapChangerSymmetrical"; +const char* PhaseTapChangerSymmetrical::debugString() const +{ + return PhaseTapChangerSymmetrical::debugName; +} + +void PhaseTapChangerSymmetrical::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerSymmetrical"), &PhaseTapChangerSymmetrical_factory)); +} + +void PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChangerSymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhaseTapChangerSymmetrical::declare() +{ + return BaseClassDefiner(PhaseTapChangerSymmetrical::addConstructToMap, PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap, PhaseTapChangerSymmetrical::addClassAssignFnsToMap, PhaseTapChangerSymmetrical::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerSymmetrical_factory() + { + return new PhaseTapChangerSymmetrical; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp b/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp new file mode 100644 index 000000000..9fd1c1ee2 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp @@ -0,0 +1,39 @@ +#ifndef PhaseTapChangerSymmetrical_H +#define PhaseTapChangerSymmetrical_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChangerNonLinear.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PhaseTapChangerSymmetrical : public PhaseTapChangerNonLinear + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChangerSymmetrical(); + ~PhaseTapChangerSymmetrical() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerSymmetrical_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerTable.cpp b/CGMES_3.0.0/PhaseTapChangerTable.cpp new file mode 100644 index 000000000..e47a0b148 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerTable.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerTable.hpp" + +#include +#include + +#include "PhaseTapChangerTablePoint.hpp" +#include "PhaseTapChangerTabular.hpp" + +using namespace CIMPP; + +PhaseTapChangerTable::PhaseTapChangerTable() {}; +PhaseTapChangerTable::~PhaseTapChangerTable() {}; + + + + + +bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass*, BaseClass*); +bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTablePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->PhaseTapChangerTablePoint.begin(), element->PhaseTapChangerTablePoint.end(), element2) == element->PhaseTapChangerTablePoint.end()) + { + element->PhaseTapChangerTablePoint.push_back(element2); + return assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass*, BaseClass*); +bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTabular* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->PhaseTapChangerTabular.begin(), element->PhaseTapChangerTabular.end(), element2) == element->PhaseTapChangerTabular.end()) + { + element->PhaseTapChangerTabular.push_back(element2); + return assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PhaseTapChangerTable::debugName[] = "PhaseTapChangerTable"; +const char* PhaseTapChangerTable::debugString() const +{ + return PhaseTapChangerTable::debugName; +} + +void PhaseTapChangerTable::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable"), &PhaseTapChangerTable_factory)); +} + +void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChangerTable::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner PhaseTapChangerTable::declare() +{ + return BaseClassDefiner(PhaseTapChangerTable::addConstructToMap, PhaseTapChangerTable::addPrimitiveAssignFnsToMap, PhaseTapChangerTable::addClassAssignFnsToMap, PhaseTapChangerTable::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerTable_factory() + { + return new PhaseTapChangerTable; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerTable.hpp b/CGMES_3.0.0/PhaseTapChangerTable.hpp new file mode 100644 index 000000000..7db6e7ccd --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerTable.hpp @@ -0,0 +1,43 @@ +#ifndef PhaseTapChangerTable_H +#define PhaseTapChangerTable_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class PhaseTapChangerTablePoint; + class PhaseTapChangerTabular; + + /* + Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. + */ + class PhaseTapChangerTable : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerTable_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp b/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp new file mode 100644 index 000000000..ac94e617a --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerTablePoint.hpp" + +#include +#include + +#include "PhaseTapChangerTable.hpp" +#include "AngleDegrees.hpp" + +using namespace CIMPP; + +PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {}; +PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {}; + + + +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) +{ + PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PhaseTapChangerTable != element2) + { + element->PhaseTapChangerTable = element2; + return assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PhaseTapChangerTablePoint::debugName[] = "PhaseTapChangerTablePoint"; +const char* PhaseTapChangerTablePoint::debugString() const +{ + return PhaseTapChangerTablePoint::debugName; +} + +void PhaseTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PhaseTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable"), &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable)); +} + +const BaseClassDefiner PhaseTapChangerTablePoint::declare() +{ + return BaseClassDefiner(PhaseTapChangerTablePoint::addConstructToMap, PhaseTapChangerTablePoint::addPrimitiveAssignFnsToMap, PhaseTapChangerTablePoint::addClassAssignFnsToMap, PhaseTapChangerTablePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerTablePoint_factory() + { + return new PhaseTapChangerTablePoint; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp b/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp new file mode 100644 index 000000000..8f1251e6b --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp @@ -0,0 +1,43 @@ +#ifndef PhaseTapChangerTablePoint_H +#define PhaseTapChangerTablePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChangerTablePoint.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" + +namespace CIMPP +{ + class PhaseTapChangerTable; + + /* + Describes each tap step in the phase tap changer tabular curve. + */ + class PhaseTapChangerTablePoint : public TapChangerTablePoint + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerTablePoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhaseTapChangerTabular.cpp b/CGMES_3.0.0/PhaseTapChangerTabular.cpp new file mode 100644 index 000000000..a270307cc --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerTabular.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhaseTapChangerTabular.hpp" + +#include +#include + +#include "PhaseTapChangerTable.hpp" + +using namespace CIMPP; + +PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {}; +PhaseTapChangerTabular::~PhaseTapChangerTabular() {}; + + + + +bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass*, BaseClass*); +bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PhaseTapChangerTable != element2) + { + element->PhaseTapChangerTable = element2; + return assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PhaseTapChangerTabular::debugName[] = "PhaseTapChangerTabular"; +const char* PhaseTapChangerTabular::debugString() const +{ + return PhaseTapChangerTabular::debugName; +} + +void PhaseTapChangerTabular::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular"), &PhaseTapChangerTabular_factory)); +} + +void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhaseTapChangerTabular::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular.PhaseTapChangerTable"), &assign_PhaseTapChangerTabular_PhaseTapChangerTable)); +} + +const BaseClassDefiner PhaseTapChangerTabular::declare() +{ + return BaseClassDefiner(PhaseTapChangerTabular::addConstructToMap, PhaseTapChangerTabular::addPrimitiveAssignFnsToMap, PhaseTapChangerTabular::addClassAssignFnsToMap, PhaseTapChangerTabular::debugName); +} + +namespace CIMPP +{ + BaseClass* PhaseTapChangerTabular_factory() + { + return new PhaseTapChangerTabular; + } +} diff --git a/CGMES_3.0.0/PhaseTapChangerTabular.hpp b/CGMES_3.0.0/PhaseTapChangerTabular.hpp new file mode 100644 index 000000000..344dbc4e5 --- /dev/null +++ b/CGMES_3.0.0/PhaseTapChangerTabular.hpp @@ -0,0 +1,41 @@ +#ifndef PhaseTapChangerTabular_H +#define PhaseTapChangerTabular_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PhaseTapChanger.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PhaseTapChangerTabular : public PhaseTapChanger + { + public: + /* constructor initialising all attributes to null */ + PhaseTapChangerTabular(); + ~PhaseTapChangerTabular() override; + + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The phase tap changer table for this phase tap changer. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhaseTapChangerTabular_factory(); +} +#endif diff --git a/CGMES_3.0.0/PhotoVoltaicUnit.cpp b/CGMES_3.0.0/PhotoVoltaicUnit.cpp new file mode 100644 index 000000000..cba9c13b3 --- /dev/null +++ b/CGMES_3.0.0/PhotoVoltaicUnit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PhotoVoltaicUnit.hpp" + +#include +#include + + +using namespace CIMPP; + +PhotoVoltaicUnit::PhotoVoltaicUnit() {}; +PhotoVoltaicUnit::~PhotoVoltaicUnit() {}; + + + +const char PhotoVoltaicUnit::debugName[] = "PhotoVoltaicUnit"; +const char* PhotoVoltaicUnit::debugString() const +{ + return PhotoVoltaicUnit::debugName; +} + +void PhotoVoltaicUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PhotoVoltaicUnit"), &PhotoVoltaicUnit_factory)); +} + +void PhotoVoltaicUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PhotoVoltaicUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PhotoVoltaicUnit::declare() +{ + return BaseClassDefiner(PhotoVoltaicUnit::addConstructToMap, PhotoVoltaicUnit::addPrimitiveAssignFnsToMap, PhotoVoltaicUnit::addClassAssignFnsToMap, PhotoVoltaicUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* PhotoVoltaicUnit_factory() + { + return new PhotoVoltaicUnit; + } +} diff --git a/CGMES_3.0.0/PhotoVoltaicUnit.hpp b/CGMES_3.0.0/PhotoVoltaicUnit.hpp new file mode 100644 index 000000000..5abfb7b2c --- /dev/null +++ b/CGMES_3.0.0/PhotoVoltaicUnit.hpp @@ -0,0 +1,39 @@ +#ifndef PhotoVoltaicUnit_H +#define PhotoVoltaicUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerElectronicsUnit.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A photovoltaic device or an aggregation of such devices. + */ + class PhotoVoltaicUnit : public PowerElectronicsUnit + { + public: + /* constructor initialising all attributes to null */ + PhotoVoltaicUnit(); + ~PhotoVoltaicUnit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PhotoVoltaicUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/PositionPoint.cpp b/CGMES_3.0.0/PositionPoint.cpp new file mode 100644 index 000000000..541093398 --- /dev/null +++ b/CGMES_3.0.0/PositionPoint.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PositionPoint.hpp" + +#include +#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() {}; + + + +bool assign_PositionPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sequenceNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PositionPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->xPosition = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PositionPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->yPosition = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PositionPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + { + element->zPosition = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + +const char PositionPoint::debugName[] = "PositionPoint"; +const char* PositionPoint::debugString() const +{ + return PositionPoint::debugName; +} + +void PositionPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PositionPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PositionPoint.Location"), &assign_PositionPoint_Location)); +} + +const BaseClassDefiner PositionPoint::declare() +{ + return BaseClassDefiner(PositionPoint::addConstructToMap, PositionPoint::addPrimitiveAssignFnsToMap, PositionPoint::addClassAssignFnsToMap, PositionPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* PositionPoint_factory() + { + return new PositionPoint; + } +} diff --git a/CGMES_3.0.0/PositionPoint.hpp b/CGMES_3.0.0/PositionPoint.hpp new file mode 100644 index 000000000..0c30cb044 --- /dev/null +++ b/CGMES_3.0.0/PositionPoint.hpp @@ -0,0 +1,47 @@ +#ifndef PositionPoint_H +#define PositionPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" +#include "String.hpp" + +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). + */ + class PositionPoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PositionPoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/PostLineSensor.cpp b/CGMES_3.0.0/PostLineSensor.cpp new file mode 100644 index 000000000..cdd1ef69d --- /dev/null +++ b/CGMES_3.0.0/PostLineSensor.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PostLineSensor.hpp" + +#include +#include + + +using namespace CIMPP; + +PostLineSensor::PostLineSensor() {}; +PostLineSensor::~PostLineSensor() {}; + + + +const char PostLineSensor::debugName[] = "PostLineSensor"; +const char* PostLineSensor::debugString() const +{ + return PostLineSensor::debugName; +} + +void PostLineSensor::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PostLineSensor"), &PostLineSensor_factory)); +} + +void PostLineSensor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PostLineSensor::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PostLineSensor::declare() +{ + return BaseClassDefiner(PostLineSensor::addConstructToMap, PostLineSensor::addPrimitiveAssignFnsToMap, PostLineSensor::addClassAssignFnsToMap, PostLineSensor::debugName); +} + +namespace CIMPP +{ + BaseClass* PostLineSensor_factory() + { + return new PostLineSensor; + } +} diff --git a/CGMES_3.0.0/PostLineSensor.hpp b/CGMES_3.0.0/PostLineSensor.hpp new file mode 100644 index 000000000..0bb810b5e --- /dev/null +++ b/CGMES_3.0.0/PostLineSensor.hpp @@ -0,0 +1,39 @@ +#ifndef PostLineSensor_H +#define PostLineSensor_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Sensor.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A sensor used mainly in overhead distribution networks as the source of both current and voltage measurements. + */ + class PostLineSensor : public Sensor + { + public: + /* constructor initialising all attributes to null */ + PostLineSensor(); + ~PostLineSensor() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PostLineSensor_factory(); +} +#endif diff --git a/CGMES_3.0.0/PotentialTransformer.cpp b/CGMES_3.0.0/PotentialTransformer.cpp new file mode 100644 index 000000000..5a2e9289c --- /dev/null +++ b/CGMES_3.0.0/PotentialTransformer.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PotentialTransformer.hpp" + +#include +#include + + +using namespace CIMPP; + +PotentialTransformer::PotentialTransformer() {}; +PotentialTransformer::~PotentialTransformer() {}; + + + +const char PotentialTransformer::debugName[] = "PotentialTransformer"; +const char* PotentialTransformer::debugString() const +{ + return PotentialTransformer::debugName; +} + +void PotentialTransformer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PotentialTransformer"), &PotentialTransformer_factory)); +} + +void PotentialTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PotentialTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PotentialTransformer::declare() +{ + return BaseClassDefiner(PotentialTransformer::addConstructToMap, PotentialTransformer::addPrimitiveAssignFnsToMap, PotentialTransformer::addClassAssignFnsToMap, PotentialTransformer::debugName); +} + +namespace CIMPP +{ + BaseClass* PotentialTransformer_factory() + { + return new PotentialTransformer; + } +} diff --git a/CGMES_3.0.0/PotentialTransformer.hpp b/CGMES_3.0.0/PotentialTransformer.hpp new file mode 100644 index 000000000..ac1b69f94 --- /dev/null +++ b/CGMES_3.0.0/PotentialTransformer.hpp @@ -0,0 +1,39 @@ +#ifndef PotentialTransformer_H +#define PotentialTransformer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Sensor.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PotentialTransformer : public Sensor + { + public: + /* constructor initialising all attributes to null */ + PotentialTransformer(); + ~PotentialTransformer() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PotentialTransformer_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerElectronicsConnection.cpp b/CGMES_3.0.0/PowerElectronicsConnection.cpp new file mode 100644 index 000000000..579dc20e0 --- /dev/null +++ b/CGMES_3.0.0/PowerElectronicsConnection.cpp @@ -0,0 +1,183 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerElectronicsConnection.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_PowerElectronicsConnection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerElectronicsConnection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerElectronicsConnection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerElectronicsConnection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerElectronicsConnection_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerElectronicsConnection_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass*, BaseClass*); +bool assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerElectronicsConnection* 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_PowerElectronicsConnection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + +const char PowerElectronicsConnection::debugName[] = "PowerElectronicsConnection"; +const char* PowerElectronicsConnection::debugString() const +{ + return PowerElectronicsConnection::debugName; +} + +void PowerElectronicsConnection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner PowerElectronicsConnection::declare() +{ + return BaseClassDefiner(PowerElectronicsConnection::addConstructToMap, PowerElectronicsConnection::addPrimitiveAssignFnsToMap, PowerElectronicsConnection::addClassAssignFnsToMap, PowerElectronicsConnection::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerElectronicsConnection_factory() + { + return new PowerElectronicsConnection; + } +} diff --git a/CGMES_3.0.0/PowerElectronicsConnection.hpp b/CGMES_3.0.0/PowerElectronicsConnection.hpp new file mode 100644 index 000000000..b6303d5d4 --- /dev/null +++ b/CGMES_3.0.0/PowerElectronicsConnection.hpp @@ -0,0 +1,53 @@ +#ifndef PowerElectronicsConnection_H +#define PowerElectronicsConnection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ApparentPower.hpp" +#include "ReactivePower.hpp" +#include "Voltage.hpp" + +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. + */ + class PowerElectronicsConnection : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerElectronicsConnection_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerElectronicsUnit.cpp b/CGMES_3.0.0/PowerElectronicsUnit.cpp new file mode 100644 index 000000000..4e45d4b0d --- /dev/null +++ b/CGMES_3.0.0/PowerElectronicsUnit.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerElectronicsUnit.hpp" + +#include +#include + +#include "PowerElectronicsConnection.hpp" +#include "ActivePower.hpp" +#include "ActivePower.hpp" + +using namespace CIMPP; + +PowerElectronicsUnit::PowerElectronicsUnit() : PowerElectronicsConnection(nullptr) {}; +PowerElectronicsUnit::~PowerElectronicsUnit() {}; + + + +bool assign_PowerElectronicsUnit_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerElectronicsUnit_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minP; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass*, BaseClass*); +bool assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1); + PowerElectronicsConnection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerElectronicsConnection != element2) + { + element->PowerElectronicsConnection = element2; + return assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char PowerElectronicsUnit::debugName[] = "PowerElectronicsUnit"; +const char* PowerElectronicsUnit::debugString() const +{ + return PowerElectronicsUnit::debugName; +} + +void PowerElectronicsUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerElectronicsUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsUnit.PowerElectronicsConnection"), &assign_PowerElectronicsUnit_PowerElectronicsConnection)); +} + +const BaseClassDefiner PowerElectronicsUnit::declare() +{ + return BaseClassDefiner(PowerElectronicsUnit::addConstructToMap, PowerElectronicsUnit::addPrimitiveAssignFnsToMap, PowerElectronicsUnit::addClassAssignFnsToMap, PowerElectronicsUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerElectronicsUnit_factory() + { + return new PowerElectronicsUnit; + } +} diff --git a/CGMES_3.0.0/PowerElectronicsUnit.hpp b/CGMES_3.0.0/PowerElectronicsUnit.hpp new file mode 100644 index 000000000..792136c38 --- /dev/null +++ b/CGMES_3.0.0/PowerElectronicsUnit.hpp @@ -0,0 +1,44 @@ +#ifndef PowerElectronicsUnit_H +#define PowerElectronicsUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Equipment.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" + +namespace CIMPP +{ + class PowerElectronicsConnection; + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerElectronicsUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerElectronicsWindUnit.cpp b/CGMES_3.0.0/PowerElectronicsWindUnit.cpp new file mode 100644 index 000000000..ca2b39789 --- /dev/null +++ b/CGMES_3.0.0/PowerElectronicsWindUnit.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerElectronicsWindUnit.hpp" + +#include +#include + + +using namespace CIMPP; + +PowerElectronicsWindUnit::PowerElectronicsWindUnit() {}; +PowerElectronicsWindUnit::~PowerElectronicsWindUnit() {}; + + + +const char PowerElectronicsWindUnit::debugName[] = "PowerElectronicsWindUnit"; +const char* PowerElectronicsWindUnit::debugString() const +{ + return PowerElectronicsWindUnit::debugName; +} + +void PowerElectronicsWindUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PowerElectronicsWindUnit"), &PowerElectronicsWindUnit_factory)); +} + +void PowerElectronicsWindUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PowerElectronicsWindUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PowerElectronicsWindUnit::declare() +{ + return BaseClassDefiner(PowerElectronicsWindUnit::addConstructToMap, PowerElectronicsWindUnit::addPrimitiveAssignFnsToMap, PowerElectronicsWindUnit::addClassAssignFnsToMap, PowerElectronicsWindUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerElectronicsWindUnit_factory() + { + return new PowerElectronicsWindUnit; + } +} diff --git a/CGMES_3.0.0/PowerElectronicsWindUnit.hpp b/CGMES_3.0.0/PowerElectronicsWindUnit.hpp new file mode 100644 index 000000000..bb716626d --- /dev/null +++ b/CGMES_3.0.0/PowerElectronicsWindUnit.hpp @@ -0,0 +1,39 @@ +#ifndef PowerElectronicsWindUnit_H +#define PowerElectronicsWindUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerElectronicsUnit.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PowerElectronicsWindUnit : public PowerElectronicsUnit + { + public: + /* constructor initialising all attributes to null */ + PowerElectronicsWindUnit(); + ~PowerElectronicsWindUnit() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerElectronicsWindUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerSystemResource.cpp b/CGMES_3.0.0/PowerSystemResource.cpp new file mode 100644 index 000000000..26147d3d1 --- /dev/null +++ b/CGMES_3.0.0/PowerSystemResource.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerSystemResource.hpp" + +#include +#include + +#include "Control.hpp" +#include "Location.hpp" +#include "Measurement.hpp" + +using namespace CIMPP; + +PowerSystemResource::PowerSystemResource() : Location(nullptr) {}; +PowerSystemResource::~PowerSystemResource() {}; + + + + + + +bool assign_Control_PowerSystemResource(BaseClass*, BaseClass*); +bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemResource* element = dynamic_cast(BaseClass_ptr1); + Control* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Controls.begin(), element->Controls.end(), element2) == element->Controls.end()) + { + element->Controls.push_back(element2); + return assign_Control_PowerSystemResource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Location_PowerSystemResources(BaseClass*, BaseClass*); +bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemResource* 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_PowerSystemResources(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Measurement_PowerSystemResource(BaseClass*, BaseClass*); +bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemResource* element = dynamic_cast(BaseClass_ptr1); + Measurement* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Measurements.begin(), element->Measurements.end(), element2) == element->Measurements.end()) + { + element->Measurements.push_back(element2); + return assign_Measurement_PowerSystemResource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PowerSystemResource::debugName[] = "PowerSystemResource"; +const char* PowerSystemResource::debugString() const +{ + return PowerSystemResource::debugName; +} + +void PowerSystemResource::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PowerSystemResource"), &PowerSystemResource_factory)); +} + +void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void PowerSystemResource::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner PowerSystemResource::declare() +{ + return BaseClassDefiner(PowerSystemResource::addConstructToMap, PowerSystemResource::addPrimitiveAssignFnsToMap, PowerSystemResource::addClassAssignFnsToMap, PowerSystemResource::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerSystemResource_factory() + { + return new PowerSystemResource; + } +} diff --git a/CGMES_3.0.0/PowerSystemResource.hpp b/CGMES_3.0.0/PowerSystemResource.hpp new file mode 100644 index 000000000..20f9b6432 --- /dev/null +++ b/CGMES_3.0.0/PowerSystemResource.hpp @@ -0,0 +1,45 @@ +#ifndef PowerSystemResource_H +#define PowerSystemResource_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Control; + 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. + */ + class PowerSystemResource : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerSystemResource_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp b/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp new file mode 100644 index 000000000..11444bd4f --- /dev/null +++ b/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerSystemStabilizerDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {}; +PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); +bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); +bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RemoteInputSignal.begin(), element->RemoteInputSignal.end(), element2) == element->RemoteInputSignal.end()) + { + element->RemoteInputSignal.push_back(element2); + return assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char PowerSystemStabilizerDynamics::debugName[] = "PowerSystemStabilizerDynamics"; +const char* PowerSystemStabilizerDynamics::debugString() const +{ + return PowerSystemStabilizerDynamics::debugName; +} + +void PowerSystemStabilizerDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics"), &PowerSystemStabilizerDynamics_factory)); +} + +void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner PowerSystemStabilizerDynamics::declare() +{ + return BaseClassDefiner(PowerSystemStabilizerDynamics::addConstructToMap, PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap, PowerSystemStabilizerDynamics::addClassAssignFnsToMap, PowerSystemStabilizerDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerSystemStabilizerDynamics_factory() + { + return new PowerSystemStabilizerDynamics; + } +} diff --git a/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp b/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp new file mode 100644 index 000000000..972617cf3 --- /dev/null +++ b/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef PowerSystemStabilizerDynamics_H +#define PowerSystemStabilizerDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class PowerSystemStabilizerDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerSystemStabilizerDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp new file mode 100644 index 000000000..06d039cf4 --- /dev/null +++ b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerSystemStabilizerUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {}; +PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {}; + + + +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) +{ + PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char PowerSystemStabilizerUserDefined::debugName[] = "PowerSystemStabilizerUserDefined"; +const char* PowerSystemStabilizerUserDefined::debugString() const +{ + return PowerSystemStabilizerUserDefined::debugName; +} + +void PowerSystemStabilizerUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerSystemStabilizerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics"), &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner PowerSystemStabilizerUserDefined::declare() +{ + return BaseClassDefiner(PowerSystemStabilizerUserDefined::addConstructToMap, PowerSystemStabilizerUserDefined::addPrimitiveAssignFnsToMap, PowerSystemStabilizerUserDefined::addClassAssignFnsToMap, PowerSystemStabilizerUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerSystemStabilizerUserDefined_factory() + { + return new PowerSystemStabilizerUserDefined; + } +} diff --git a/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp new file mode 100644 index 000000000..42daeef0c --- /dev/null +++ b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef PowerSystemStabilizerUserDefined_H +#define PowerSystemStabilizerUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Power system stabilizer function block whose dynamic behaviour is described by a user-defined model. + */ + class PowerSystemStabilizerUserDefined : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerSystemStabilizerUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerTransformer.cpp b/CGMES_3.0.0/PowerTransformer.cpp new file mode 100644 index 000000000..1eda73bf1 --- /dev/null +++ b/CGMES_3.0.0/PowerTransformer.cpp @@ -0,0 +1,163 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerTransformer.hpp" + +#include +#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() {}; + + + +bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->beforeShCircuitHighestOperatingCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->beforeShCircuitHighestOperatingVoltage; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->beforeShortCircuitAnglePf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->highSideMinOperatingU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isPartOfGeneratorUnit; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operationalValuesConsidered; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + + +const char PowerTransformer::debugName[] = "PowerTransformer"; +const char* PowerTransformer::debugString() const +{ + return PowerTransformer::debugName; +} + +void PowerTransformer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.PowerTransformerEnd"), &assign_PowerTransformer_PowerTransformerEnd)); +} + +const BaseClassDefiner PowerTransformer::declare() +{ + return BaseClassDefiner(PowerTransformer::addConstructToMap, PowerTransformer::addPrimitiveAssignFnsToMap, PowerTransformer::addClassAssignFnsToMap, PowerTransformer::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerTransformer_factory() + { + return new PowerTransformer; + } +} diff --git a/CGMES_3.0.0/PowerTransformer.hpp b/CGMES_3.0.0/PowerTransformer.hpp new file mode 100644 index 000000000..9c0122679 --- /dev/null +++ b/CGMES_3.0.0/PowerTransformer.hpp @@ -0,0 +1,51 @@ +#ifndef PowerTransformer_H +#define PowerTransformer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Voltage.hpp" + +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. + */ + class PowerTransformer : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerTransformer_factory(); +} +#endif diff --git a/CGMES_3.0.0/PowerTransformerEnd.cpp b/CGMES_3.0.0/PowerTransformerEnd.cpp new file mode 100644 index 000000000..e103ba044 --- /dev/null +++ b/CGMES_3.0.0/PowerTransformerEnd.cpp @@ -0,0 +1,259 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PowerTransformerEnd.hpp" + +#include +#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() {}; + + + +bool assign_PowerTransformerEnd_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_connectionKind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->connectionKind; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->phaseAngleClock; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PowerTransformerEnd_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + +const char PowerTransformerEnd::debugName[] = "PowerTransformerEnd"; +const char* PowerTransformerEnd::debugString() const +{ + return PowerTransformerEnd::debugName; +} + +void PowerTransformerEnd::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PowerTransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.PowerTransformer"), &assign_PowerTransformerEnd_PowerTransformer)); +} + +const BaseClassDefiner PowerTransformerEnd::declare() +{ + return BaseClassDefiner(PowerTransformerEnd::addConstructToMap, PowerTransformerEnd::addPrimitiveAssignFnsToMap, PowerTransformerEnd::addClassAssignFnsToMap, PowerTransformerEnd::debugName); +} + +namespace CIMPP +{ + BaseClass* PowerTransformerEnd_factory() + { + return new PowerTransformerEnd; + } +} diff --git a/CGMES_3.0.0/PowerTransformerEnd.hpp b/CGMES_3.0.0/PowerTransformerEnd.hpp new file mode 100644 index 000000000..e6464a68e --- /dev/null +++ b/CGMES_3.0.0/PowerTransformerEnd.hpp @@ -0,0 +1,61 @@ +#ifndef PowerTransformerEnd_H +#define PowerTransformerEnd_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TransformerEnd.hpp" +#include "BaseClassDefiner.hpp" +#include "ApparentPower.hpp" +#include "Conductance.hpp" +#include "Integer.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Susceptance.hpp" +#include "Voltage.hpp" +#include "WindingConnection.hpp" + +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). + */ + class PowerTransformerEnd : public TransformerEnd + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PowerTransformerEnd_factory(); +} +#endif diff --git a/CGMES_3.0.0/ProprietaryParameterDynamics.cpp b/CGMES_3.0.0/ProprietaryParameterDynamics.cpp new file mode 100644 index 000000000..06bc5ca81 --- /dev/null +++ b/CGMES_3.0.0/ProprietaryParameterDynamics.cpp @@ -0,0 +1,531 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ProprietaryParameterDynamics.hpp" + +#include +#include + +#include "AsynchronousMachineUserDefined.hpp" +#include "CSCUserDefined.hpp" +#include "DiscontinuousExcitationControlUserDefined.hpp" +#include "ExcitationSystemUserDefined.hpp" +#include "LoadUserDefined.hpp" +#include "MechanicalLoadUserDefined.hpp" +#include "OverexcitationLimiterUserDefined.hpp" +#include "PFVArControllerType1UserDefined.hpp" +#include "PFVArControllerType2UserDefined.hpp" +#include "PowerSystemStabilizerUserDefined.hpp" +#include "SVCUserDefined.hpp" +#include "SynchronousMachineUserDefined.hpp" +#include "TurbineGovernorUserDefined.hpp" +#include "TurbineLoadControllerUserDefined.hpp" +#include "UnderexcitationLimiterUserDefined.hpp" +#include "VSCUserDefined.hpp" +#include "VoltageAdjusterUserDefined.hpp" +#include "VoltageCompensatorUserDefined.hpp" +#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() {}; + + + + + + + + + + + + + + + + + + + + + + + +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) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachineUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachineUserDefined != element2) + { + element->AsynchronousMachineUserDefined = element2; + return assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_CSCUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_CSCUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + CSCUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CSCUserDefined != element2) + { + element->CSCUserDefined = element2; + return assign_CSCUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + DiscontinuousExcitationControlUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscontinuousExcitationControlUserDefined != element2) + { + element->DiscontinuousExcitationControlUserDefined = element2; + return assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemUserDefined != element2) + { + element->ExcitationSystemUserDefined = element2; + return assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + LoadUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadUserDefined != element2) + { + element->LoadUserDefined = element2; + return assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + MechanicalLoadUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MechanicalLoadUserDefined != element2) + { + element->MechanicalLoadUserDefined = element2; + return assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + OverexcitationLimiterUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->OverexcitationLimiterUserDefined != element2) + { + element->OverexcitationLimiterUserDefined = element2; + return assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1UserDefined != element2) + { + element->PFVArControllerType1UserDefined = element2; + return assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType2UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType2UserDefined != element2) + { + element->PFVArControllerType2UserDefined = element2; + return assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + PowerSystemStabilizerUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemStabilizerUserDefined != element2) + { + element->PowerSystemStabilizerUserDefined = element2; + return assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SVCUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_SVCUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + SVCUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SVCUserDefined != element2) + { + element->SVCUserDefined = element2; + return assign_SVCUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachineUserDefined != element2) + { + element->SynchronousMachineUserDefined = element2; + return assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineGovernorUserDefined != element2) + { + element->TurbineGovernorUserDefined = element2; + return assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineLoadControllerUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineLoadControllerUserDefined != element2) + { + element->TurbineLoadControllerUserDefined = element2; + return assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + UnderexcitationLimiterUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->UnderexcitationLimiterUserDefined != element2) + { + element->UnderexcitationLimiterUserDefined = element2; + return assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VSCUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_VSCUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + VSCUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VSCUserDefined != element2) + { + element->VSCUserDefined = element2; + return assign_VSCUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageAdjusterUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageAdjusterUserDefined != element2) + { + element->VoltageAdjusterUserDefined = element2; + return assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + VoltageCompensatorUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageCompensatorUserDefined != element2) + { + element->VoltageCompensatorUserDefined = element2; + return assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + WindPlantUserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantUserDefined != element2) + { + element->WindPlantUserDefined = element2; + return assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + WindType1or2UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindType1or2UserDefined != element2) + { + element->WindType1or2UserDefined = element2; + return assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); +bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + WindType3or4UserDefined* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindType3or4UserDefined != element2) + { + element->WindType3or4UserDefined = element2; + return assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char ProprietaryParameterDynamics::debugName[] = "ProprietaryParameterDynamics"; +const char* ProprietaryParameterDynamics::debugString() const +{ + return ProprietaryParameterDynamics::debugName; +} + +void ProprietaryParameterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner ProprietaryParameterDynamics::declare() +{ + return BaseClassDefiner(ProprietaryParameterDynamics::addConstructToMap, ProprietaryParameterDynamics::addPrimitiveAssignFnsToMap, ProprietaryParameterDynamics::addClassAssignFnsToMap, ProprietaryParameterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* ProprietaryParameterDynamics_factory() + { + return new ProprietaryParameterDynamics; + } +} diff --git a/CGMES_3.0.0/ProprietaryParameterDynamics.hpp b/CGMES_3.0.0/ProprietaryParameterDynamics.hpp new file mode 100644 index 000000000..232ce0634 --- /dev/null +++ b/CGMES_3.0.0/ProprietaryParameterDynamics.hpp @@ -0,0 +1,88 @@ +#ifndef ProprietaryParameterDynamics_H +#define ProprietaryParameterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class AsynchronousMachineUserDefined; + class CSCUserDefined; + class DiscontinuousExcitationControlUserDefined; + class ExcitationSystemUserDefined; + class LoadUserDefined; + class MechanicalLoadUserDefined; + class OverexcitationLimiterUserDefined; + class PFVArControllerType1UserDefined; + class PFVArControllerType2UserDefined; + class PowerSystemStabilizerUserDefined; + class SVCUserDefined; + class SynchronousMachineUserDefined; + class TurbineGovernorUserDefined; + class TurbineLoadControllerUserDefined; + class UnderexcitationLimiterUserDefined; + class VSCUserDefined; + class VoltageAdjusterUserDefined; + class VoltageCompensatorUserDefined; + class WindPlantUserDefined; + 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. + */ + class ProprietaryParameterDynamics : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ProprietaryParameterDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/ProtectedSwitch.cpp b/CGMES_3.0.0/ProtectedSwitch.cpp new file mode 100644 index 000000000..f95614e29 --- /dev/null +++ b/CGMES_3.0.0/ProtectedSwitch.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ProtectedSwitch.hpp" + +#include +#include + + +using namespace CIMPP; + +ProtectedSwitch::ProtectedSwitch() {}; +ProtectedSwitch::~ProtectedSwitch() {}; + + + +const char ProtectedSwitch::debugName[] = "ProtectedSwitch"; +const char* ProtectedSwitch::debugString() const +{ + return ProtectedSwitch::debugName; +} + +void ProtectedSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ProtectedSwitch"), &ProtectedSwitch_factory)); +} + +void ProtectedSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ProtectedSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ProtectedSwitch::declare() +{ + return BaseClassDefiner(ProtectedSwitch::addConstructToMap, ProtectedSwitch::addPrimitiveAssignFnsToMap, ProtectedSwitch::addClassAssignFnsToMap, ProtectedSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* ProtectedSwitch_factory() + { + return new ProtectedSwitch; + } +} diff --git a/CGMES_3.0.0/ProtectedSwitch.hpp b/CGMES_3.0.0/ProtectedSwitch.hpp new file mode 100644 index 000000000..8d2eaa266 --- /dev/null +++ b/CGMES_3.0.0/ProtectedSwitch.hpp @@ -0,0 +1,39 @@ +#ifndef ProtectedSwitch_H +#define ProtectedSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Switch.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. + */ + class ProtectedSwitch : public Switch + { + public: + /* constructor initialising all attributes to null */ + ProtectedSwitch(); + ~ProtectedSwitch() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ProtectedSwitch_factory(); +} +#endif diff --git a/CGMES_3.0.0/Pss1.cpp b/CGMES_3.0.0/Pss1.cpp new file mode 100644 index 000000000..5c00699b2 --- /dev/null +++ b/CGMES_3.0.0/Pss1.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss1.hpp" + +#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() {}; + + +bool assign_Pss1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_komega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->komega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadat; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char Pss1::debugName[] = "Pss1"; +const char* Pss1::debugString() const +{ + return Pss1::debugName; +} + +void Pss1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss1::declare() +{ + return BaseClassDefiner(Pss1::addConstructToMap, Pss1::addPrimitiveAssignFnsToMap, Pss1::addClassAssignFnsToMap, Pss1::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss1_factory() + { + return new Pss1; + } +} diff --git a/CGMES_3.0.0/Pss1.hpp b/CGMES_3.0.0/Pss1.hpp new file mode 100644 index 000000000..575a68578 --- /dev/null +++ b/CGMES_3.0.0/Pss1.hpp @@ -0,0 +1,58 @@ +#ifndef Pss1_H +#define Pss1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Italian PSS with three inputs (speed, frequency, power). + */ + class Pss1 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss1_factory(); +} +#endif diff --git a/CGMES_3.0.0/Pss1A.cpp b/CGMES_3.0.0/Pss1A.cpp new file mode 100644 index 000000000..ee79e3569 --- /dev/null +++ b/CGMES_3.0.0/Pss1A.cpp @@ -0,0 +1,399 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss1A.hpp" + +#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() {}; + + +bool assign_Pss1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignalType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_tdelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdelay; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char Pss1A::debugName[] = "Pss1A"; +const char* Pss1A::debugString() const +{ + return Pss1A::debugName; +} + +void Pss1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss1A::declare() +{ + return BaseClassDefiner(Pss1A::addConstructToMap, Pss1A::addPrimitiveAssignFnsToMap, Pss1A::addClassAssignFnsToMap, Pss1A::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss1A_factory() + { + return new Pss1A; + } +} diff --git a/CGMES_3.0.0/Pss1A.hpp b/CGMES_3.0.0/Pss1A.hpp new file mode 100644 index 000000000..1b4be1681 --- /dev/null +++ b/CGMES_3.0.0/Pss1A.hpp @@ -0,0 +1,65 @@ +#ifndef Pss1A_H +#define Pss1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class Pss1A : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/Pss2B.cpp b/CGMES_3.0.0/Pss2B.cpp new file mode 100644 index 000000000..0c14c0b4c --- /dev/null +++ b/CGMES_3.0.0/Pss2B.cpp @@ -0,0 +1,511 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss2B.hpp" + +#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() {}; + + +bool assign_Pss2B_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ks4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->n; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char Pss2B::debugName[] = "Pss2B"; +const char* Pss2B::debugString() const +{ + return Pss2B::debugName; +} + +void Pss2B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss2B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss2B::declare() +{ + return BaseClassDefiner(Pss2B::addConstructToMap, Pss2B::addPrimitiveAssignFnsToMap, Pss2B::addClassAssignFnsToMap, Pss2B::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss2B_factory() + { + return new Pss2B; + } +} diff --git a/CGMES_3.0.0/Pss2B.hpp b/CGMES_3.0.0/Pss2B.hpp new file mode 100644 index 000000000..d3afcc14d --- /dev/null +++ b/CGMES_3.0.0/Pss2B.hpp @@ -0,0 +1,72 @@ +#ifndef Pss2B_H +#define Pss2B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Modified IEEE PSS2B. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). + */ + class Pss2B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss2B_factory(); +} +#endif diff --git a/CGMES_3.0.0/Pss2ST.cpp b/CGMES_3.0.0/Pss2ST.cpp new file mode 100644 index 000000000..b29e480e2 --- /dev/null +++ b/CGMES_3.0.0/Pss2ST.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss2ST.hpp" + +#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() {}; + + +bool assign_Pss2ST_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_lsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_lsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss2ST_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char Pss2ST::debugName[] = "Pss2ST"; +const char* Pss2ST::debugString() const +{ + return Pss2ST::debugName; +} + +void Pss2ST::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss2ST::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss2ST::declare() +{ + return BaseClassDefiner(Pss2ST::addConstructToMap, Pss2ST::addPrimitiveAssignFnsToMap, Pss2ST::addClassAssignFnsToMap, Pss2ST::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss2ST_factory() + { + return new Pss2ST; + } +} diff --git a/CGMES_3.0.0/Pss2ST.hpp b/CGMES_3.0.0/Pss2ST.hpp new file mode 100644 index 000000000..ef0c0de81 --- /dev/null +++ b/CGMES_3.0.0/Pss2ST.hpp @@ -0,0 +1,60 @@ +#ifndef Pss2ST_H +#define Pss2ST_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PTI microprocessor-based stabilizer type 1. + */ + class Pss2ST : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss2ST_factory(); +} +#endif diff --git a/CGMES_3.0.0/Pss5.cpp b/CGMES_3.0.0/Pss5.cpp new file mode 100644 index 000000000..bb1e7e748 --- /dev/null +++ b/CGMES_3.0.0/Pss5.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Pss5.hpp" + +#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() {}; + + +bool assign_Pss5_ctw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ctw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_deadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->deadband; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_isfreq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isfreq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_kpss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpe; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadat; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmn; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Pss5_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char Pss5::debugName[] = "Pss5"; +const char* Pss5::debugString() const +{ + return Pss5::debugName; +} + +void Pss5::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Pss5::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Pss5::declare() +{ + return BaseClassDefiner(Pss5::addConstructToMap, Pss5::addPrimitiveAssignFnsToMap, Pss5::addClassAssignFnsToMap, Pss5::debugName); +} + +namespace CIMPP +{ + BaseClass* Pss5_factory() + { + return new Pss5; + } +} diff --git a/CGMES_3.0.0/Pss5.hpp b/CGMES_3.0.0/Pss5.hpp new file mode 100644 index 000000000..74777b979 --- /dev/null +++ b/CGMES_3.0.0/Pss5.hpp @@ -0,0 +1,60 @@ +#ifndef Pss5_H +#define Pss5_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Detailed Italian PSS. + */ + class Pss5 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Pss5_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssELIN2.cpp b/CGMES_3.0.0/PssELIN2.cpp new file mode 100644 index 000000000..0aa111da9 --- /dev/null +++ b/CGMES_3.0.0/PssELIN2.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssELIN2.hpp" + +#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() {}; + + +bool assign_PssELIN2_apss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->apss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ppss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ppss; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_psslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->psslim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssELIN2_ts6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ts6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssELIN2::debugName[] = "PssELIN2"; +const char* PssELIN2::debugString() const +{ + return PssELIN2::debugName; +} + +void PssELIN2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssELIN2::declare() +{ + return BaseClassDefiner(PssELIN2::addConstructToMap, PssELIN2::addPrimitiveAssignFnsToMap, PssELIN2::addClassAssignFnsToMap, PssELIN2::debugName); +} + +namespace CIMPP +{ + BaseClass* PssELIN2_factory() + { + return new PssELIN2; + } +} diff --git a/CGMES_3.0.0/PssELIN2.hpp b/CGMES_3.0.0/PssELIN2.hpp new file mode 100644 index 000000000..b0d612637 --- /dev/null +++ b/CGMES_3.0.0/PssELIN2.hpp @@ -0,0 +1,52 @@ +#ifndef PssELIN2_H +#define PssELIN2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). + */ + class PssELIN2 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssELIN2_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssIEEE1A.cpp b/CGMES_3.0.0/PssIEEE1A.cpp new file mode 100644 index 000000000..7613a5c13 --- /dev/null +++ b/CGMES_3.0.0/PssIEEE1A.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE1A.hpp" + +#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() {}; + + +bool assign_PssIEEE1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignalType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vrmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char PssIEEE1A::debugName[] = "PssIEEE1A"; +const char* PssIEEE1A::debugString() const +{ + return PssIEEE1A::debugName; +} + +void PssIEEE1A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE1A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE1A::declare() +{ + return BaseClassDefiner(PssIEEE1A::addConstructToMap, PssIEEE1A::addPrimitiveAssignFnsToMap, PssIEEE1A::addClassAssignFnsToMap, PssIEEE1A::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE1A_factory() + { + return new PssIEEE1A; + } +} diff --git a/CGMES_3.0.0/PssIEEE1A.hpp b/CGMES_3.0.0/PssIEEE1A.hpp new file mode 100644 index 000000000..f0614672d --- /dev/null +++ b/CGMES_3.0.0/PssIEEE1A.hpp @@ -0,0 +1,54 @@ +#ifndef PssIEEE1A_H +#define PssIEEE1A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE1A : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE1A_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssIEEE2B.cpp b/CGMES_3.0.0/PssIEEE2B.cpp new file mode 100644 index 000000000..c896be757 --- /dev/null +++ b/CGMES_3.0.0/PssIEEE2B.cpp @@ -0,0 +1,479 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE2B.hpp" + +#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() {}; + + +bool assign_PssIEEE2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->n; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi1min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2max; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsi2min; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char PssIEEE2B::debugName[] = "PssIEEE2B"; +const char* PssIEEE2B::debugString() const +{ + return PssIEEE2B::debugName; +} + +void PssIEEE2B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE2B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE2B::declare() +{ + return BaseClassDefiner(PssIEEE2B::addConstructToMap, PssIEEE2B::addPrimitiveAssignFnsToMap, PssIEEE2B::addClassAssignFnsToMap, PssIEEE2B::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE2B_factory() + { + return new PssIEEE2B; + } +} diff --git a/CGMES_3.0.0/PssIEEE2B.hpp b/CGMES_3.0.0/PssIEEE2B.hpp new file mode 100644 index 000000000..1f9ba13d1 --- /dev/null +++ b/CGMES_3.0.0/PssIEEE2B.hpp @@ -0,0 +1,70 @@ +#ifndef PssIEEE2B_H +#define PssIEEE2B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE2B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE2B_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssIEEE3B.cpp b/CGMES_3.0.0/PssIEEE3B.cpp new file mode 100644 index 000000000..800a4ba2e --- /dev/null +++ b/CGMES_3.0.0/PssIEEE3B.cpp @@ -0,0 +1,319 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE3B.hpp" + +#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() {}; + + +bool assign_PssIEEE3B_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tw3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE3B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + +const char PssIEEE3B::debugName[] = "PssIEEE3B"; +const char* PssIEEE3B::debugString() const +{ + return PssIEEE3B::debugName; +} + +void PssIEEE3B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE3B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE3B::declare() +{ + return BaseClassDefiner(PssIEEE3B::addConstructToMap, PssIEEE3B::addPrimitiveAssignFnsToMap, PssIEEE3B::addClassAssignFnsToMap, PssIEEE3B::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE3B_factory() + { + return new PssIEEE3B; + } +} diff --git a/CGMES_3.0.0/PssIEEE3B.hpp b/CGMES_3.0.0/PssIEEE3B.hpp new file mode 100644 index 000000000..974e2abbc --- /dev/null +++ b/CGMES_3.0.0/PssIEEE3B.hpp @@ -0,0 +1,58 @@ +#ifndef PssIEEE3B_H +#define PssIEEE3B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE3B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE3B_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssIEEE4B.cpp b/CGMES_3.0.0/PssIEEE4B.cpp new file mode 100644 index 000000000..289304fe1 --- /dev/null +++ b/CGMES_3.0.0/PssIEEE4B.cpp @@ -0,0 +1,1119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssIEEE4B.hpp" + +#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() {}; + + +bool assign_PssIEEE4B_bwh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bwh1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_bwh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bwh2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_bwl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bwl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_bwl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->bwl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh17; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kh2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki17; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl17; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_kl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_omeganh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omeganh1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_omeganh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omeganh2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_omeganl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omeganl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_omeganl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omeganl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_th9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->th9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_ti9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ti9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl11; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl12; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_tl9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tl9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vhmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vhmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vlmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vlmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vlmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssIEEE4B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vstmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char PssIEEE4B::debugName[] = "PssIEEE4B"; +const char* PssIEEE4B::debugString() const +{ + return PssIEEE4B::debugName; +} + +void PssIEEE4B::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssIEEE4B::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssIEEE4B::declare() +{ + return BaseClassDefiner(PssIEEE4B::addConstructToMap, PssIEEE4B::addPrimitiveAssignFnsToMap, PssIEEE4B::addClassAssignFnsToMap, PssIEEE4B::debugName); +} + +namespace CIMPP +{ + BaseClass* PssIEEE4B_factory() + { + return new PssIEEE4B; + } +} diff --git a/CGMES_3.0.0/PssIEEE4B.hpp b/CGMES_3.0.0/PssIEEE4B.hpp new file mode 100644 index 000000000..ab299c01a --- /dev/null +++ b/CGMES_3.0.0/PssIEEE4B.hpp @@ -0,0 +1,109 @@ +#ifndef PssIEEE4B_H +#define PssIEEE4B_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssIEEE4B : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssIEEE4B_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssPTIST1.cpp b/CGMES_3.0.0/PssPTIST1.cpp new file mode 100644 index 000000000..c7bd7baeb --- /dev/null +++ b/CGMES_3.0.0/PssPTIST1.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssPTIST1.hpp" + +#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() {}; + + +bool assign_PssPTIST1_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST1_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssPTIST1::debugName[] = "PssPTIST1"; +const char* PssPTIST1::debugString() const +{ + return PssPTIST1::debugName; +} + +void PssPTIST1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssPTIST1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssPTIST1::declare() +{ + return BaseClassDefiner(PssPTIST1::addConstructToMap, PssPTIST1::addPrimitiveAssignFnsToMap, PssPTIST1::addClassAssignFnsToMap, PssPTIST1::debugName); +} + +namespace CIMPP +{ + BaseClass* PssPTIST1_factory() + { + return new PssPTIST1; + } +} diff --git a/CGMES_3.0.0/PssPTIST1.hpp b/CGMES_3.0.0/PssPTIST1.hpp new file mode 100644 index 000000000..e541749f8 --- /dev/null +++ b/CGMES_3.0.0/PssPTIST1.hpp @@ -0,0 +1,52 @@ +#ifndef PssPTIST1_H +#define PssPTIST1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PTI microprocessor-based stabilizer type 1. + */ + class PssPTIST1 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssPTIST1_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssPTIST3.cpp b/CGMES_3.0.0/PssPTIST3.cpp new file mode 100644 index 000000000..93c5b3c4d --- /dev/null +++ b/CGMES_3.0.0/PssPTIST3.cpp @@ -0,0 +1,591 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssPTIST3.hpp" + +#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() {}; + + +bool assign_PssPTIST3_a0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->a5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_al(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->al; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_athres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->athres; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_b5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dtp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_isw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->isw; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_lthres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lthres; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_nav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nav; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_ncl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ncl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_ncr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ncr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssPTIST3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char PssPTIST3::debugName[] = "PssPTIST3"; +const char* PssPTIST3::debugString() const +{ + return PssPTIST3::debugName; +} + +void PssPTIST3::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssPTIST3::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssPTIST3::declare() +{ + return BaseClassDefiner(PssPTIST3::addConstructToMap, PssPTIST3::addPrimitiveAssignFnsToMap, PssPTIST3::addClassAssignFnsToMap, PssPTIST3::debugName); +} + +namespace CIMPP +{ + BaseClass* PssPTIST3_factory() + { + return new PssPTIST3; + } +} diff --git a/CGMES_3.0.0/PssPTIST3.hpp b/CGMES_3.0.0/PssPTIST3.hpp new file mode 100644 index 000000000..4ca51044d --- /dev/null +++ b/CGMES_3.0.0/PssPTIST3.hpp @@ -0,0 +1,77 @@ +#ifndef PssPTIST3_H +#define PssPTIST3_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + PTI microprocessor-based stabilizer type 3. + */ + class PssPTIST3 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssPTIST3_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssRQB.cpp b/CGMES_3.0.0/PssRQB.cpp new file mode 100644 index 000000000..17d99f9af --- /dev/null +++ b/CGMES_3.0.0/PssRQB.cpp @@ -0,0 +1,207 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssRQB.hpp" + +#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() {}; + + +bool assign_PssRQB_kdpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdpm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_ki3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_ki4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_sibv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sibv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_t4f(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4f; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_t4m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4m; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_t4mom(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4mom; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_tomd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssRQB_tomsl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomsl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + +const char PssRQB::debugName[] = "PssRQB"; +const char* PssRQB::debugString() const +{ + return PssRQB::debugName; +} + +void PssRQB::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssRQB::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssRQB::declare() +{ + return BaseClassDefiner(PssRQB::addConstructToMap, PssRQB::addPrimitiveAssignFnsToMap, PssRQB::addClassAssignFnsToMap, PssRQB::debugName); +} + +namespace CIMPP +{ + BaseClass* PssRQB_factory() + { + return new PssRQB; + } +} diff --git a/CGMES_3.0.0/PssRQB.hpp b/CGMES_3.0.0/PssRQB.hpp new file mode 100644 index 000000000..50014ae5c --- /dev/null +++ b/CGMES_3.0.0/PssRQB.hpp @@ -0,0 +1,52 @@ +#ifndef PssRQB_H +#define PssRQB_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class PssRQB : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssRQB_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssSB4.cpp b/CGMES_3.0.0/PssSB4.cpp new file mode 100644 index 000000000..f6dca8bb3 --- /dev/null +++ b/CGMES_3.0.0/PssSB4.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSB4.hpp" + +#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() {}; + + +bool assign_PssSB4_kx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->te; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tx1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_tx2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tx2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSB4_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssSB4::debugName[] = "PssSB4"; +const char* PssSB4::debugString() const +{ + return PssSB4::debugName; +} + +void PssSB4::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSB4::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSB4::declare() +{ + return BaseClassDefiner(PssSB4::addConstructToMap, PssSB4::addPrimitiveAssignFnsToMap, PssSB4::addClassAssignFnsToMap, PssSB4::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSB4_factory() + { + return new PssSB4; + } +} diff --git a/CGMES_3.0.0/PssSB4.hpp b/CGMES_3.0.0/PssSB4.hpp new file mode 100644 index 000000000..5b94d5559 --- /dev/null +++ b/CGMES_3.0.0/PssSB4.hpp @@ -0,0 +1,52 @@ +#ifndef PssSB4_H +#define PssSB4_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Power sensitive stabilizer model. + */ + class PssSB4 : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSB4_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssSH.cpp b/CGMES_3.0.0/PssSH.cpp new file mode 100644 index 000000000..e8b98edbd --- /dev/null +++ b/CGMES_3.0.0/PssSH.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSH.hpp" + +#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() {}; + + +bool assign_PssSH_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->td; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSH_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char PssSH::debugName[] = "PssSH"; +const char* PssSH::debugString() const +{ + return PssSH::debugName; +} + +void PssSH::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSH::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSH::declare() +{ + return BaseClassDefiner(PssSH::addConstructToMap, PssSH::addPrimitiveAssignFnsToMap, PssSH::addClassAssignFnsToMap, PssSH::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSH_factory() + { + return new PssSH; + } +} diff --git a/CGMES_3.0.0/PssSH.hpp b/CGMES_3.0.0/PssSH.hpp new file mode 100644 index 000000000..69af2467e --- /dev/null +++ b/CGMES_3.0.0/PssSH.hpp @@ -0,0 +1,54 @@ +#ifndef PssSH_H +#define PssSH_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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.] + */ + class PssSH : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSH_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssSK.cpp b/CGMES_3.0.0/PssSK.cpp new file mode 100644 index 000000000..cff220b90 --- /dev/null +++ b/CGMES_3.0.0/PssSK.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSK.hpp" + +#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() {}; + + +bool assign_PssSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSK_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char PssSK::debugName[] = "PssSK"; +const char* PssSK::debugString() const +{ + return PssSK::debugName; +} + +void PssSK::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSK::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSK::declare() +{ + return BaseClassDefiner(PssSK::addConstructToMap, PssSK::addPrimitiveAssignFnsToMap, PssSK::addClassAssignFnsToMap, PssSK::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSK_factory() + { + return new PssSK; + } +} diff --git a/CGMES_3.0.0/PssSK.hpp b/CGMES_3.0.0/PssSK.hpp new file mode 100644 index 000000000..6a4cfc7db --- /dev/null +++ b/CGMES_3.0.0/PssSK.hpp @@ -0,0 +1,52 @@ +#ifndef PssSK_H +#define PssSK_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Slovakian PSS with three inputs. + */ + class PssSK : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSK_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssSTAB2A.cpp b/CGMES_3.0.0/PssSTAB2A.cpp new file mode 100644 index 000000000..ad3a0eaa1 --- /dev/null +++ b/CGMES_3.0.0/PssSTAB2A.cpp @@ -0,0 +1,175 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssSTAB2A.hpp" + +#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() {}; + + +bool assign_PssSTAB2A_hlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hlim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssSTAB2A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + +const char PssSTAB2A::debugName[] = "PssSTAB2A"; +const char* PssSTAB2A::debugString() const +{ + return PssSTAB2A::debugName; +} + +void PssSTAB2A::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssSTAB2A::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssSTAB2A::declare() +{ + return BaseClassDefiner(PssSTAB2A::addConstructToMap, PssSTAB2A::addPrimitiveAssignFnsToMap, PssSTAB2A::addClassAssignFnsToMap, PssSTAB2A::debugName); +} + +namespace CIMPP +{ + BaseClass* PssSTAB2A_factory() + { + return new PssSTAB2A; + } +} diff --git a/CGMES_3.0.0/PssSTAB2A.hpp b/CGMES_3.0.0/PssSTAB2A.hpp new file mode 100644 index 000000000..f415b269c --- /dev/null +++ b/CGMES_3.0.0/PssSTAB2A.hpp @@ -0,0 +1,49 @@ +#ifndef PssSTAB2A_H +#define PssSTAB2A_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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.] + */ + class PssSTAB2A : public PowerSystemStabilizerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssSTAB2A_factory(); +} +#endif diff --git a/CGMES_3.0.0/PssWECC.cpp b/CGMES_3.0.0/PssWECC.cpp new file mode 100644 index 000000000..92f2fc3c1 --- /dev/null +++ b/CGMES_3.0.0/PssWECC.cpp @@ -0,0 +1,335 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "PssWECC.hpp" + +#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() {}; + + +bool assign_PssWECC_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal1Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inputSignal2Type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vcu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_PssWECC_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vsmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + +const char PssWECC::debugName[] = "PssWECC"; +const char* PssWECC::debugString() const +{ + return PssWECC::debugName; +} + +void PssWECC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void PssWECC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner PssWECC::declare() +{ + return BaseClassDefiner(PssWECC::addConstructToMap, PssWECC::addPrimitiveAssignFnsToMap, PssWECC::addClassAssignFnsToMap, PssWECC::debugName); +} + +namespace CIMPP +{ + BaseClass* PssWECC_factory() + { + return new PssWECC; + } +} diff --git a/CGMES_3.0.0/PssWECC.hpp b/CGMES_3.0.0/PssWECC.hpp new file mode 100644 index 000000000..498f5413a --- /dev/null +++ b/CGMES_3.0.0/PssWECC.hpp @@ -0,0 +1,60 @@ +#ifndef PssWECC_H +#define PssWECC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemStabilizerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "InputSignalKind.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* PssWECC_factory(); +} +#endif diff --git a/CGMES_3.0.0/Quality61850.cpp b/CGMES_3.0.0/Quality61850.cpp new file mode 100644 index 000000000..ac78a9b84 --- /dev/null +++ b/CGMES_3.0.0/Quality61850.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Quality61850.hpp" + +#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() {}; + + +bool assign_Quality61850_badReference(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->badReference; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_estimatorReplaced(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->estimatorReplaced; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_failure(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->failure; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_oldData(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oldData; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_operatorBlocked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operatorBlocked; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_oscillatory(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->oscillatory; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_outOfRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->outOfRange; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_overFlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->overFlow; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_source(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->source; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_suspect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->suspect; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_test(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->test; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Quality61850_validity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->validity; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char Quality61850::debugName[] = "Quality61850"; +const char* Quality61850::debugString() const +{ + return Quality61850::debugName; +} + +void Quality61850::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Quality61850::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Quality61850::declare() +{ + return BaseClassDefiner(Quality61850::addConstructToMap, Quality61850::addPrimitiveAssignFnsToMap, Quality61850::addClassAssignFnsToMap, Quality61850::debugName); +} + +namespace CIMPP +{ + BaseClass* Quality61850_factory() + { + return new Quality61850; + } +} diff --git a/CGMES_3.0.0/Quality61850.hpp b/CGMES_3.0.0/Quality61850.hpp new file mode 100644 index 000000000..afe61569e --- /dev/null +++ b/CGMES_3.0.0/Quality61850.hpp @@ -0,0 +1,54 @@ +#ifndef Quality61850_H +#define Quality61850_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Source.hpp" +#include "Validity.hpp" + +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. + */ + class Quality61850 : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Quality61850_factory(); +} +#endif diff --git a/CGMES_3.0.0/RaiseLowerCommand.cpp b/CGMES_3.0.0/RaiseLowerCommand.cpp new file mode 100644 index 000000000..066aa79a7 --- /dev/null +++ b/CGMES_3.0.0/RaiseLowerCommand.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RaiseLowerCommand.hpp" + +#include +#include + +#include "ValueAliasSet.hpp" + +using namespace CIMPP; + +RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {}; +RaiseLowerCommand::~RaiseLowerCommand() {}; + + + + +bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass*, BaseClass*); +bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_RaiseLowerCommands(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RaiseLowerCommand::debugName[] = "RaiseLowerCommand"; +const char* RaiseLowerCommand::debugString() const +{ + return RaiseLowerCommand::debugName; +} + +void RaiseLowerCommand::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand"), &RaiseLowerCommand_factory)); +} + +void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RaiseLowerCommand::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand.ValueAliasSet"), &assign_RaiseLowerCommand_ValueAliasSet)); +} + +const BaseClassDefiner RaiseLowerCommand::declare() +{ + return BaseClassDefiner(RaiseLowerCommand::addConstructToMap, RaiseLowerCommand::addPrimitiveAssignFnsToMap, RaiseLowerCommand::addClassAssignFnsToMap, RaiseLowerCommand::debugName); +} + +namespace CIMPP +{ + BaseClass* RaiseLowerCommand_factory() + { + return new RaiseLowerCommand; + } +} diff --git a/CGMES_3.0.0/RaiseLowerCommand.hpp b/CGMES_3.0.0/RaiseLowerCommand.hpp new file mode 100644 index 000000000..ebc146416 --- /dev/null +++ b/CGMES_3.0.0/RaiseLowerCommand.hpp @@ -0,0 +1,41 @@ +#ifndef RaiseLowerCommand_H +#define RaiseLowerCommand_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AnalogControl.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class RaiseLowerCommand : public AnalogControl + { + public: + /* constructor initialising all attributes to null */ + RaiseLowerCommand(); + ~RaiseLowerCommand() override; + + CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RaiseLowerCommand_factory(); +} +#endif diff --git a/CGMES_3.0.0/RatioTapChanger.cpp b/CGMES_3.0.0/RatioTapChanger.cpp new file mode 100644 index 000000000..54c749a71 --- /dev/null +++ b/CGMES_3.0.0/RatioTapChanger.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RatioTapChanger.hpp" + +#include +#include + +#include "RatioTapChangerTable.hpp" +#include "TransformerEnd.hpp" +#include "PerCent.hpp" + +using namespace CIMPP; + +RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {}; +RatioTapChanger::~RatioTapChanger() {}; + + + + +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) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + RatioTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RatioTapChangerTable != element2) + { + element->RatioTapChangerTable = element2; + return assign_RatioTapChangerTable_RatioTapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TransformerEnd_RatioTapChanger(BaseClass*, BaseClass*); +bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TransformerEnd != element2) + { + element->TransformerEnd = element2; + return assign_TransformerEnd_RatioTapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char RatioTapChanger::debugName[] = "RatioTapChanger"; +const char* RatioTapChanger::debugString() const +{ + return RatioTapChanger::debugName; +} + +void RatioTapChanger::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RatioTapChanger::declare() +{ + return BaseClassDefiner(RatioTapChanger::addConstructToMap, RatioTapChanger::addPrimitiveAssignFnsToMap, RatioTapChanger::addClassAssignFnsToMap, RatioTapChanger::debugName); +} + +namespace CIMPP +{ + BaseClass* RatioTapChanger_factory() + { + return new RatioTapChanger; + } +} diff --git a/CGMES_3.0.0/RatioTapChanger.hpp b/CGMES_3.0.0/RatioTapChanger.hpp new file mode 100644 index 000000000..59a2b8dee --- /dev/null +++ b/CGMES_3.0.0/RatioTapChanger.hpp @@ -0,0 +1,45 @@ +#ifndef RatioTapChanger_H +#define RatioTapChanger_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChanger.hpp" +#include "BaseClassDefiner.hpp" +#include "PerCent.hpp" + +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). + */ + class RatioTapChanger : public TapChanger + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RatioTapChanger_factory(); +} +#endif diff --git a/CGMES_3.0.0/RatioTapChangerTable.cpp b/CGMES_3.0.0/RatioTapChangerTable.cpp new file mode 100644 index 000000000..ee5dac524 --- /dev/null +++ b/CGMES_3.0.0/RatioTapChangerTable.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RatioTapChangerTable.hpp" + +#include +#include + +#include "RatioTapChanger.hpp" +#include "RatioTapChangerTablePoint.hpp" + +using namespace CIMPP; + +RatioTapChangerTable::RatioTapChangerTable() {}; +RatioTapChangerTable::~RatioTapChangerTable() {}; + + + + + +bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass*, BaseClass*); +bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + RatioTapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RatioTapChanger.begin(), element->RatioTapChanger.end(), element2) == element->RatioTapChanger.end()) + { + element->RatioTapChanger.push_back(element2); + return assign_RatioTapChanger_RatioTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass*, BaseClass*); +bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChangerTable* element = dynamic_cast(BaseClass_ptr1); + RatioTapChangerTablePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RatioTapChangerTablePoint.begin(), element->RatioTapChangerTablePoint.end(), element2) == element->RatioTapChangerTablePoint.end()) + { + element->RatioTapChangerTablePoint.push_back(element2); + return assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RatioTapChangerTable::debugName[] = "RatioTapChangerTable"; +const char* RatioTapChangerTable::debugString() const +{ + return RatioTapChangerTable::debugName; +} + +void RatioTapChangerTable::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable"), &RatioTapChangerTable_factory)); +} + +void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RatioTapChangerTable::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner RatioTapChangerTable::declare() +{ + return BaseClassDefiner(RatioTapChangerTable::addConstructToMap, RatioTapChangerTable::addPrimitiveAssignFnsToMap, RatioTapChangerTable::addClassAssignFnsToMap, RatioTapChangerTable::debugName); +} + +namespace CIMPP +{ + BaseClass* RatioTapChangerTable_factory() + { + return new RatioTapChangerTable; + } +} diff --git a/CGMES_3.0.0/RatioTapChangerTable.hpp b/CGMES_3.0.0/RatioTapChangerTable.hpp new file mode 100644 index 000000000..00e3fb5ea --- /dev/null +++ b/CGMES_3.0.0/RatioTapChangerTable.hpp @@ -0,0 +1,43 @@ +#ifndef RatioTapChangerTable_H +#define RatioTapChangerTable_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class RatioTapChanger; + class RatioTapChangerTablePoint; + + /* + Describes a curve for how the voltage magnitude and impedance varies with the tap step. + */ + class RatioTapChangerTable : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RatioTapChangerTable_factory(); +} +#endif diff --git a/CGMES_3.0.0/RatioTapChangerTablePoint.cpp b/CGMES_3.0.0/RatioTapChangerTablePoint.cpp new file mode 100644 index 000000000..4253a4d8b --- /dev/null +++ b/CGMES_3.0.0/RatioTapChangerTablePoint.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RatioTapChangerTablePoint.hpp" + +#include +#include + +#include "RatioTapChangerTable.hpp" + +using namespace CIMPP; + +RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {}; +RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {}; + + + + +bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass*, BaseClass*); +bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + RatioTapChangerTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RatioTapChangerTable != element2) + { + element->RatioTapChangerTable = element2; + return assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RatioTapChangerTablePoint::debugName[] = "RatioTapChangerTablePoint"; +const char* RatioTapChangerTablePoint::debugString() const +{ + return RatioTapChangerTablePoint::debugName; +} + +void RatioTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint"), &RatioTapChangerTablePoint_factory)); +} + +void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RatioTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint.RatioTapChangerTable"), &assign_RatioTapChangerTablePoint_RatioTapChangerTable)); +} + +const BaseClassDefiner RatioTapChangerTablePoint::declare() +{ + return BaseClassDefiner(RatioTapChangerTablePoint::addConstructToMap, RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap, RatioTapChangerTablePoint::addClassAssignFnsToMap, RatioTapChangerTablePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* RatioTapChangerTablePoint_factory() + { + return new RatioTapChangerTablePoint; + } +} diff --git a/CGMES_3.0.0/RatioTapChangerTablePoint.hpp b/CGMES_3.0.0/RatioTapChangerTablePoint.hpp new file mode 100644 index 000000000..616593633 --- /dev/null +++ b/CGMES_3.0.0/RatioTapChangerTablePoint.hpp @@ -0,0 +1,41 @@ +#ifndef RatioTapChangerTablePoint_H +#define RatioTapChangerTablePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TapChangerTablePoint.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class RatioTapChangerTable; + + /* + Describes each tap step in the ratio tap changer tabular curve. + */ + class RatioTapChangerTablePoint : public TapChangerTablePoint + { + public: + /* constructor initialising all attributes to null */ + RatioTapChangerTablePoint(); + ~RatioTapChangerTablePoint() override; + + CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* Table of this point. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RatioTapChangerTablePoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/Reactance.cpp b/CGMES_3.0.0/Reactance.cpp new file mode 100644 index 000000000..6b2d635d6 --- /dev/null +++ b/CGMES_3.0.0/Reactance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Reactance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Reactance& Reactance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Reactance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Reactance::debugName[] = "Reactance"; +const char* Reactance::debugString() const +{ + return Reactance::debugName; +} + +Reactance& Reactance::operator+=(const Reactance& rhs) +{ + value += rhs.value; + return *this; +} + +Reactance& Reactance::operator-=(const Reactance& rhs) +{ + value -= rhs.value; + return *this; +} + +Reactance& Reactance::operator*=(const Reactance& rhs) +{ + value *= rhs.value; + return *this; +} + +Reactance& Reactance::operator/=(const Reactance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Reactance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Reactance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Reactance.hpp b/CGMES_3.0.0/Reactance.hpp new file mode 100644 index 000000000..a811d499a --- /dev/null +++ b/CGMES_3.0.0/Reactance.hpp @@ -0,0 +1,39 @@ +#ifndef Reactance_H +#define Reactance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Reactance (imaginary part of impedance), at rated frequency. + */ + class Reactance + { + public: + Reactance() : value(0.0), initialized(false) {} + Reactance(long double value) : value(value), initialized(true) {} + + Reactance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Reactance& operator+=(const Reactance& rhs); + Reactance& operator-=(const Reactance& rhs); + Reactance& operator*=(const Reactance& rhs); + Reactance& operator/=(const Reactance& rhs); + + friend std::istream& operator>>(std::istream& lop, Reactance& rop); + friend std::ostream& operator<<(std::ostream& os, const Reactance& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ReactiveCapabilityCurve.cpp b/CGMES_3.0.0/ReactiveCapabilityCurve.cpp new file mode 100644 index 000000000..493bd8bf5 --- /dev/null +++ b/CGMES_3.0.0/ReactiveCapabilityCurve.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ReactiveCapabilityCurve.hpp" + +#include +#include + +#include "EquivalentInjection.hpp" +#include "SynchronousMachine.hpp" + +using namespace CIMPP; + +ReactiveCapabilityCurve::ReactiveCapabilityCurve() {}; +ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {}; + + + + + +bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass*, BaseClass*); +bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReactiveCapabilityCurve* element = dynamic_cast(BaseClass_ptr1); + EquivalentInjection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EquivalentInjection.begin(), element->EquivalentInjection.end(), element2) == element->EquivalentInjection.end()) + { + element->EquivalentInjection.push_back(element2); + return assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass*, BaseClass*); +bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReactiveCapabilityCurve* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->InitiallyUsedBySynchronousMachines.begin(), element->InitiallyUsedBySynchronousMachines.end(), element2) == element->InitiallyUsedBySynchronousMachines.end()) + { + element->InitiallyUsedBySynchronousMachines.push_back(element2); + return assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ReactiveCapabilityCurve::debugName[] = "ReactiveCapabilityCurve"; +const char* ReactiveCapabilityCurve::debugString() const +{ + return ReactiveCapabilityCurve::debugName; +} + +void ReactiveCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve"), &ReactiveCapabilityCurve_factory)); +} + +void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ReactiveCapabilityCurve::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ReactiveCapabilityCurve::declare() +{ + return BaseClassDefiner(ReactiveCapabilityCurve::addConstructToMap, ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap, ReactiveCapabilityCurve::addClassAssignFnsToMap, ReactiveCapabilityCurve::debugName); +} + +namespace CIMPP +{ + BaseClass* ReactiveCapabilityCurve_factory() + { + return new ReactiveCapabilityCurve; + } +} diff --git a/CGMES_3.0.0/ReactiveCapabilityCurve.hpp b/CGMES_3.0.0/ReactiveCapabilityCurve.hpp new file mode 100644 index 000000000..28f48611e --- /dev/null +++ b/CGMES_3.0.0/ReactiveCapabilityCurve.hpp @@ -0,0 +1,43 @@ +#ifndef ReactiveCapabilityCurve_H +#define ReactiveCapabilityCurve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Curve.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class ReactiveCapabilityCurve : public Curve + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ReactiveCapabilityCurve_factory(); +} +#endif diff --git a/CGMES_3.0.0/ReactivePower.cpp b/CGMES_3.0.0/ReactivePower.cpp new file mode 100644 index 000000000..568f514f7 --- /dev/null +++ b/CGMES_3.0.0/ReactivePower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ReactivePower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ReactivePower& ReactivePower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +ReactivePower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ReactivePower::debugName[] = "ReactivePower"; +const char* ReactivePower::debugString() const +{ + return ReactivePower::debugName; +} + +ReactivePower& ReactivePower::operator+=(const ReactivePower& rhs) +{ + value += rhs.value; + return *this; +} + +ReactivePower& ReactivePower::operator-=(const ReactivePower& rhs) +{ + value -= rhs.value; + return *this; +} + +ReactivePower& ReactivePower::operator*=(const ReactivePower& rhs) +{ + value *= rhs.value; + return *this; +} + +ReactivePower& ReactivePower::operator/=(const ReactivePower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ReactivePower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ReactivePower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/ReactivePower.hpp b/CGMES_3.0.0/ReactivePower.hpp new file mode 100644 index 000000000..e80659b92 --- /dev/null +++ b/CGMES_3.0.0/ReactivePower.hpp @@ -0,0 +1,39 @@ +#ifndef ReactivePower_H +#define ReactivePower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Product of RMS value of the voltage and the RMS value of the quadrature component of the current. + */ + class ReactivePower + { + public: + ReactivePower() : value(0.0), initialized(false) {} + ReactivePower(long double value) : value(value), initialized(true) {} + + ReactivePower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + ReactivePower& operator+=(const ReactivePower& rhs); + ReactivePower& operator-=(const ReactivePower& rhs); + ReactivePower& operator*=(const ReactivePower& rhs); + ReactivePower& operator/=(const ReactivePower& rhs); + + friend std::istream& operator>>(std::istream& lop, ReactivePower& rop); + friend std::ostream& operator<<(std::ostream& os, const ReactivePower& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/RealEnergy.cpp b/CGMES_3.0.0/RealEnergy.cpp new file mode 100644 index 000000000..8a6ae3178 --- /dev/null +++ b/CGMES_3.0.0/RealEnergy.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RealEnergy.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RealEnergy& RealEnergy::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +RealEnergy::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RealEnergy::debugName[] = "RealEnergy"; +const char* RealEnergy::debugString() const +{ + return RealEnergy::debugName; +} + +RealEnergy& RealEnergy::operator+=(const RealEnergy& rhs) +{ + value += rhs.value; + return *this; +} + +RealEnergy& RealEnergy::operator-=(const RealEnergy& rhs) +{ + value -= rhs.value; + return *this; +} + +RealEnergy& RealEnergy::operator*=(const RealEnergy& rhs) +{ + value *= rhs.value; + return *this; +} + +RealEnergy& RealEnergy::operator/=(const RealEnergy& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RealEnergy& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RealEnergy& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/RealEnergy.hpp b/CGMES_3.0.0/RealEnergy.hpp new file mode 100644 index 000000000..032e38a62 --- /dev/null +++ b/CGMES_3.0.0/RealEnergy.hpp @@ -0,0 +1,39 @@ +#ifndef RealEnergy_H +#define RealEnergy_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Real electrical energy. + */ + class RealEnergy + { + public: + RealEnergy() : value(0.0), initialized(false) {} + RealEnergy(long double value) : value(value), initialized(true) {} + + RealEnergy& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + RealEnergy& operator+=(const RealEnergy& rhs); + RealEnergy& operator-=(const RealEnergy& rhs); + RealEnergy& operator*=(const RealEnergy& rhs); + RealEnergy& operator/=(const RealEnergy& rhs); + + friend std::istream& operator>>(std::istream& lop, RealEnergy& rop); + friend std::ostream& operator<<(std::ostream& os, const RealEnergy& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/RegularIntervalSchedule.cpp b/CGMES_3.0.0/RegularIntervalSchedule.cpp new file mode 100644 index 000000000..b6a466799 --- /dev/null +++ b/CGMES_3.0.0/RegularIntervalSchedule.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegularIntervalSchedule.hpp" + +#include +#include + +#include "RegularTimePoint.hpp" +#include "DateTime.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +RegularIntervalSchedule::RegularIntervalSchedule() {}; +RegularIntervalSchedule::~RegularIntervalSchedule() {}; + + + +bool assign_RegularIntervalSchedule_endTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + element->endTime = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegularIntervalSchedule_timeStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->timeStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); +bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + +const char RegularIntervalSchedule::debugName[] = "RegularIntervalSchedule"; +const char* RegularIntervalSchedule::debugString() const +{ + return RegularIntervalSchedule::debugName; +} + +void RegularIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RegularIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.TimePoints"), &assign_RegularIntervalSchedule_TimePoints)); +} + +const BaseClassDefiner RegularIntervalSchedule::declare() +{ + return BaseClassDefiner(RegularIntervalSchedule::addConstructToMap, RegularIntervalSchedule::addPrimitiveAssignFnsToMap, RegularIntervalSchedule::addClassAssignFnsToMap, RegularIntervalSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* RegularIntervalSchedule_factory() + { + return new RegularIntervalSchedule; + } +} diff --git a/CGMES_3.0.0/RegularIntervalSchedule.hpp b/CGMES_3.0.0/RegularIntervalSchedule.hpp new file mode 100644 index 000000000..25d88fd4c --- /dev/null +++ b/CGMES_3.0.0/RegularIntervalSchedule.hpp @@ -0,0 +1,45 @@ +#ifndef RegularIntervalSchedule_H +#define RegularIntervalSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BasicIntervalSchedule.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class RegularTimePoint; + + /* + The schedule has time points where the time between them is constant. + */ + class RegularIntervalSchedule : public BasicIntervalSchedule + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegularIntervalSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/RegularTimePoint.cpp b/CGMES_3.0.0/RegularTimePoint.cpp new file mode 100644 index 000000000..26db0ad43 --- /dev/null +++ b/CGMES_3.0.0/RegularTimePoint.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegularTimePoint.hpp" + +#include +#include + +#include "RegularIntervalSchedule.hpp" +#include "Integer.hpp" +#include "Float.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {}; +RegularTimePoint::~RegularTimePoint() {}; + + + +bool assign_RegularTimePoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sequenceNumber; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegularTimePoint_value1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegularTimePoint_value2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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; +} + + + + +const char RegularTimePoint::debugName[] = "RegularTimePoint"; +const char* RegularTimePoint::debugString() const +{ + return RegularTimePoint::debugName; +} + +void RegularTimePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RegularTimePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.IntervalSchedule"), &assign_RegularTimePoint_IntervalSchedule)); +} + +const BaseClassDefiner RegularTimePoint::declare() +{ + return BaseClassDefiner(RegularTimePoint::addConstructToMap, RegularTimePoint::addPrimitiveAssignFnsToMap, RegularTimePoint::addClassAssignFnsToMap, RegularTimePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* RegularTimePoint_factory() + { + return new RegularTimePoint; + } +} diff --git a/CGMES_3.0.0/RegularTimePoint.hpp b/CGMES_3.0.0/RegularTimePoint.hpp new file mode 100644 index 000000000..09a3cf3fa --- /dev/null +++ b/CGMES_3.0.0/RegularTimePoint.hpp @@ -0,0 +1,46 @@ +#ifndef RegularTimePoint_H +#define RegularTimePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class RegularIntervalSchedule; + + /* + Time point for a schedule where the time between the consecutive points is constant. + */ + class RegularTimePoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegularTimePoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/RegulatingCondEq.cpp b/CGMES_3.0.0/RegulatingCondEq.cpp new file mode 100644 index 000000000..19bb9d5eb --- /dev/null +++ b/CGMES_3.0.0/RegulatingCondEq.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulatingCondEq.hpp" + +#include +#include + +#include "RegulatingControl.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {}; +RegulatingCondEq::~RegulatingCondEq() {}; + + + +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) +{ + RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + RegulatingControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RegulatingControl != element2) + { + element->RegulatingControl = element2; + return assign_RegulatingControl_RegulatingCondEq(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char RegulatingCondEq::debugName[] = "RegulatingCondEq"; +const char* RegulatingCondEq::debugString() const +{ + return RegulatingCondEq::debugName; +} + +void RegulatingCondEq::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RegulatingCondEq::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.RegulatingControl"), &assign_RegulatingCondEq_RegulatingControl)); +} + +const BaseClassDefiner RegulatingCondEq::declare() +{ + return BaseClassDefiner(RegulatingCondEq::addConstructToMap, RegulatingCondEq::addPrimitiveAssignFnsToMap, RegulatingCondEq::addClassAssignFnsToMap, RegulatingCondEq::debugName); +} + +namespace CIMPP +{ + BaseClass* RegulatingCondEq_factory() + { + return new RegulatingCondEq; + } +} diff --git a/CGMES_3.0.0/RegulatingCondEq.hpp b/CGMES_3.0.0/RegulatingCondEq.hpp new file mode 100644 index 000000000..510a09f26 --- /dev/null +++ b/CGMES_3.0.0/RegulatingCondEq.hpp @@ -0,0 +1,43 @@ +#ifndef RegulatingCondEq_H +#define RegulatingCondEq_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConnection.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +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. + */ + class RegulatingCondEq : public EnergyConnection + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegulatingCondEq_factory(); +} +#endif diff --git a/CGMES_3.0.0/RegulatingControl.cpp b/CGMES_3.0.0/RegulatingControl.cpp new file mode 100644 index 000000000..ebcf369ba --- /dev/null +++ b/CGMES_3.0.0/RegulatingControl.cpp @@ -0,0 +1,235 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulatingControl.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_RegulatingControl_discrete(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->discrete; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->enabled; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_maxAllowedTargetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxAllowedTargetValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_minAllowedTargetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minAllowedTargetValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_targetDeadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetDeadband; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_targetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetValueUnitMultiplier; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_Terminal_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + + +const char RegulatingControl::debugName[] = "RegulatingControl"; +const char* RegulatingControl::debugString() const +{ + return RegulatingControl::debugName; +} + +void RegulatingControl::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RegulatingControl::declare() +{ + return BaseClassDefiner(RegulatingControl::addConstructToMap, RegulatingControl::addPrimitiveAssignFnsToMap, RegulatingControl::addClassAssignFnsToMap, RegulatingControl::debugName); +} + +namespace CIMPP +{ + BaseClass* RegulatingControl_factory() + { + return new RegulatingControl; + } +} diff --git a/CGMES_3.0.0/RegulatingControl.hpp b/CGMES_3.0.0/RegulatingControl.hpp new file mode 100644 index 000000000..93ed5690b --- /dev/null +++ b/CGMES_3.0.0/RegulatingControl.hpp @@ -0,0 +1,57 @@ +#ifndef RegulatingControl_H +#define RegulatingControl_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "RegulatingControlModeKind.hpp" +#include "UnitMultiplier.hpp" + +namespace CIMPP +{ + class RegulatingCondEq; + 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. + */ + class RegulatingControl : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegulatingControl_factory(); +} +#endif diff --git a/CGMES_3.0.0/RegulatingControlModeKind.cpp b/CGMES_3.0.0/RegulatingControlModeKind.cpp new file mode 100644 index 000000000..7ac923d24 --- /dev/null +++ b/CGMES_3.0.0/RegulatingControlModeKind.cpp @@ -0,0 +1,144 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulatingControlModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RegulatingControlModeKind& RegulatingControlModeKind::operator=(RegulatingControlModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +RegulatingControlModeKind::operator RegulatingControlModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RegulatingControlModeKind::debugName[] = "RegulatingControlModeKind"; +const char* RegulatingControlModeKind::debugString() const +{ + return RegulatingControlModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RegulatingControlModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "voltage") + { + rop = RegulatingControlModeKind::voltage; + return lop; + } + if(EnumSymbol == "activePower") + { + rop = RegulatingControlModeKind::activePower; + return lop; + } + if(EnumSymbol == "reactivePower") + { + rop = RegulatingControlModeKind::reactivePower; + return lop; + } + if(EnumSymbol == "currentFlow") + { + rop = RegulatingControlModeKind::currentFlow; + return lop; + } + if(EnumSymbol == "admittance") + { + rop = RegulatingControlModeKind::admittance; + return lop; + } + if(EnumSymbol == "timeScheduled") + { + rop = RegulatingControlModeKind::timeScheduled; + return lop; + } + if(EnumSymbol == "temperature") + { + rop = RegulatingControlModeKind::temperature; + return lop; + } + if(EnumSymbol == "powerFactor") + { + rop = RegulatingControlModeKind::powerFactor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RegulatingControlModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == RegulatingControlModeKind::voltage) + { + EnumSymbol = "voltage"; + } + if (obj.value == RegulatingControlModeKind::activePower) + { + EnumSymbol = "activePower"; + } + if (obj.value == RegulatingControlModeKind::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == RegulatingControlModeKind::currentFlow) + { + EnumSymbol = "currentFlow"; + } + if (obj.value == RegulatingControlModeKind::admittance) + { + EnumSymbol = "admittance"; + } + if (obj.value == RegulatingControlModeKind::timeScheduled) + { + EnumSymbol = "timeScheduled"; + } + if (obj.value == RegulatingControlModeKind::temperature) + { + EnumSymbol = "temperature"; + } + if (obj.value == RegulatingControlModeKind::powerFactor) + { + EnumSymbol = "powerFactor"; + } + + if (!EnumSymbol.empty()) + { + os << "RegulatingControlModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/RegulatingControlModeKind.hpp b/CGMES_3.0.0/RegulatingControlModeKind.hpp new file mode 100644 index 000000000..ed5351e3e --- /dev/null +++ b/CGMES_3.0.0/RegulatingControlModeKind.hpp @@ -0,0 +1,70 @@ +#ifndef RegulatingControlModeKind_H +#define RegulatingControlModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + The kind of regulation model. For example regulating voltage, reactive power, active power, etc. + */ + class RegulatingControlModeKind + { + public: + enum RegulatingControlModeKind_ENUM + { + /** + * Voltage is specified. + */ + voltage, + /** + * Active power is specified. + */ + activePower, + /** + * Reactive power is specified. + */ + reactivePower, + /** + * Current flow is specified. + */ + currentFlow, + /** + * Admittance is specified. + */ + admittance, + /** + * 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). + */ + temperature, + /** + * Power factor is specified. + */ + powerFactor, + }; + + RegulatingControlModeKind() : value(), initialized(false) {} + RegulatingControlModeKind(RegulatingControlModeKind_ENUM value) : value(value), initialized(true) {} + + RegulatingControlModeKind& operator=(RegulatingControlModeKind_ENUM rop); + operator RegulatingControlModeKind_ENUM() const; + + RegulatingControlModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, RegulatingControlModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const RegulatingControlModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/RegulationSchedule.cpp b/CGMES_3.0.0/RegulationSchedule.cpp new file mode 100644 index 000000000..71c2e0c89 --- /dev/null +++ b/CGMES_3.0.0/RegulationSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RegulationSchedule.hpp" + +#include +#include + +#include "RegulatingControl.hpp" + +using namespace CIMPP; + +RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {}; +RegulationSchedule::~RegulationSchedule() {}; + + + + +bool assign_RegulatingControl_RegulationSchedule(BaseClass*, BaseClass*); +bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulationSchedule* element = dynamic_cast(BaseClass_ptr1); + RegulatingControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RegulatingControl != element2) + { + element->RegulatingControl = element2; + return assign_RegulatingControl_RegulationSchedule(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char RegulationSchedule::debugName[] = "RegulationSchedule"; +const char* RegulationSchedule::debugString() const +{ + return RegulationSchedule::debugName; +} + +void RegulationSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:RegulationSchedule"), &RegulationSchedule_factory)); +} + +void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void RegulationSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:RegulationSchedule.RegulatingControl"), &assign_RegulationSchedule_RegulatingControl)); +} + +const BaseClassDefiner RegulationSchedule::declare() +{ + return BaseClassDefiner(RegulationSchedule::addConstructToMap, RegulationSchedule::addPrimitiveAssignFnsToMap, RegulationSchedule::addClassAssignFnsToMap, RegulationSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* RegulationSchedule_factory() + { + return new RegulationSchedule; + } +} diff --git a/CGMES_3.0.0/RegulationSchedule.hpp b/CGMES_3.0.0/RegulationSchedule.hpp new file mode 100644 index 000000000..2d0b1cba5 --- /dev/null +++ b/CGMES_3.0.0/RegulationSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef RegulationSchedule_H +#define RegulationSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class RegulatingControl; + + /* + A pre-established pattern over time for a controlled variable, e.g., busbar voltage. + */ + class RegulationSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + RegulationSchedule(); + ~RegulationSchedule() override; + + CIMPP::RegulatingControl* RegulatingControl; /* Regulating controls that have this schedule. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RegulationSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/RemoteInputSignal.cpp b/CGMES_3.0.0/RemoteInputSignal.cpp new file mode 100644 index 000000000..30f558ba0 --- /dev/null +++ b/CGMES_3.0.0/RemoteInputSignal.cpp @@ -0,0 +1,243 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RemoteInputSignal.hpp" + +#include +#include + +#include "DiscontinuousExcitationControlDynamics.hpp" +#include "PFVArControllerType1Dynamics.hpp" +#include "PowerSystemStabilizerDynamics.hpp" +#include "Terminal.hpp" +#include "UnderexcitationLimiterDynamics.hpp" +#include "VoltageCompensatorDynamics.hpp" +#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() {}; + + + + + + + + + + + +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) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + DiscontinuousExcitationControlDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DiscontinuousExcitationControlDynamics != element2) + { + element->DiscontinuousExcitationControlDynamics = element2; + return assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1Dynamics != element2) + { + element->PFVArControllerType1Dynamics = element2; + return assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + PowerSystemStabilizerDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemStabilizerDynamics != element2) + { + element->PowerSystemStabilizerDynamics = element2; + return assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + UnderexcitationLimiterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->UnderexcitationLimiterDynamics != element2) + { + element->UnderexcitationLimiterDynamics = element2; + return assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + VoltageCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VoltageCompensatorDynamics != element2) + { + element->VoltageCompensatorDynamics = element2; + return assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + WindPlantDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantDynamics != element2) + { + element->WindPlantDynamics = element2; + return assign_WindPlantDynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2Dynamics != element2) + { + element->WindTurbineType1or2Dynamics = element2; + return assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); +bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RemoteInputSignal* 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_RemoteInputSignal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char RemoteInputSignal::debugName[] = "RemoteInputSignal"; +const char* RemoteInputSignal::debugString() const +{ + return RemoteInputSignal::debugName; +} + +void RemoteInputSignal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RemoteInputSignal::declare() +{ + return BaseClassDefiner(RemoteInputSignal::addConstructToMap, RemoteInputSignal::addPrimitiveAssignFnsToMap, RemoteInputSignal::addClassAssignFnsToMap, RemoteInputSignal::debugName); +} + +namespace CIMPP +{ + BaseClass* RemoteInputSignal_factory() + { + return new RemoteInputSignal; + } +} diff --git a/CGMES_3.0.0/RemoteInputSignal.hpp b/CGMES_3.0.0/RemoteInputSignal.hpp new file mode 100644 index 000000000..91a74e5ac --- /dev/null +++ b/CGMES_3.0.0/RemoteInputSignal.hpp @@ -0,0 +1,59 @@ +#ifndef RemoteInputSignal_H +#define RemoteInputSignal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "RemoteSignalKind.hpp" + +namespace CIMPP +{ + class DiscontinuousExcitationControlDynamics; + class PFVArControllerType1Dynamics; + class PowerSystemStabilizerDynamics; + class Terminal; + class UnderexcitationLimiterDynamics; + class VoltageCompensatorDynamics; + class WindPlantDynamics; + 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. + */ + class RemoteInputSignal : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RemoteInputSignal_factory(); +} +#endif diff --git a/CGMES_3.0.0/RemoteSignalKind.cpp b/CGMES_3.0.0/RemoteSignalKind.cpp new file mode 100644 index 000000000..e1cd4d2e7 --- /dev/null +++ b/CGMES_3.0.0/RemoteSignalKind.cpp @@ -0,0 +1,153 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RemoteSignalKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RemoteSignalKind& RemoteSignalKind::operator=(RemoteSignalKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +RemoteSignalKind::operator RemoteSignalKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RemoteSignalKind::debugName[] = "RemoteSignalKind"; +const char* RemoteSignalKind::debugString() const +{ + return RemoteSignalKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RemoteSignalKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "RemoteSignalKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "remoteBusVoltageFrequency") + { + rop = RemoteSignalKind::remoteBusVoltageFrequency; + return lop; + } + if(EnumSymbol == "remoteBusVoltageFrequencyDeviation") + { + rop = RemoteSignalKind::remoteBusVoltageFrequencyDeviation; + return lop; + } + if(EnumSymbol == "remoteBusFrequency") + { + rop = RemoteSignalKind::remoteBusFrequency; + return lop; + } + if(EnumSymbol == "remoteBusFrequencyDeviation") + { + rop = RemoteSignalKind::remoteBusFrequencyDeviation; + return lop; + } + if(EnumSymbol == "remoteBusVoltageAmplitude") + { + rop = RemoteSignalKind::remoteBusVoltageAmplitude; + return lop; + } + if(EnumSymbol == "remoteBusVoltage") + { + rop = RemoteSignalKind::remoteBusVoltage; + return lop; + } + if(EnumSymbol == "remoteBranchCurrentAmplitude") + { + rop = RemoteSignalKind::remoteBranchCurrentAmplitude; + return lop; + } + if(EnumSymbol == "remoteBusVoltageAmplitudeDerivative") + { + rop = RemoteSignalKind::remoteBusVoltageAmplitudeDerivative; + return lop; + } + if(EnumSymbol == "remotePuBusVoltageDerivative") + { + rop = RemoteSignalKind::remotePuBusVoltageDerivative; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RemoteSignalKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == RemoteSignalKind::remoteBusVoltageFrequency) + { + EnumSymbol = "remoteBusVoltageFrequency"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltageFrequencyDeviation) + { + EnumSymbol = "remoteBusVoltageFrequencyDeviation"; + } + if (obj.value == RemoteSignalKind::remoteBusFrequency) + { + EnumSymbol = "remoteBusFrequency"; + } + if (obj.value == RemoteSignalKind::remoteBusFrequencyDeviation) + { + EnumSymbol = "remoteBusFrequencyDeviation"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltageAmplitude) + { + EnumSymbol = "remoteBusVoltageAmplitude"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltage) + { + EnumSymbol = "remoteBusVoltage"; + } + if (obj.value == RemoteSignalKind::remoteBranchCurrentAmplitude) + { + EnumSymbol = "remoteBranchCurrentAmplitude"; + } + if (obj.value == RemoteSignalKind::remoteBusVoltageAmplitudeDerivative) + { + EnumSymbol = "remoteBusVoltageAmplitudeDerivative"; + } + if (obj.value == RemoteSignalKind::remotePuBusVoltageDerivative) + { + EnumSymbol = "remotePuBusVoltageDerivative"; + } + + if (!EnumSymbol.empty()) + { + os << "RemoteSignalKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/RemoteSignalKind.hpp b/CGMES_3.0.0/RemoteSignalKind.hpp new file mode 100644 index 000000000..17a1358d3 --- /dev/null +++ b/CGMES_3.0.0/RemoteSignalKind.hpp @@ -0,0 +1,74 @@ +#ifndef RemoteSignalKind_H +#define RemoteSignalKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of input signal coming from remote bus. + */ + class RemoteSignalKind + { + public: + enum RemoteSignalKind_ENUM + { + /** + * Input is voltage frequency from remote terminal bus. + */ + remoteBusVoltageFrequency, + /** + * Input is voltage frequency deviation from remote terminal bus. + */ + remoteBusVoltageFrequencyDeviation, + /** + * Input is frequency from remote terminal bus. + */ + remoteBusFrequency, + /** + * Input is frequency deviation from remote terminal bus. + */ + remoteBusFrequencyDeviation, + /** + * Input is voltage amplitude from remote terminal bus. + */ + remoteBusVoltageAmplitude, + /** + * Input is voltage from remote terminal bus. + */ + remoteBusVoltage, + /** + * Input is branch current amplitude from remote terminal bus. + */ + remoteBranchCurrentAmplitude, + /** + * Input is branch current amplitude derivative from remote terminal bus. + */ + remoteBusVoltageAmplitudeDerivative, + /** + * Input is PU voltage derivative from remote terminal bus. + */ + remotePuBusVoltageDerivative, + }; + + RemoteSignalKind() : value(), initialized(false) {} + RemoteSignalKind(RemoteSignalKind_ENUM value) : value(value), initialized(true) {} + + RemoteSignalKind& operator=(RemoteSignalKind_ENUM rop); + operator RemoteSignalKind_ENUM() const; + + RemoteSignalKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, RemoteSignalKind& rop); + friend std::ostream& operator<<(std::ostream& os, const RemoteSignalKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ReportingGroup.cpp b/CGMES_3.0.0/ReportingGroup.cpp new file mode 100644 index 000000000..c453a2c6f --- /dev/null +++ b/CGMES_3.0.0/ReportingGroup.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ReportingGroup.hpp" + +#include +#include + +#include "BusNameMarker.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +ReportingGroup::ReportingGroup() {}; +ReportingGroup::~ReportingGroup() {}; + + + + + +bool assign_BusNameMarker_ReportingGroup(BaseClass*, BaseClass*); +bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReportingGroup* element = dynamic_cast(BaseClass_ptr1); + BusNameMarker* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->BusNameMarker.begin(), element->BusNameMarker.end(), element2) == element->BusNameMarker.end()) + { + element->BusNameMarker.push_back(element2); + return assign_BusNameMarker_ReportingGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_ReportingGroup(BaseClass*, BaseClass*); +bool assign_ReportingGroup_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ReportingGroup* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNode.begin(), element->TopologicalNode.end(), element2) == element->TopologicalNode.end()) + { + element->TopologicalNode.push_back(element2); + return assign_TopologicalNode_ReportingGroup(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ReportingGroup::debugName[] = "ReportingGroup"; +const char* ReportingGroup::debugString() const +{ + return ReportingGroup::debugName; +} + +void ReportingGroup::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ReportingGroup"), &ReportingGroup_factory)); +} + +void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ReportingGroup::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ReportingGroup::declare() +{ + return BaseClassDefiner(ReportingGroup::addConstructToMap, ReportingGroup::addPrimitiveAssignFnsToMap, ReportingGroup::addClassAssignFnsToMap, ReportingGroup::debugName); +} + +namespace CIMPP +{ + BaseClass* ReportingGroup_factory() + { + return new ReportingGroup; + } +} diff --git a/CGMES_3.0.0/ReportingGroup.hpp b/CGMES_3.0.0/ReportingGroup.hpp new file mode 100644 index 000000000..21eae417d --- /dev/null +++ b/CGMES_3.0.0/ReportingGroup.hpp @@ -0,0 +1,43 @@ +#ifndef ReportingGroup_H +#define ReportingGroup_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class BusNameMarker; + class TopologicalNode; + + /* + A reporting group is used for various ad-hoc groupings used for reporting. + */ + class ReportingGroup : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ReportingGroup_factory(); +} +#endif diff --git a/CGMES_3.0.0/Resistance.cpp b/CGMES_3.0.0/Resistance.cpp new file mode 100644 index 000000000..4686fd861 --- /dev/null +++ b/CGMES_3.0.0/Resistance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Resistance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Resistance& Resistance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Resistance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Resistance::debugName[] = "Resistance"; +const char* Resistance::debugString() const +{ + return Resistance::debugName; +} + +Resistance& Resistance::operator+=(const Resistance& rhs) +{ + value += rhs.value; + return *this; +} + +Resistance& Resistance::operator-=(const Resistance& rhs) +{ + value -= rhs.value; + return *this; +} + +Resistance& Resistance::operator*=(const Resistance& rhs) +{ + value *= rhs.value; + return *this; +} + +Resistance& Resistance::operator/=(const Resistance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Resistance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Resistance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Resistance.hpp b/CGMES_3.0.0/Resistance.hpp new file mode 100644 index 000000000..cd68a214f --- /dev/null +++ b/CGMES_3.0.0/Resistance.hpp @@ -0,0 +1,39 @@ +#ifndef Resistance_H +#define Resistance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Resistance (real part of impedance). + */ + class Resistance + { + public: + Resistance() : value(0.0), initialized(false) {} + Resistance(long double value) : value(value), initialized(true) {} + + Resistance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Resistance& operator+=(const Resistance& rhs); + Resistance& operator-=(const Resistance& rhs); + Resistance& operator*=(const Resistance& rhs); + Resistance& operator/=(const Resistance& rhs); + + friend std::istream& operator>>(std::istream& lop, Resistance& rop); + friend std::ostream& operator<<(std::ostream& os, const Resistance& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/RotatingMachine.cpp b/CGMES_3.0.0/RotatingMachine.cpp new file mode 100644 index 000000000..39666bcb9 --- /dev/null +++ b/CGMES_3.0.0/RotatingMachine.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotatingMachine.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_RotatingMachine_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_ratedPowerFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedPowerFactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedS; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachine_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_HydroPump_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->HydroPump != element2) + { + element->HydroPump = element2; + return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + +const char RotatingMachine::debugName[] = "RotatingMachine"; +const char* RotatingMachine::debugString() const +{ + return RotatingMachine::debugName; +} + +void RotatingMachine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner RotatingMachine::declare() +{ + return BaseClassDefiner(RotatingMachine::addConstructToMap, RotatingMachine::addPrimitiveAssignFnsToMap, RotatingMachine::addClassAssignFnsToMap, RotatingMachine::debugName); +} + +namespace CIMPP +{ + BaseClass* RotatingMachine_factory() + { + return new RotatingMachine; + } +} diff --git a/CGMES_3.0.0/RotatingMachine.hpp b/CGMES_3.0.0/RotatingMachine.hpp new file mode 100644 index 000000000..24d9e1931 --- /dev/null +++ b/CGMES_3.0.0/RotatingMachine.hpp @@ -0,0 +1,53 @@ +#ifndef RotatingMachine_H +#define RotatingMachine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ApparentPower.hpp" +#include "Float.hpp" +#include "ReactivePower.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class GeneratingUnit; + class HydroPump; + + /* + A rotating machine which may be used as a generator or motor. + */ + class RotatingMachine : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RotatingMachine_factory(); +} +#endif diff --git a/CGMES_3.0.0/RotatingMachineDynamics.cpp b/CGMES_3.0.0/RotatingMachineDynamics.cpp new file mode 100644 index 000000000..1dba17391 --- /dev/null +++ b/CGMES_3.0.0/RotatingMachineDynamics.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotatingMachineDynamics.hpp" + +#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() {}; + + +bool assign_RotatingMachineDynamics_damping(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->damping; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_inertia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inertia; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactor120; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->statorLeakageReactance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_RotatingMachineDynamics_statorResistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->statorResistance; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char RotatingMachineDynamics::debugName[] = "RotatingMachineDynamics"; +const char* RotatingMachineDynamics::debugString() const +{ + return RotatingMachineDynamics::debugName; +} + +void RotatingMachineDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void RotatingMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner RotatingMachineDynamics::declare() +{ + return BaseClassDefiner(RotatingMachineDynamics::addConstructToMap, RotatingMachineDynamics::addPrimitiveAssignFnsToMap, RotatingMachineDynamics::addClassAssignFnsToMap, RotatingMachineDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* RotatingMachineDynamics_factory() + { + return new RotatingMachineDynamics; + } +} diff --git a/CGMES_3.0.0/RotatingMachineDynamics.hpp b/CGMES_3.0.0/RotatingMachineDynamics.hpp new file mode 100644 index 000000000..632bea8ae --- /dev/null +++ b/CGMES_3.0.0/RotatingMachineDynamics.hpp @@ -0,0 +1,48 @@ +#ifndef RotatingMachineDynamics_H +#define RotatingMachineDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Abstract parent class for all synchronous and asynchronous machine standard models. + */ + class RotatingMachineDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* RotatingMachineDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/RotationSpeed.cpp b/CGMES_3.0.0/RotationSpeed.cpp new file mode 100644 index 000000000..a0e1b9953 --- /dev/null +++ b/CGMES_3.0.0/RotationSpeed.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotationSpeed.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RotationSpeed& RotationSpeed::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +RotationSpeed::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RotationSpeed::debugName[] = "RotationSpeed"; +const char* RotationSpeed::debugString() const +{ + return RotationSpeed::debugName; +} + +RotationSpeed& RotationSpeed::operator+=(const RotationSpeed& rhs) +{ + value += rhs.value; + return *this; +} + +RotationSpeed& RotationSpeed::operator-=(const RotationSpeed& rhs) +{ + value -= rhs.value; + return *this; +} + +RotationSpeed& RotationSpeed::operator*=(const RotationSpeed& rhs) +{ + value *= rhs.value; + return *this; +} + +RotationSpeed& RotationSpeed::operator/=(const RotationSpeed& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RotationSpeed& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RotationSpeed& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/RotationSpeed.hpp b/CGMES_3.0.0/RotationSpeed.hpp new file mode 100644 index 000000000..20dae4027 --- /dev/null +++ b/CGMES_3.0.0/RotationSpeed.hpp @@ -0,0 +1,39 @@ +#ifndef RotationSpeed_H +#define RotationSpeed_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Number of revolutions per second. + */ + class RotationSpeed + { + public: + RotationSpeed() : value(0.0), initialized(false) {} + RotationSpeed(long double value) : value(value), initialized(true) {} + + RotationSpeed& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + RotationSpeed& operator+=(const RotationSpeed& rhs); + RotationSpeed& operator-=(const RotationSpeed& rhs); + RotationSpeed& operator*=(const RotationSpeed& rhs); + RotationSpeed& operator/=(const RotationSpeed& rhs); + + friend std::istream& operator>>(std::istream& lop, RotationSpeed& rop); + friend std::ostream& operator<<(std::ostream& os, const RotationSpeed& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/RotorKind.cpp b/CGMES_3.0.0/RotorKind.cpp new file mode 100644 index 000000000..155faceec --- /dev/null +++ b/CGMES_3.0.0/RotorKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "RotorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +RotorKind& RotorKind::operator=(RotorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +RotorKind::operator RotorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char RotorKind::debugName[] = "RotorKind"; +const char* RotorKind::debugString() const +{ + return RotorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, RotorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "RotorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "roundRotor") + { + rop = RotorKind::roundRotor; + return lop; + } + if(EnumSymbol == "salientPole") + { + rop = RotorKind::salientPole; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const RotorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == RotorKind::roundRotor) + { + EnumSymbol = "roundRotor"; + } + if (obj.value == RotorKind::salientPole) + { + EnumSymbol = "salientPole"; + } + + if (!EnumSymbol.empty()) + { + os << "RotorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/RotorKind.hpp b/CGMES_3.0.0/RotorKind.hpp new file mode 100644 index 000000000..d86eccaa1 --- /dev/null +++ b/CGMES_3.0.0/RotorKind.hpp @@ -0,0 +1,46 @@ +#ifndef RotorKind_H +#define RotorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of rotor on physical machine. + */ + class RotorKind + { + public: + enum RotorKind_ENUM + { + /** + * Round rotor type of synchronous machine. + */ + roundRotor, + /** + * Salient pole type of synchronous machine. + */ + salientPole, + }; + + RotorKind() : value(), initialized(false) {} + RotorKind(RotorKind_ENUM value) : value(value), initialized(true) {} + + RotorKind& operator=(RotorKind_ENUM rop); + operator RotorKind_ENUM() const; + + RotorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, RotorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const RotorKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/SVCControlMode.cpp b/CGMES_3.0.0/SVCControlMode.cpp new file mode 100644 index 000000000..4ccad37d6 --- /dev/null +++ b/CGMES_3.0.0/SVCControlMode.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SVCControlMode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SVCControlMode& SVCControlMode::operator=(SVCControlMode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SVCControlMode::operator SVCControlMode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SVCControlMode::debugName[] = "SVCControlMode"; +const char* SVCControlMode::debugString() const +{ + return SVCControlMode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SVCControlMode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SVCControlMode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "reactivePower") + { + rop = SVCControlMode::reactivePower; + return lop; + } + if(EnumSymbol == "voltage") + { + rop = SVCControlMode::voltage; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SVCControlMode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SVCControlMode::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == SVCControlMode::voltage) + { + EnumSymbol = "voltage"; + } + + if (!EnumSymbol.empty()) + { + os << "SVCControlMode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/SVCControlMode.hpp b/CGMES_3.0.0/SVCControlMode.hpp new file mode 100644 index 000000000..dfd0e532e --- /dev/null +++ b/CGMES_3.0.0/SVCControlMode.hpp @@ -0,0 +1,46 @@ +#ifndef SVCControlMode_H +#define SVCControlMode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Static VAr Compensator control mode. + */ + class SVCControlMode + { + public: + enum SVCControlMode_ENUM + { + /** + * Reactive power control. + */ + reactivePower, + /** + * Voltage control. + */ + voltage, + }; + + SVCControlMode() : value(), initialized(false) {} + SVCControlMode(SVCControlMode_ENUM value) : value(value), initialized(true) {} + + SVCControlMode& operator=(SVCControlMode_ENUM rop); + operator SVCControlMode_ENUM() const; + + SVCControlMode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SVCControlMode& rop); + friend std::ostream& operator<<(std::ostream& os, const SVCControlMode& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/SVCUserDefined.cpp b/CGMES_3.0.0/SVCUserDefined.cpp new file mode 100644 index 000000000..6785f5f84 --- /dev/null +++ b/CGMES_3.0.0/SVCUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SVCUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +SVCUserDefined::SVCUserDefined() {}; +SVCUserDefined::~SVCUserDefined() {}; + + + +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) +{ + SVCUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_SVCUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SVCUserDefined::debugName[] = "SVCUserDefined"; +const char* SVCUserDefined::debugString() const +{ + return SVCUserDefined::debugName; +} + +void SVCUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SVCUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SVCUserDefined.ProprietaryParameterDynamics"), &assign_SVCUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner SVCUserDefined::declare() +{ + return BaseClassDefiner(SVCUserDefined::addConstructToMap, SVCUserDefined::addPrimitiveAssignFnsToMap, SVCUserDefined::addClassAssignFnsToMap, SVCUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* SVCUserDefined_factory() + { + return new SVCUserDefined; + } +} diff --git a/CGMES_3.0.0/SVCUserDefined.hpp b/CGMES_3.0.0/SVCUserDefined.hpp new file mode 100644 index 000000000..d79ffd0ed --- /dev/null +++ b/CGMES_3.0.0/SVCUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef SVCUserDefined_H +#define SVCUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "StaticVarCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Static var compensator (SVC) function block whose dynamic behaviour is described by a user-defined model. + */ + class SVCUserDefined : public StaticVarCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SVCUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/Season.cpp b/CGMES_3.0.0/Season.cpp new file mode 100644 index 000000000..aa28cae01 --- /dev/null +++ b/CGMES_3.0.0/Season.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Season.hpp" + +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "MonthDay.hpp" +#include "MonthDay.hpp" + +using namespace CIMPP; + +Season::Season() {}; +Season::~Season() {}; + + + +bool assign_Season_endDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Season* element = dynamic_cast(BaseClass_ptr1)) + { + element->endDate = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Season_startDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Season* element = dynamic_cast(BaseClass_ptr1)) + { + element->startDate = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); +bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Season* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + +const char Season::debugName[] = "Season"; +const char* Season::debugString() const +{ + return Season::debugName; +} + +void Season::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Season::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:Season.SeasonDayTypeSchedules"), &assign_Season_SeasonDayTypeSchedules)); +} + +const BaseClassDefiner Season::declare() +{ + return BaseClassDefiner(Season::addConstructToMap, Season::addPrimitiveAssignFnsToMap, Season::addClassAssignFnsToMap, Season::debugName); +} + +namespace CIMPP +{ + BaseClass* Season_factory() + { + return new Season; + } +} diff --git a/CGMES_3.0.0/Season.hpp b/CGMES_3.0.0/Season.hpp new file mode 100644 index 000000000..11e60e8dc --- /dev/null +++ b/CGMES_3.0.0/Season.hpp @@ -0,0 +1,44 @@ +#ifndef Season_H +#define Season_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "MonthDay.hpp" + +namespace CIMPP +{ + class SeasonDayTypeSchedule; + + /* + A specified time period of the year. + */ + class Season : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Season_factory(); +} +#endif diff --git a/CGMES_3.0.0/SeasonDayTypeSchedule.cpp b/CGMES_3.0.0/SeasonDayTypeSchedule.cpp new file mode 100644 index 000000000..0827e77ed --- /dev/null +++ b/CGMES_3.0.0/SeasonDayTypeSchedule.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SeasonDayTypeSchedule.hpp" + +#include +#include + +#include "DayType.hpp" +#include "Season.hpp" + +using namespace CIMPP; + +SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {}; +SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {}; + + + + + +bool assign_DayType_SeasonDayTypeSchedules(BaseClass*, BaseClass*); +bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + DayType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->DayType != element2) + { + element->DayType = element2; + return assign_DayType_SeasonDayTypeSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Season_SeasonDayTypeSchedules(BaseClass*, BaseClass*); +bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + Season* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Season != element2) + { + element->Season = element2; + return assign_Season_SeasonDayTypeSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SeasonDayTypeSchedule::debugName[] = "SeasonDayTypeSchedule"; +const char* SeasonDayTypeSchedule::debugString() const +{ + return SeasonDayTypeSchedule::debugName; +} + +void SeasonDayTypeSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule"), &SeasonDayTypeSchedule_factory)); +} + +void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SeasonDayTypeSchedule::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SeasonDayTypeSchedule::declare() +{ + return BaseClassDefiner(SeasonDayTypeSchedule::addConstructToMap, SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap, SeasonDayTypeSchedule::addClassAssignFnsToMap, SeasonDayTypeSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* SeasonDayTypeSchedule_factory() + { + return new SeasonDayTypeSchedule; + } +} diff --git a/CGMES_3.0.0/SeasonDayTypeSchedule.hpp b/CGMES_3.0.0/SeasonDayTypeSchedule.hpp new file mode 100644 index 000000000..72e685e45 --- /dev/null +++ b/CGMES_3.0.0/SeasonDayTypeSchedule.hpp @@ -0,0 +1,43 @@ +#ifndef SeasonDayTypeSchedule_H +#define SeasonDayTypeSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegularIntervalSchedule.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class SeasonDayTypeSchedule : public RegularIntervalSchedule + { + public: + /* constructor initialising all attributes to null */ + SeasonDayTypeSchedule(); + ~SeasonDayTypeSchedule() override; + + CIMPP::DayType* DayType; /* DayType for the Schedule. Default: 0 */ + CIMPP::Season* Season; /* Season for the Schedule. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SeasonDayTypeSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/Seconds.cpp b/CGMES_3.0.0/Seconds.cpp new file mode 100644 index 000000000..31ff76a12 --- /dev/null +++ b/CGMES_3.0.0/Seconds.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Seconds.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Seconds& Seconds::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Seconds::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Seconds::debugName[] = "Seconds"; +const char* Seconds::debugString() const +{ + return Seconds::debugName; +} + +Seconds& Seconds::operator+=(const Seconds& rhs) +{ + value += rhs.value; + return *this; +} + +Seconds& Seconds::operator-=(const Seconds& rhs) +{ + value -= rhs.value; + return *this; +} + +Seconds& Seconds::operator*=(const Seconds& rhs) +{ + value *= rhs.value; + return *this; +} + +Seconds& Seconds::operator/=(const Seconds& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Seconds& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Seconds& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Seconds.hpp b/CGMES_3.0.0/Seconds.hpp new file mode 100644 index 000000000..60e9a668b --- /dev/null +++ b/CGMES_3.0.0/Seconds.hpp @@ -0,0 +1,39 @@ +#ifndef Seconds_H +#define Seconds_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Time, in seconds. + */ + class Seconds + { + public: + Seconds() : value(0.0), initialized(false) {} + Seconds(long double value) : value(value), initialized(true) {} + + Seconds& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Seconds& operator+=(const Seconds& rhs); + Seconds& operator-=(const Seconds& rhs); + Seconds& operator*=(const Seconds& rhs); + Seconds& operator/=(const Seconds& rhs); + + friend std::istream& operator>>(std::istream& lop, Seconds& rop); + friend std::ostream& operator<<(std::ostream& os, const Seconds& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Sensor.cpp b/CGMES_3.0.0/Sensor.cpp new file mode 100644 index 000000000..df66e4f24 --- /dev/null +++ b/CGMES_3.0.0/Sensor.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Sensor.hpp" + +#include +#include + + +using namespace CIMPP; + +Sensor::Sensor() {}; +Sensor::~Sensor() {}; + + + +const char Sensor::debugName[] = "Sensor"; +const char* Sensor::debugString() const +{ + return Sensor::debugName; +} + +void Sensor::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Sensor"), &Sensor_factory)); +} + +void Sensor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Sensor::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Sensor::declare() +{ + return BaseClassDefiner(Sensor::addConstructToMap, Sensor::addPrimitiveAssignFnsToMap, Sensor::addClassAssignFnsToMap, Sensor::debugName); +} + +namespace CIMPP +{ + BaseClass* Sensor_factory() + { + return new Sensor; + } +} diff --git a/CGMES_3.0.0/Sensor.hpp b/CGMES_3.0.0/Sensor.hpp new file mode 100644 index 000000000..19e174baf --- /dev/null +++ b/CGMES_3.0.0/Sensor.hpp @@ -0,0 +1,39 @@ +#ifndef Sensor_H +#define Sensor_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AuxiliaryEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class Sensor : public AuxiliaryEquipment + { + public: + /* constructor initialising all attributes to null */ + Sensor(); + ~Sensor() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Sensor_factory(); +} +#endif diff --git a/CGMES_3.0.0/SeriesCompensator.cpp b/CGMES_3.0.0/SeriesCompensator.cpp new file mode 100644 index 000000000..3c0a3d55b --- /dev/null +++ b/CGMES_3.0.0/SeriesCompensator.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SeriesCompensator.hpp" + +#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() {}; + + +bool assign_SeriesCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_varistorPresent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->varistorPresent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->varistorRatedCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->varistorVoltageThreshold; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SeriesCompensator_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char SeriesCompensator::debugName[] = "SeriesCompensator"; +const char* SeriesCompensator::debugString() const +{ + return SeriesCompensator::debugName; +} + +void SeriesCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SeriesCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SeriesCompensator::declare() +{ + return BaseClassDefiner(SeriesCompensator::addConstructToMap, SeriesCompensator::addPrimitiveAssignFnsToMap, SeriesCompensator::addClassAssignFnsToMap, SeriesCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* SeriesCompensator_factory() + { + return new SeriesCompensator; + } +} diff --git a/CGMES_3.0.0/SeriesCompensator.hpp b/CGMES_3.0.0/SeriesCompensator.hpp new file mode 100644 index 000000000..458f555c2 --- /dev/null +++ b/CGMES_3.0.0/SeriesCompensator.hpp @@ -0,0 +1,51 @@ +#ifndef SeriesCompensator_H +#define SeriesCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" + +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. + */ + class SeriesCompensator : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SeriesCompensator_factory(); +} +#endif diff --git a/CGMES_3.0.0/ServiceLocation.cpp b/CGMES_3.0.0/ServiceLocation.cpp new file mode 100644 index 000000000..16b87c5af --- /dev/null +++ b/CGMES_3.0.0/ServiceLocation.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ServiceLocation.hpp" + +#include +#include + + +using namespace CIMPP; + +ServiceLocation::ServiceLocation() {}; +ServiceLocation::~ServiceLocation() {}; + + + +const char ServiceLocation::debugName[] = "ServiceLocation"; +const char* ServiceLocation::debugString() const +{ + return ServiceLocation::debugName; +} + +void ServiceLocation::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ServiceLocation"), &ServiceLocation_factory)); +} + +void ServiceLocation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ServiceLocation::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner ServiceLocation::declare() +{ + return BaseClassDefiner(ServiceLocation::addConstructToMap, ServiceLocation::addPrimitiveAssignFnsToMap, ServiceLocation::addClassAssignFnsToMap, ServiceLocation::debugName); +} + +namespace CIMPP +{ + BaseClass* ServiceLocation_factory() + { + return new ServiceLocation; + } +} diff --git a/CGMES_3.0.0/ServiceLocation.hpp b/CGMES_3.0.0/ServiceLocation.hpp new file mode 100644 index 000000000..1ec342633 --- /dev/null +++ b/CGMES_3.0.0/ServiceLocation.hpp @@ -0,0 +1,39 @@ +#ifndef ServiceLocation_H +#define ServiceLocation_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WorkLocation.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + A real estate location, commonly referred to as premises. + */ + class ServiceLocation : public WorkLocation + { + public: + /* constructor initialising all attributes to null */ + ServiceLocation(); + ~ServiceLocation() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ServiceLocation_factory(); +} +#endif diff --git a/CGMES_3.0.0/SetPoint.cpp b/CGMES_3.0.0/SetPoint.cpp new file mode 100644 index 000000000..6872d4919 --- /dev/null +++ b/CGMES_3.0.0/SetPoint.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SetPoint.hpp" + +#include +#include + +#include "Float.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +SetPoint::SetPoint() {}; +SetPoint::~SetPoint() {}; + + +bool assign_SetPoint_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SetPoint_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char SetPoint::debugName[] = "SetPoint"; +const char* SetPoint::debugString() const +{ + return SetPoint::debugName; +} + +void SetPoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SetPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SetPoint::declare() +{ + return BaseClassDefiner(SetPoint::addConstructToMap, SetPoint::addPrimitiveAssignFnsToMap, SetPoint::addClassAssignFnsToMap, SetPoint::debugName); +} + +namespace CIMPP +{ + BaseClass* SetPoint_factory() + { + return new SetPoint; + } +} diff --git a/CGMES_3.0.0/SetPoint.hpp b/CGMES_3.0.0/SetPoint.hpp new file mode 100644 index 000000000..b11186701 --- /dev/null +++ b/CGMES_3.0.0/SetPoint.hpp @@ -0,0 +1,42 @@ +#ifndef SetPoint_H +#define SetPoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AnalogControl.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + + /* + An analog control that issues a set point value. + */ + class SetPoint : public AnalogControl + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SetPoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/ShortCircuitRotorKind.cpp b/CGMES_3.0.0/ShortCircuitRotorKind.cpp new file mode 100644 index 000000000..9e7ea1852 --- /dev/null +++ b/CGMES_3.0.0/ShortCircuitRotorKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ShortCircuitRotorKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +ShortCircuitRotorKind& ShortCircuitRotorKind::operator=(ShortCircuitRotorKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +ShortCircuitRotorKind::operator ShortCircuitRotorKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char ShortCircuitRotorKind::debugName[] = "ShortCircuitRotorKind"; +const char* ShortCircuitRotorKind::debugString() const +{ + return ShortCircuitRotorKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, ShortCircuitRotorKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "salientPole1") + { + rop = ShortCircuitRotorKind::salientPole1; + return lop; + } + if(EnumSymbol == "salientPole2") + { + rop = ShortCircuitRotorKind::salientPole2; + return lop; + } + if(EnumSymbol == "turboSeries1") + { + rop = ShortCircuitRotorKind::turboSeries1; + return lop; + } + if(EnumSymbol == "turboSeries2") + { + rop = ShortCircuitRotorKind::turboSeries2; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const ShortCircuitRotorKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == ShortCircuitRotorKind::salientPole1) + { + EnumSymbol = "salientPole1"; + } + if (obj.value == ShortCircuitRotorKind::salientPole2) + { + EnumSymbol = "salientPole2"; + } + if (obj.value == ShortCircuitRotorKind::turboSeries1) + { + EnumSymbol = "turboSeries1"; + } + if (obj.value == ShortCircuitRotorKind::turboSeries2) + { + EnumSymbol = "turboSeries2"; + } + + if (!EnumSymbol.empty()) + { + os << "ShortCircuitRotorKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/ShortCircuitRotorKind.hpp b/CGMES_3.0.0/ShortCircuitRotorKind.hpp new file mode 100644 index 000000000..f40d90799 --- /dev/null +++ b/CGMES_3.0.0/ShortCircuitRotorKind.hpp @@ -0,0 +1,54 @@ +#ifndef ShortCircuitRotorKind_H +#define ShortCircuitRotorKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of rotor, used by short circuit applications. + */ + class ShortCircuitRotorKind + { + public: + enum ShortCircuitRotorKind_ENUM + { + /** + * Salient pole 1 in IEC 60909. + */ + salientPole1, + /** + * Salient pole 2 in IEC 60909. + */ + salientPole2, + /** + * Turbo Series 1 in IEC 60909. + */ + turboSeries1, + /** + * Turbo series 2 in IEC 60909. + */ + turboSeries2, + }; + + ShortCircuitRotorKind() : value(), initialized(false) {} + ShortCircuitRotorKind(ShortCircuitRotorKind_ENUM value) : value(value), initialized(true) {} + + ShortCircuitRotorKind& operator=(ShortCircuitRotorKind_ENUM rop); + operator ShortCircuitRotorKind_ENUM() const; + + ShortCircuitRotorKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, ShortCircuitRotorKind& rop); + friend std::ostream& operator<<(std::ostream& os, const ShortCircuitRotorKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ShuntCompensator.cpp b/CGMES_3.0.0/ShuntCompensator.cpp new file mode 100644 index 000000000..bd1064aef --- /dev/null +++ b/CGMES_3.0.0/ShuntCompensator.cpp @@ -0,0 +1,179 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ShuntCompensator.hpp" + +#include +#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() {}; + + + +bool assign_ShuntCompensator_aVRDelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->aVRDelay; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->grounded; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_maximumSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maximumSections; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_nomU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->nomU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_normalSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalSections; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_ShuntCompensator_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + +const char ShuntCompensator::debugName[] = "ShuntCompensator"; +const char* ShuntCompensator::debugString() const +{ + return ShuntCompensator::debugName; +} + +void ShuntCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.SvShuntCompensatorSections"), &assign_ShuntCompensator_SvShuntCompensatorSections)); +} + +const BaseClassDefiner ShuntCompensator::declare() +{ + return BaseClassDefiner(ShuntCompensator::addConstructToMap, ShuntCompensator::addPrimitiveAssignFnsToMap, ShuntCompensator::addClassAssignFnsToMap, ShuntCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* ShuntCompensator_factory() + { + return new ShuntCompensator; + } +} diff --git a/CGMES_3.0.0/ShuntCompensator.hpp b/CGMES_3.0.0/ShuntCompensator.hpp new file mode 100644 index 000000000..074d3460b --- /dev/null +++ b/CGMES_3.0.0/ShuntCompensator.hpp @@ -0,0 +1,54 @@ +#ifndef ShuntCompensator_H +#define ShuntCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "Seconds.hpp" +#include "Voltage.hpp" +#include "VoltagePerReactivePower.hpp" + +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. + */ + class ShuntCompensator : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ShuntCompensator_factory(); +} +#endif diff --git a/CGMES_3.0.0/SolarGeneratingUnit.cpp b/CGMES_3.0.0/SolarGeneratingUnit.cpp new file mode 100644 index 000000000..e5d15b16d --- /dev/null +++ b/CGMES_3.0.0/SolarGeneratingUnit.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SolarGeneratingUnit.hpp" + +#include +#include + +#include "SolarPowerPlant.hpp" + +using namespace CIMPP; + +SolarGeneratingUnit::SolarGeneratingUnit() : SolarPowerPlant(nullptr) {}; +SolarGeneratingUnit::~SolarGeneratingUnit() {}; + + + + +bool assign_SolarPowerPlant_SolarGeneratingUnits(BaseClass*, BaseClass*); +bool assign_SolarGeneratingUnit_SolarPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SolarGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + SolarPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SolarPowerPlant != element2) + { + element->SolarPowerPlant = element2; + return assign_SolarPowerPlant_SolarGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SolarGeneratingUnit::debugName[] = "SolarGeneratingUnit"; +const char* SolarGeneratingUnit::debugString() const +{ + return SolarGeneratingUnit::debugName; +} + +void SolarGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit"), &SolarGeneratingUnit_factory)); +} + +void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SolarGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit.SolarPowerPlant"), &assign_SolarGeneratingUnit_SolarPowerPlant)); +} + +const BaseClassDefiner SolarGeneratingUnit::declare() +{ + return BaseClassDefiner(SolarGeneratingUnit::addConstructToMap, SolarGeneratingUnit::addPrimitiveAssignFnsToMap, SolarGeneratingUnit::addClassAssignFnsToMap, SolarGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* SolarGeneratingUnit_factory() + { + return new SolarGeneratingUnit; + } +} diff --git a/CGMES_3.0.0/SolarGeneratingUnit.hpp b/CGMES_3.0.0/SolarGeneratingUnit.hpp new file mode 100644 index 000000000..a2cd7b0a7 --- /dev/null +++ b/CGMES_3.0.0/SolarGeneratingUnit.hpp @@ -0,0 +1,41 @@ +#ifndef SolarGeneratingUnit_H +#define SolarGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class SolarGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + SolarGeneratingUnit(); + ~SolarGeneratingUnit() override; + + CIMPP::SolarPowerPlant* SolarPowerPlant; /* A solar power plant may have solar generating units. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SolarGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/SolarPowerPlant.cpp b/CGMES_3.0.0/SolarPowerPlant.cpp new file mode 100644 index 000000000..22406be35 --- /dev/null +++ b/CGMES_3.0.0/SolarPowerPlant.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SolarPowerPlant.hpp" + +#include +#include + +#include "SolarGeneratingUnit.hpp" + +using namespace CIMPP; + +SolarPowerPlant::SolarPowerPlant() {}; +SolarPowerPlant::~SolarPowerPlant() {}; + + + + +bool assign_SolarGeneratingUnit_SolarPowerPlant(BaseClass*, BaseClass*); +bool assign_SolarPowerPlant_SolarGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SolarPowerPlant* element = dynamic_cast(BaseClass_ptr1); + SolarGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->SolarGeneratingUnits.begin(), element->SolarGeneratingUnits.end(), element2) == element->SolarGeneratingUnits.end()) + { + element->SolarGeneratingUnits.push_back(element2); + return assign_SolarGeneratingUnit_SolarPowerPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SolarPowerPlant::debugName[] = "SolarPowerPlant"; +const char* SolarPowerPlant::debugString() const +{ + return SolarPowerPlant::debugName; +} + +void SolarPowerPlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SolarPowerPlant"), &SolarPowerPlant_factory)); +} + +void SolarPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SolarPowerPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SolarPowerPlant.SolarGeneratingUnits"), &assign_SolarPowerPlant_SolarGeneratingUnits)); +} + +const BaseClassDefiner SolarPowerPlant::declare() +{ + return BaseClassDefiner(SolarPowerPlant::addConstructToMap, SolarPowerPlant::addPrimitiveAssignFnsToMap, SolarPowerPlant::addClassAssignFnsToMap, SolarPowerPlant::debugName); +} + +namespace CIMPP +{ + BaseClass* SolarPowerPlant_factory() + { + return new SolarPowerPlant; + } +} diff --git a/CGMES_3.0.0/SolarPowerPlant.hpp b/CGMES_3.0.0/SolarPowerPlant.hpp new file mode 100644 index 000000000..d9dcd3a04 --- /dev/null +++ b/CGMES_3.0.0/SolarPowerPlant.hpp @@ -0,0 +1,41 @@ +#ifndef SolarPowerPlant_H +#define SolarPowerPlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class SolarGeneratingUnit; + + /* + Solar power plant. + */ + class SolarPowerPlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + SolarPowerPlant(); + ~SolarPowerPlant() override; + + std::list SolarGeneratingUnits; /* A solar generating unit or units may be a member of a solar power plant. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SolarPowerPlant_factory(); +} +#endif diff --git a/CGMES_3.0.0/Source.cpp b/CGMES_3.0.0/Source.cpp new file mode 100644 index 000000000..54f9266b5 --- /dev/null +++ b/CGMES_3.0.0/Source.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Source.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Source& Source::operator=(Source_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +Source::operator Source_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Source::debugName[] = "Source"; +const char* Source::debugString() const +{ + return Source::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Source& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "Source") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "PROCESS") + { + rop = Source::PROCESS; + return lop; + } + if(EnumSymbol == "DEFAULTED") + { + rop = Source::DEFAULTED; + return lop; + } + if(EnumSymbol == "SUBSTITUTED") + { + rop = Source::SUBSTITUTED; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Source& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == Source::PROCESS) + { + EnumSymbol = "PROCESS"; + } + if (obj.value == Source::DEFAULTED) + { + EnumSymbol = "DEFAULTED"; + } + if (obj.value == Source::SUBSTITUTED) + { + EnumSymbol = "SUBSTITUTED"; + } + + if (!EnumSymbol.empty()) + { + os << "Source." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/Source.hpp b/CGMES_3.0.0/Source.hpp new file mode 100644 index 000000000..0cbf17fb0 --- /dev/null +++ b/CGMES_3.0.0/Source.hpp @@ -0,0 +1,50 @@ +#ifndef Source_H +#define Source_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + PROCESS, + /** + * The value contains a default value. + */ + DEFAULTED, + /** + * The value is provided by input of an operator or by an automatic source. + */ + SUBSTITUTED, + }; + + Source() : value(), initialized(false) {} + Source(Source_ENUM value) : value(value), initialized(true) {} + + Source& operator=(Source_ENUM rop); + operator Source_ENUM() const; + + Source_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Source& rop); + friend std::ostream& operator<<(std::ostream& os, const Source& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/StaticLoadModelKind.cpp b/CGMES_3.0.0/StaticLoadModelKind.cpp new file mode 100644 index 000000000..e3d149299 --- /dev/null +++ b/CGMES_3.0.0/StaticLoadModelKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StaticLoadModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +StaticLoadModelKind& StaticLoadModelKind::operator=(StaticLoadModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +StaticLoadModelKind::operator StaticLoadModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char StaticLoadModelKind::debugName[] = "StaticLoadModelKind"; +const char* StaticLoadModelKind::debugString() const +{ + return StaticLoadModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, StaticLoadModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "StaticLoadModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "exponential") + { + rop = StaticLoadModelKind::exponential; + return lop; + } + if(EnumSymbol == "zIP1") + { + rop = StaticLoadModelKind::zIP1; + return lop; + } + if(EnumSymbol == "zIP2") + { + rop = StaticLoadModelKind::zIP2; + return lop; + } + if(EnumSymbol == "constantZ") + { + rop = StaticLoadModelKind::constantZ; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const StaticLoadModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == StaticLoadModelKind::exponential) + { + EnumSymbol = "exponential"; + } + if (obj.value == StaticLoadModelKind::zIP1) + { + EnumSymbol = "zIP1"; + } + if (obj.value == StaticLoadModelKind::zIP2) + { + EnumSymbol = "zIP2"; + } + if (obj.value == StaticLoadModelKind::constantZ) + { + EnumSymbol = "constantZ"; + } + + if (!EnumSymbol.empty()) + { + os << "StaticLoadModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/StaticLoadModelKind.hpp b/CGMES_3.0.0/StaticLoadModelKind.hpp new file mode 100644 index 000000000..ace949842 --- /dev/null +++ b/CGMES_3.0.0/StaticLoadModelKind.hpp @@ -0,0 +1,54 @@ +#ifndef StaticLoadModelKind_H +#define StaticLoadModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + zIP2, + /** + * The load is represented as a constant impedance. ConstantZ equations are used for active and reactive power and no attributes are required. + */ + constantZ, + }; + + StaticLoadModelKind() : value(), initialized(false) {} + StaticLoadModelKind(StaticLoadModelKind_ENUM value) : value(value), initialized(true) {} + + StaticLoadModelKind& operator=(StaticLoadModelKind_ENUM rop); + operator StaticLoadModelKind_ENUM() const; + + StaticLoadModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, StaticLoadModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const StaticLoadModelKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/StaticVarCompensator.cpp b/CGMES_3.0.0/StaticVarCompensator.cpp new file mode 100644 index 000000000..f61f90c0e --- /dev/null +++ b/CGMES_3.0.0/StaticVarCompensator.cpp @@ -0,0 +1,163 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StaticVarCompensator.hpp" + +#include +#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() {}; + + + +bool assign_StaticVarCompensator_capacitiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->capacitiveRating; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_inductiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->inductiveRating; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_sVCControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->sVCControlMode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_slope(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->slope; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageSetPoint; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass*, BaseClass*); +bool assign_StaticVarCompensator_StaticVarCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + StaticVarCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->StaticVarCompensatorDynamics != element2) + { + element->StaticVarCompensatorDynamics = element2; + return assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + +const char StaticVarCompensator::debugName[] = "StaticVarCompensator"; +const char* StaticVarCompensator::debugString() const +{ + return StaticVarCompensator::debugName; +} + +void StaticVarCompensator::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void StaticVarCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.StaticVarCompensatorDynamics"), &assign_StaticVarCompensator_StaticVarCompensatorDynamics)); +} + +const BaseClassDefiner StaticVarCompensator::declare() +{ + return BaseClassDefiner(StaticVarCompensator::addConstructToMap, StaticVarCompensator::addPrimitiveAssignFnsToMap, StaticVarCompensator::addClassAssignFnsToMap, StaticVarCompensator::debugName); +} + +namespace CIMPP +{ + BaseClass* StaticVarCompensator_factory() + { + return new StaticVarCompensator; + } +} diff --git a/CGMES_3.0.0/StaticVarCompensator.hpp b/CGMES_3.0.0/StaticVarCompensator.hpp new file mode 100644 index 000000000..279e6102e --- /dev/null +++ b/CGMES_3.0.0/StaticVarCompensator.hpp @@ -0,0 +1,52 @@ +#ifndef StaticVarCompensator_H +#define StaticVarCompensator_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingCondEq.hpp" +#include "BaseClassDefiner.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "SVCControlMode.hpp" +#include "Voltage.hpp" +#include "VoltagePerReactivePower.hpp" + +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. + */ + class StaticVarCompensator : public RegulatingCondEq + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StaticVarCompensator_factory(); +} +#endif diff --git a/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp b/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp new file mode 100644 index 000000000..40b00fce9 --- /dev/null +++ b/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StaticVarCompensatorDynamics.hpp" + +#include +#include + +#include "StaticVarCompensator.hpp" + +using namespace CIMPP; + +StaticVarCompensatorDynamics::StaticVarCompensatorDynamics() : StaticVarCompensator(nullptr) {}; +StaticVarCompensatorDynamics::~StaticVarCompensatorDynamics() {}; + + + + +bool assign_StaticVarCompensator_StaticVarCompensatorDynamics(BaseClass*, BaseClass*); +bool assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + StaticVarCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + StaticVarCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->StaticVarCompensator != element2) + { + element->StaticVarCompensator = element2; + return assign_StaticVarCompensator_StaticVarCompensatorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char StaticVarCompensatorDynamics::debugName[] = "StaticVarCompensatorDynamics"; +const char* StaticVarCompensatorDynamics::debugString() const +{ + return StaticVarCompensatorDynamics::debugName; +} + +void StaticVarCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:StaticVarCompensatorDynamics"), &StaticVarCompensatorDynamics_factory)); +} + +void StaticVarCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void StaticVarCompensatorDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensatorDynamics.StaticVarCompensator"), &assign_StaticVarCompensatorDynamics_StaticVarCompensator)); +} + +const BaseClassDefiner StaticVarCompensatorDynamics::declare() +{ + return BaseClassDefiner(StaticVarCompensatorDynamics::addConstructToMap, StaticVarCompensatorDynamics::addPrimitiveAssignFnsToMap, StaticVarCompensatorDynamics::addClassAssignFnsToMap, StaticVarCompensatorDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* StaticVarCompensatorDynamics_factory() + { + return new StaticVarCompensatorDynamics; + } +} diff --git a/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp b/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp new file mode 100644 index 000000000..1fb931b1f --- /dev/null +++ b/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef StaticVarCompensatorDynamics_H +#define StaticVarCompensatorDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class StaticVarCompensatorDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + StaticVarCompensatorDynamics(); + ~StaticVarCompensatorDynamics() override; + + CIMPP::StaticVarCompensator* StaticVarCompensator; /* Static Var Compensator to which Static Var Compensator dynamics model applies. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StaticVarCompensatorDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/StationSupply.cpp b/CGMES_3.0.0/StationSupply.cpp new file mode 100644 index 000000000..ba3e084c7 --- /dev/null +++ b/CGMES_3.0.0/StationSupply.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StationSupply.hpp" + +#include +#include + + +using namespace CIMPP; + +StationSupply::StationSupply() {}; +StationSupply::~StationSupply() {}; + + + +const char StationSupply::debugName[] = "StationSupply"; +const char* StationSupply::debugString() const +{ + return StationSupply::debugName; +} + +void StationSupply::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:StationSupply"), &StationSupply_factory)); +} + +void StationSupply::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void StationSupply::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner StationSupply::declare() +{ + return BaseClassDefiner(StationSupply::addConstructToMap, StationSupply::addPrimitiveAssignFnsToMap, StationSupply::addClassAssignFnsToMap, StationSupply::debugName); +} + +namespace CIMPP +{ + BaseClass* StationSupply_factory() + { + return new StationSupply; + } +} diff --git a/CGMES_3.0.0/StationSupply.hpp b/CGMES_3.0.0/StationSupply.hpp new file mode 100644 index 000000000..e8dad59fe --- /dev/null +++ b/CGMES_3.0.0/StationSupply.hpp @@ -0,0 +1,39 @@ +#ifndef StationSupply_H +#define StationSupply_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyConsumer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + Station supply with load derived from the station output. + */ + class StationSupply : public EnergyConsumer + { + public: + /* constructor initialising all attributes to null */ + StationSupply(); + ~StationSupply() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StationSupply_factory(); +} +#endif diff --git a/CGMES_3.0.0/Status.cpp b/CGMES_3.0.0/Status.cpp new file mode 100644 index 000000000..554ef20df --- /dev/null +++ b/CGMES_3.0.0/Status.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Status.hpp" + +#include +#include + +#include "DateTime.hpp" +#include "String.hpp" +#include "String.hpp" +#include "String.hpp" + +using namespace CIMPP; + +Status::Status() {}; +Status::~Status() {}; + + +bool assign_Status_dateTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Status* element = dynamic_cast(BaseClass_ptr1)) + { + element->dateTime = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Status_reason(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Status* element = dynamic_cast(BaseClass_ptr1)) + { + element->reason = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Status_remark(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Status* element = dynamic_cast(BaseClass_ptr1)) + { + element->remark = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Status_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Status* element = dynamic_cast(BaseClass_ptr1)) + { + element->value = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char Status::debugName[] = "Status"; +const char* Status::debugString() const +{ + return Status::debugName; +} + +void Status::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void Status::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner Status::declare() +{ + return BaseClassDefiner(Status::addConstructToMap, Status::addPrimitiveAssignFnsToMap, Status::addClassAssignFnsToMap, Status::debugName); +} + +namespace CIMPP +{ + BaseClass* Status_factory() + { + return new Status; + } +} diff --git a/CGMES_3.0.0/Status.hpp b/CGMES_3.0.0/Status.hpp new file mode 100644 index 000000000..4a8678891 --- /dev/null +++ b/CGMES_3.0.0/Status.hpp @@ -0,0 +1,45 @@ +#ifndef Status_H +#define Status_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "DateTime.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Current status information relevant to an entity. + */ + class Status : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Status_factory(); +} +#endif diff --git a/CGMES_3.0.0/StreetAddress.cpp b/CGMES_3.0.0/StreetAddress.cpp new file mode 100644 index 000000000..ac3e544c9 --- /dev/null +++ b/CGMES_3.0.0/StreetAddress.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StreetAddress.hpp" + +#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() {}; + + +bool assign_StreetAddress_language(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + { + element->language = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetAddress_poBox(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + { + element->poBox = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetAddress_postalCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + { + element->postalCode = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +bool assign_StreetAddress_status(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + if(StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + { + element->status = dynamic_cast(BaseClass_ptr2); + if (element->status != nullptr) + { + return true; + } + } + return false; +} + +bool assign_StreetAddress_streetDetail(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + if(StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + { + element->streetDetail = dynamic_cast(BaseClass_ptr2); + if (element->streetDetail != nullptr) + { + return true; + } + } + return false; +} + +bool assign_StreetAddress_townDetail(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + if(StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + { + element->townDetail = dynamic_cast(BaseClass_ptr2); + if (element->townDetail != nullptr) + { + return true; + } + } + return false; +} + +const char StreetAddress::debugName[] = "StreetAddress"; +const char* StreetAddress::debugString() const +{ + return StreetAddress::debugName; +} + +void StreetAddress::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner StreetAddress::declare() +{ + return BaseClassDefiner(StreetAddress::addConstructToMap, StreetAddress::addPrimitiveAssignFnsToMap, StreetAddress::addClassAssignFnsToMap, StreetAddress::debugName); +} + +namespace CIMPP +{ + BaseClass* StreetAddress_factory() + { + return new StreetAddress; + } +} diff --git a/CGMES_3.0.0/StreetAddress.hpp b/CGMES_3.0.0/StreetAddress.hpp new file mode 100644 index 000000000..321f7cc5f --- /dev/null +++ b/CGMES_3.0.0/StreetAddress.hpp @@ -0,0 +1,49 @@ +#ifndef StreetAddress_H +#define StreetAddress_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + class Status; + class StreetDetail; + class TownDetail; + + /* + General purpose street and postal address information. + */ + class StreetAddress : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StreetAddress_factory(); +} +#endif diff --git a/CGMES_3.0.0/StreetDetail.cpp b/CGMES_3.0.0/StreetDetail.cpp new file mode 100644 index 000000000..230533b38 --- /dev/null +++ b/CGMES_3.0.0/StreetDetail.cpp @@ -0,0 +1,255 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StreetDetail.hpp" + +#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() {}; + + +bool assign_StreetDetail_addressGeneral(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->addressGeneral = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_addressGeneral2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->addressGeneral2 = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_addressGeneral3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->addressGeneral3 = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_buildingName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->buildingName = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_code(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->code = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_floorIdentification(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->floorIdentification = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->name = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_number(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->number = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_prefix(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->prefix = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_suffix(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->suffix = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_suiteNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->suiteNumber = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->type = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_StreetDetail_withinTownLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->withinTownLimits; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + +const char StreetDetail::debugName[] = "StreetDetail"; +const char* StreetDetail::debugString() const +{ + return StreetDetail::debugName; +} + +void StreetDetail::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void StreetDetail::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner StreetDetail::declare() +{ + return BaseClassDefiner(StreetDetail::addConstructToMap, StreetDetail::addPrimitiveAssignFnsToMap, StreetDetail::addClassAssignFnsToMap, StreetDetail::debugName); +} + +namespace CIMPP +{ + BaseClass* StreetDetail_factory() + { + return new StreetDetail; + } +} diff --git a/CGMES_3.0.0/StreetDetail.hpp b/CGMES_3.0.0/StreetDetail.hpp new file mode 100644 index 000000000..f4b326936 --- /dev/null +++ b/CGMES_3.0.0/StreetDetail.hpp @@ -0,0 +1,54 @@ +#ifndef StreetDetail_H +#define StreetDetail_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Street details, in the context of address. + */ + class StreetDetail : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StreetDetail_factory(); +} +#endif diff --git a/CGMES_3.0.0/String.cpp b/CGMES_3.0.0/String.cpp new file mode 100644 index 000000000..e39ff2f00 --- /dev/null +++ b/CGMES_3.0.0/String.cpp @@ -0,0 +1,49 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "String.hpp" + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +String& String::operator=(const std::string& rop) +{ + value = rop; + initialized = true; + return *this; +} + +String::operator std::string() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char String::debugName[] = "String"; +const char* String::debugString() const +{ + return String::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, String& rop) + { + lop >> rop.value; + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const String& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/String.hpp b/CGMES_3.0.0/String.hpp new file mode 100644 index 000000000..60fcbbbc0 --- /dev/null +++ b/CGMES_3.0.0/String.hpp @@ -0,0 +1,35 @@ +#ifndef String_H +#define String_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#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. + */ + class String + { + public: + String() : initialized(false) {} + String(const std::string& value) : value(value), initialized(true) {} + + String& operator=(const std::string &rop); + operator std::string() const; + + std::string value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, String& rop); + friend std::ostream& operator<<(std::ostream& os, const String& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/StringMeasurement.cpp b/CGMES_3.0.0/StringMeasurement.cpp new file mode 100644 index 000000000..1eb7acf05 --- /dev/null +++ b/CGMES_3.0.0/StringMeasurement.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StringMeasurement.hpp" + +#include +#include + +#include "StringMeasurementValue.hpp" + +using namespace CIMPP; + +StringMeasurement::StringMeasurement() {}; +StringMeasurement::~StringMeasurement() {}; + + + + +bool assign_StringMeasurementValue_StringMeasurement(BaseClass*, BaseClass*); +bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + StringMeasurement* element = dynamic_cast(BaseClass_ptr1); + StringMeasurementValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->StringMeasurementValues.begin(), element->StringMeasurementValues.end(), element2) == element->StringMeasurementValues.end()) + { + element->StringMeasurementValues.push_back(element2); + return assign_StringMeasurementValue_StringMeasurement(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char StringMeasurement::debugName[] = "StringMeasurement"; +const char* StringMeasurement::debugString() const +{ + return StringMeasurement::debugName; +} + +void StringMeasurement::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:StringMeasurement"), &StringMeasurement_factory)); +} + +void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void StringMeasurement::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:StringMeasurement.StringMeasurementValues"), &assign_StringMeasurement_StringMeasurementValues)); +} + +const BaseClassDefiner StringMeasurement::declare() +{ + return BaseClassDefiner(StringMeasurement::addConstructToMap, StringMeasurement::addPrimitiveAssignFnsToMap, StringMeasurement::addClassAssignFnsToMap, StringMeasurement::debugName); +} + +namespace CIMPP +{ + BaseClass* StringMeasurement_factory() + { + return new StringMeasurement; + } +} diff --git a/CGMES_3.0.0/StringMeasurement.hpp b/CGMES_3.0.0/StringMeasurement.hpp new file mode 100644 index 000000000..dbe295067 --- /dev/null +++ b/CGMES_3.0.0/StringMeasurement.hpp @@ -0,0 +1,41 @@ +#ifndef StringMeasurement_H +#define StringMeasurement_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Measurement.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class StringMeasurementValue; + + /* + StringMeasurement represents a measurement with values of type string. + */ + class StringMeasurement : public Measurement + { + public: + /* constructor initialising all attributes to null */ + StringMeasurement(); + ~StringMeasurement() override; + + std::list StringMeasurementValues; /* The values connected to this measurement. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StringMeasurement_factory(); +} +#endif diff --git a/CGMES_3.0.0/StringMeasurementValue.cpp b/CGMES_3.0.0/StringMeasurementValue.cpp new file mode 100644 index 000000000..2dbb42785 --- /dev/null +++ b/CGMES_3.0.0/StringMeasurementValue.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "StringMeasurementValue.hpp" + +#include +#include + +#include "StringMeasurement.hpp" + +using namespace CIMPP; + +StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {}; +StringMeasurementValue::~StringMeasurementValue() {}; + + + + +bool assign_StringMeasurement_StringMeasurementValues(BaseClass*, BaseClass*); +bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + StringMeasurement* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->StringMeasurement != element2) + { + element->StringMeasurement = element2; + return assign_StringMeasurement_StringMeasurementValues(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char StringMeasurementValue::debugName[] = "StringMeasurementValue"; +const char* StringMeasurementValue::debugString() const +{ + return StringMeasurementValue::debugName; +} + +void StringMeasurementValue::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:StringMeasurementValue"), &StringMeasurementValue_factory)); +} + +void StringMeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void StringMeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.StringMeasurement"), &assign_StringMeasurementValue_StringMeasurement)); +} + +const BaseClassDefiner StringMeasurementValue::declare() +{ + return BaseClassDefiner(StringMeasurementValue::addConstructToMap, StringMeasurementValue::addPrimitiveAssignFnsToMap, StringMeasurementValue::addClassAssignFnsToMap, StringMeasurementValue::debugName); +} + +namespace CIMPP +{ + BaseClass* StringMeasurementValue_factory() + { + return new StringMeasurementValue; + } +} diff --git a/CGMES_3.0.0/StringMeasurementValue.hpp b/CGMES_3.0.0/StringMeasurementValue.hpp new file mode 100644 index 000000000..1b4131e29 --- /dev/null +++ b/CGMES_3.0.0/StringMeasurementValue.hpp @@ -0,0 +1,41 @@ +#ifndef StringMeasurementValue_H +#define StringMeasurementValue_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "MeasurementValue.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class StringMeasurement; + + /* + StringMeasurementValue represents a measurement value of type string. + */ + class StringMeasurementValue : public MeasurementValue + { + public: + /* constructor initialising all attributes to null */ + StringMeasurementValue(); + ~StringMeasurementValue() override; + + CIMPP::StringMeasurement* StringMeasurement; /* Measurement to which this value is connected. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* StringMeasurementValue_factory(); +} +#endif diff --git a/CGMES_3.0.0/SubGeographicalRegion.cpp b/CGMES_3.0.0/SubGeographicalRegion.cpp new file mode 100644 index 000000000..f16780fa0 --- /dev/null +++ b/CGMES_3.0.0/SubGeographicalRegion.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SubGeographicalRegion.hpp" + +#include +#include + +#include "DCLine.hpp" +#include "Line.hpp" +#include "GeographicalRegion.hpp" +#include "Substation.hpp" + +using namespace CIMPP; + +SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {}; +SubGeographicalRegion::~SubGeographicalRegion() {}; + + + + + + + +bool assign_DCLine_Region(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + DCLine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCLines.begin(), element->DCLines.end(), element2) == element->DCLines.end()) + { + element->DCLines.push_back(element2); + return assign_DCLine_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Line_Region(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + Line* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Lines.begin(), element->Lines.end(), element2) == element->Lines.end()) + { + element->Lines.push_back(element2); + return assign_Line_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeographicalRegion_Regions(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + GeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_GeographicalRegion_Regions(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Substation_Region(BaseClass*, BaseClass*); +bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + Substation* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Substations.begin(), element->Substations.end(), element2) == element->Substations.end()) + { + element->Substations.push_back(element2); + return assign_Substation_Region(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SubGeographicalRegion::debugName[] = "SubGeographicalRegion"; +const char* SubGeographicalRegion::debugString() const +{ + return SubGeographicalRegion::debugName; +} + +void SubGeographicalRegion::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion"), &SubGeographicalRegion_factory)); +} + +void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SubGeographicalRegion::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SubGeographicalRegion::declare() +{ + return BaseClassDefiner(SubGeographicalRegion::addConstructToMap, SubGeographicalRegion::addPrimitiveAssignFnsToMap, SubGeographicalRegion::addClassAssignFnsToMap, SubGeographicalRegion::debugName); +} + +namespace CIMPP +{ + BaseClass* SubGeographicalRegion_factory() + { + return new SubGeographicalRegion; + } +} diff --git a/CGMES_3.0.0/SubGeographicalRegion.hpp b/CGMES_3.0.0/SubGeographicalRegion.hpp new file mode 100644 index 000000000..d23d0c1a0 --- /dev/null +++ b/CGMES_3.0.0/SubGeographicalRegion.hpp @@ -0,0 +1,47 @@ +#ifndef SubGeographicalRegion_H +#define SubGeographicalRegion_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCLine; + class GeographicalRegion; + class Line; + class Substation; + + /* + A subset of a geographical region of a power system network model. + */ + class SubGeographicalRegion : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SubGeographicalRegion_factory(); +} +#endif diff --git a/CGMES_3.0.0/SubLoadArea.cpp b/CGMES_3.0.0/SubLoadArea.cpp new file mode 100644 index 000000000..d52b226c0 --- /dev/null +++ b/CGMES_3.0.0/SubLoadArea.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SubLoadArea.hpp" + +#include +#include + +#include "LoadArea.hpp" +#include "LoadGroup.hpp" + +using namespace CIMPP; + +SubLoadArea::SubLoadArea() : LoadArea(nullptr) {}; +SubLoadArea::~SubLoadArea() {}; + + + + + +bool assign_LoadArea_SubLoadAreas(BaseClass*, BaseClass*); +bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + LoadArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadArea != element2) + { + element->LoadArea = element2; + return assign_LoadArea_SubLoadAreas(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_LoadGroup_SubLoadArea(BaseClass*, BaseClass*); +bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + LoadGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->LoadGroups.begin(), element->LoadGroups.end(), element2) == element->LoadGroups.end()) + { + element->LoadGroups.push_back(element2); + return assign_LoadGroup_SubLoadArea(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SubLoadArea::debugName[] = "SubLoadArea"; +const char* SubLoadArea::debugString() const +{ + return SubLoadArea::debugName; +} + +void SubLoadArea::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SubLoadArea"), &SubLoadArea_factory)); +} + +void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SubLoadArea::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SubLoadArea::declare() +{ + return BaseClassDefiner(SubLoadArea::addConstructToMap, SubLoadArea::addPrimitiveAssignFnsToMap, SubLoadArea::addClassAssignFnsToMap, SubLoadArea::debugName); +} + +namespace CIMPP +{ + BaseClass* SubLoadArea_factory() + { + return new SubLoadArea; + } +} diff --git a/CGMES_3.0.0/SubLoadArea.hpp b/CGMES_3.0.0/SubLoadArea.hpp new file mode 100644 index 000000000..344ee5c42 --- /dev/null +++ b/CGMES_3.0.0/SubLoadArea.hpp @@ -0,0 +1,43 @@ +#ifndef SubLoadArea_H +#define SubLoadArea_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EnergyArea.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class SubLoadArea : public EnergyArea + { + public: + /* constructor initialising all attributes to null */ + SubLoadArea(); + ~SubLoadArea() override; + + CIMPP::LoadArea* LoadArea; /* The LoadArea where the SubLoadArea belongs. Default: 0 */ + std::list LoadGroups; /* The Loadgroups in the SubLoadArea. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SubLoadArea_factory(); +} +#endif diff --git a/CGMES_3.0.0/Substation.cpp b/CGMES_3.0.0/Substation.cpp new file mode 100644 index 000000000..1184170ee --- /dev/null +++ b/CGMES_3.0.0/Substation.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Substation.hpp" + +#include +#include + +#include "DCConverterUnit.hpp" +#include "SubGeographicalRegion.hpp" +#include "VoltageLevel.hpp" + +using namespace CIMPP; + +Substation::Substation() : Region(nullptr) {}; +Substation::~Substation() {}; + + + + + + +bool assign_DCConverterUnit_Substation(BaseClass*, BaseClass*); +bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Substation* element = dynamic_cast(BaseClass_ptr1); + DCConverterUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCConverterUnit.begin(), element->DCConverterUnit.end(), element2) == element->DCConverterUnit.end()) + { + element->DCConverterUnit.push_back(element2); + return assign_DCConverterUnit_Substation(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SubGeographicalRegion_Substations(BaseClass*, BaseClass*); +bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Substation* element = dynamic_cast(BaseClass_ptr1); + SubGeographicalRegion* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Region != element2) + { + element->Region = element2; + return assign_SubGeographicalRegion_Substations(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VoltageLevel_Substation(BaseClass*, BaseClass*); +bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Substation* element = dynamic_cast(BaseClass_ptr1); + VoltageLevel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VoltageLevels.begin(), element->VoltageLevels.end(), element2) == element->VoltageLevels.end()) + { + element->VoltageLevels.push_back(element2); + return assign_VoltageLevel_Substation(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char Substation::debugName[] = "Substation"; +const char* Substation::debugString() const +{ + return Substation::debugName; +} + +void Substation::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:Substation"), &Substation_factory)); +} + +void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void Substation::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner Substation::declare() +{ + return BaseClassDefiner(Substation::addConstructToMap, Substation::addPrimitiveAssignFnsToMap, Substation::addClassAssignFnsToMap, Substation::debugName); +} + +namespace CIMPP +{ + BaseClass* Substation_factory() + { + return new Substation; + } +} diff --git a/CGMES_3.0.0/Substation.hpp b/CGMES_3.0.0/Substation.hpp new file mode 100644 index 000000000..0d2290a4f --- /dev/null +++ b/CGMES_3.0.0/Substation.hpp @@ -0,0 +1,45 @@ +#ifndef Substation_H +#define Substation_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class DCConverterUnit; + 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. + */ + class Substation : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Substation_factory(); +} +#endif diff --git a/CGMES_3.0.0/SurgeArrester.cpp b/CGMES_3.0.0/SurgeArrester.cpp new file mode 100644 index 000000000..7aedeba59 --- /dev/null +++ b/CGMES_3.0.0/SurgeArrester.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SurgeArrester.hpp" + +#include +#include + + +using namespace CIMPP; + +SurgeArrester::SurgeArrester() {}; +SurgeArrester::~SurgeArrester() {}; + + + +const char SurgeArrester::debugName[] = "SurgeArrester"; +const char* SurgeArrester::debugString() const +{ + return SurgeArrester::debugName; +} + +void SurgeArrester::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SurgeArrester"), &SurgeArrester_factory)); +} + +void SurgeArrester::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SurgeArrester::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SurgeArrester::declare() +{ + return BaseClassDefiner(SurgeArrester::addConstructToMap, SurgeArrester::addPrimitiveAssignFnsToMap, SurgeArrester::addClassAssignFnsToMap, SurgeArrester::debugName); +} + +namespace CIMPP +{ + BaseClass* SurgeArrester_factory() + { + return new SurgeArrester; + } +} diff --git a/CGMES_3.0.0/SurgeArrester.hpp b/CGMES_3.0.0/SurgeArrester.hpp new file mode 100644 index 000000000..c83a9560c --- /dev/null +++ b/CGMES_3.0.0/SurgeArrester.hpp @@ -0,0 +1,39 @@ +#ifndef SurgeArrester_H +#define SurgeArrester_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AuxiliaryEquipment.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class SurgeArrester : public AuxiliaryEquipment + { + public: + /* constructor initialising all attributes to null */ + SurgeArrester(); + ~SurgeArrester() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SurgeArrester_factory(); +} +#endif diff --git a/CGMES_3.0.0/Susceptance.cpp b/CGMES_3.0.0/Susceptance.cpp new file mode 100644 index 000000000..2c15bc914 --- /dev/null +++ b/CGMES_3.0.0/Susceptance.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Susceptance.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Susceptance& Susceptance::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Susceptance::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Susceptance::debugName[] = "Susceptance"; +const char* Susceptance::debugString() const +{ + return Susceptance::debugName; +} + +Susceptance& Susceptance::operator+=(const Susceptance& rhs) +{ + value += rhs.value; + return *this; +} + +Susceptance& Susceptance::operator-=(const Susceptance& rhs) +{ + value -= rhs.value; + return *this; +} + +Susceptance& Susceptance::operator*=(const Susceptance& rhs) +{ + value *= rhs.value; + return *this; +} + +Susceptance& Susceptance::operator/=(const Susceptance& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Susceptance& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Susceptance& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Susceptance.hpp b/CGMES_3.0.0/Susceptance.hpp new file mode 100644 index 000000000..c213337b1 --- /dev/null +++ b/CGMES_3.0.0/Susceptance.hpp @@ -0,0 +1,39 @@ +#ifndef Susceptance_H +#define Susceptance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Imaginary part of admittance. + */ + class Susceptance + { + public: + Susceptance() : value(0.0), initialized(false) {} + Susceptance(long double value) : value(value), initialized(true) {} + + Susceptance& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Susceptance& operator+=(const Susceptance& rhs); + Susceptance& operator-=(const Susceptance& rhs); + Susceptance& operator*=(const Susceptance& rhs); + Susceptance& operator/=(const Susceptance& rhs); + + friend std::istream& operator>>(std::istream& lop, Susceptance& rop); + friend std::ostream& operator<<(std::ostream& os, const Susceptance& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/SvInjection.cpp b/CGMES_3.0.0/SvInjection.cpp new file mode 100644 index 000000000..bed4c3d82 --- /dev/null +++ b/CGMES_3.0.0/SvInjection.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvInjection.hpp" + +#include +#include + +#include "TopologicalNode.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +using namespace CIMPP; + +SvInjection::SvInjection() : TopologicalNode(nullptr) {}; +SvInjection::~SvInjection() {}; + + + +bool assign_SvInjection_pInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pInjection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SvInjection_qInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qInjection; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); +bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SvInjection* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char SvInjection::debugName[] = "SvInjection"; +const char* SvInjection::debugString() const +{ + return SvInjection::debugName; +} + +void SvInjection::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvInjection.TopologicalNode"), &assign_SvInjection_TopologicalNode)); +} + +const BaseClassDefiner SvInjection::declare() +{ + return BaseClassDefiner(SvInjection::addConstructToMap, SvInjection::addPrimitiveAssignFnsToMap, SvInjection::addClassAssignFnsToMap, SvInjection::debugName); +} + +namespace CIMPP +{ + BaseClass* SvInjection_factory() + { + return new SvInjection; + } +} diff --git a/CGMES_3.0.0/SvInjection.hpp b/CGMES_3.0.0/SvInjection.hpp new file mode 100644 index 000000000..c86e32acc --- /dev/null +++ b/CGMES_3.0.0/SvInjection.hpp @@ -0,0 +1,45 @@ +#ifndef SvInjection_H +#define SvInjection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +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. + */ + class SvInjection : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvInjection_factory(); +} +#endif diff --git a/CGMES_3.0.0/SvPowerFlow.cpp b/CGMES_3.0.0/SvPowerFlow.cpp new file mode 100644 index 000000000..96125e597 --- /dev/null +++ b/CGMES_3.0.0/SvPowerFlow.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvPowerFlow.hpp" + +#include +#include + +#include "Terminal.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +using namespace CIMPP; + +SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {}; +SvPowerFlow::~SvPowerFlow() {}; + + + +bool assign_SvPowerFlow_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SvPowerFlow_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); +bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char SvPowerFlow::debugName[] = "SvPowerFlow"; +const char* SvPowerFlow::debugString() const +{ + return SvPowerFlow::debugName; +} + +void SvPowerFlow::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvPowerFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.Terminal"), &assign_SvPowerFlow_Terminal)); +} + +const BaseClassDefiner SvPowerFlow::declare() +{ + return BaseClassDefiner(SvPowerFlow::addConstructToMap, SvPowerFlow::addPrimitiveAssignFnsToMap, SvPowerFlow::addClassAssignFnsToMap, SvPowerFlow::debugName); +} + +namespace CIMPP +{ + BaseClass* SvPowerFlow_factory() + { + return new SvPowerFlow; + } +} diff --git a/CGMES_3.0.0/SvPowerFlow.hpp b/CGMES_3.0.0/SvPowerFlow.hpp new file mode 100644 index 000000000..a5075dfae --- /dev/null +++ b/CGMES_3.0.0/SvPowerFlow.hpp @@ -0,0 +1,45 @@ +#ifndef SvPowerFlow_H +#define SvPowerFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "ReactivePower.hpp" + +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. + */ + class SvPowerFlow : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvPowerFlow_factory(); +} +#endif diff --git a/CGMES_3.0.0/SvShuntCompensatorSections.cpp b/CGMES_3.0.0/SvShuntCompensatorSections.cpp new file mode 100644 index 000000000..773aece69 --- /dev/null +++ b/CGMES_3.0.0/SvShuntCompensatorSections.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvShuntCompensatorSections.hpp" + +#include +#include + +#include "ShuntCompensator.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {}; +SvShuntCompensatorSections::~SvShuntCompensatorSections() {}; + + + +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) +{ + SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + ShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ShuntCompensator != element2) + { + element->ShuntCompensator = element2; + return assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvShuntCompensatorSections::debugName[] = "SvShuntCompensatorSections"; +const char* SvShuntCompensatorSections::debugString() const +{ + return SvShuntCompensatorSections::debugName; +} + +void SvShuntCompensatorSections::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvShuntCompensatorSections::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.ShuntCompensator"), &assign_SvShuntCompensatorSections_ShuntCompensator)); +} + +const BaseClassDefiner SvShuntCompensatorSections::declare() +{ + return BaseClassDefiner(SvShuntCompensatorSections::addConstructToMap, SvShuntCompensatorSections::addPrimitiveAssignFnsToMap, SvShuntCompensatorSections::addClassAssignFnsToMap, SvShuntCompensatorSections::debugName); +} + +namespace CIMPP +{ + BaseClass* SvShuntCompensatorSections_factory() + { + return new SvShuntCompensatorSections; + } +} diff --git a/CGMES_3.0.0/SvShuntCompensatorSections.hpp b/CGMES_3.0.0/SvShuntCompensatorSections.hpp new file mode 100644 index 000000000..0f0906fbb --- /dev/null +++ b/CGMES_3.0.0/SvShuntCompensatorSections.hpp @@ -0,0 +1,43 @@ +#ifndef SvShuntCompensatorSections_H +#define SvShuntCompensatorSections_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + class ShuntCompensator; + + /* + State variable for the number of sections in service for a shunt compensator. + */ + class SvShuntCompensatorSections : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvShuntCompensatorSections_factory(); +} +#endif diff --git a/CGMES_3.0.0/SvStatus.cpp b/CGMES_3.0.0/SvStatus.cpp new file mode 100644 index 000000000..57825fc15 --- /dev/null +++ b/CGMES_3.0.0/SvStatus.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvStatus.hpp" + +#include +#include + +#include "ConductingEquipment.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +SvStatus::SvStatus() : ConductingEquipment(nullptr) {}; +SvStatus::~SvStatus() {}; + + + +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) +{ + SvStatus* element = dynamic_cast(BaseClass_ptr1); + ConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConductingEquipment != element2) + { + element->ConductingEquipment = element2; + return assign_ConductingEquipment_SvStatus(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvStatus::debugName[] = "SvStatus"; +const char* SvStatus::debugString() const +{ + return SvStatus::debugName; +} + +void SvStatus::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvStatus::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvStatus.ConductingEquipment"), &assign_SvStatus_ConductingEquipment)); +} + +const BaseClassDefiner SvStatus::declare() +{ + return BaseClassDefiner(SvStatus::addConstructToMap, SvStatus::addPrimitiveAssignFnsToMap, SvStatus::addClassAssignFnsToMap, SvStatus::debugName); +} + +namespace CIMPP +{ + BaseClass* SvStatus_factory() + { + return new SvStatus; + } +} diff --git a/CGMES_3.0.0/SvStatus.hpp b/CGMES_3.0.0/SvStatus.hpp new file mode 100644 index 000000000..ac884451a --- /dev/null +++ b/CGMES_3.0.0/SvStatus.hpp @@ -0,0 +1,43 @@ +#ifndef SvStatus_H +#define SvStatus_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ConductingEquipment; + + /* + State variable for status. + */ + class SvStatus : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvStatus_factory(); +} +#endif diff --git a/CGMES_3.0.0/SvSwitch.cpp b/CGMES_3.0.0/SvSwitch.cpp new file mode 100644 index 000000000..656047f44 --- /dev/null +++ b/CGMES_3.0.0/SvSwitch.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvSwitch.hpp" + +#include +#include + +#include "Switch.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +SvSwitch::SvSwitch() : Switch(nullptr) {}; +SvSwitch::~SvSwitch() {}; + + + +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) +{ + SvSwitch* element = dynamic_cast(BaseClass_ptr1); + Switch* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Switch != element2) + { + element->Switch = element2; + return assign_Switch_SvSwitch(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvSwitch::debugName[] = "SvSwitch"; +const char* SvSwitch::debugString() const +{ + return SvSwitch::debugName; +} + +void SvSwitch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvSwitch.Switch"), &assign_SvSwitch_Switch)); +} + +const BaseClassDefiner SvSwitch::declare() +{ + return BaseClassDefiner(SvSwitch::addConstructToMap, SvSwitch::addPrimitiveAssignFnsToMap, SvSwitch::addClassAssignFnsToMap, SvSwitch::debugName); +} + +namespace CIMPP +{ + BaseClass* SvSwitch_factory() + { + return new SvSwitch; + } +} diff --git a/CGMES_3.0.0/SvSwitch.hpp b/CGMES_3.0.0/SvSwitch.hpp new file mode 100644 index 000000000..787f75265 --- /dev/null +++ b/CGMES_3.0.0/SvSwitch.hpp @@ -0,0 +1,43 @@ +#ifndef SvSwitch_H +#define SvSwitch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class Switch; + + /* + State variable for switch. + */ + class SvSwitch : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvSwitch_factory(); +} +#endif diff --git a/CGMES_3.0.0/SvTapStep.cpp b/CGMES_3.0.0/SvTapStep.cpp new file mode 100644 index 000000000..ec8dbd877 --- /dev/null +++ b/CGMES_3.0.0/SvTapStep.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvTapStep.hpp" + +#include +#include + +#include "TapChanger.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +SvTapStep::SvTapStep() : TapChanger(nullptr) {}; +SvTapStep::~SvTapStep() {}; + + + +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) +{ + SvTapStep* element = dynamic_cast(BaseClass_ptr1); + TapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TapChanger != element2) + { + element->TapChanger = element2; + return assign_TapChanger_SvTapStep(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SvTapStep::debugName[] = "SvTapStep"; +const char* SvTapStep::debugString() const +{ + return SvTapStep::debugName; +} + +void SvTapStep::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvTapStep::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvTapStep.TapChanger"), &assign_SvTapStep_TapChanger)); +} + +const BaseClassDefiner SvTapStep::declare() +{ + return BaseClassDefiner(SvTapStep::addConstructToMap, SvTapStep::addPrimitiveAssignFnsToMap, SvTapStep::addClassAssignFnsToMap, SvTapStep::debugName); +} + +namespace CIMPP +{ + BaseClass* SvTapStep_factory() + { + return new SvTapStep; + } +} diff --git a/CGMES_3.0.0/SvTapStep.hpp b/CGMES_3.0.0/SvTapStep.hpp new file mode 100644 index 000000000..9678be82c --- /dev/null +++ b/CGMES_3.0.0/SvTapStep.hpp @@ -0,0 +1,43 @@ +#ifndef SvTapStep_H +#define SvTapStep_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + class TapChanger; + + /* + State variable for transformer tap step. + */ + class SvTapStep : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvTapStep_factory(); +} +#endif diff --git a/CGMES_3.0.0/SvVoltage.cpp b/CGMES_3.0.0/SvVoltage.cpp new file mode 100644 index 000000000..95b8265ea --- /dev/null +++ b/CGMES_3.0.0/SvVoltage.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SvVoltage.hpp" + +#include +#include + +#include "TopologicalNode.hpp" +#include "AngleDegrees.hpp" +#include "Voltage.hpp" + +using namespace CIMPP; + +SvVoltage::SvVoltage() : TopologicalNode(nullptr) {}; +SvVoltage::~SvVoltage() {}; + + + +bool assign_SvVoltage_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->angle; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SvVoltage_v(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->v; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); +bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char SvVoltage::debugName[] = "SvVoltage"; +const char* SvVoltage::debugString() const +{ + return SvVoltage::debugName; +} + +void SvVoltage::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SvVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SvVoltage.TopologicalNode"), &assign_SvVoltage_TopologicalNode)); +} + +const BaseClassDefiner SvVoltage::declare() +{ + return BaseClassDefiner(SvVoltage::addConstructToMap, SvVoltage::addPrimitiveAssignFnsToMap, SvVoltage::addClassAssignFnsToMap, SvVoltage::debugName); +} + +namespace CIMPP +{ + BaseClass* SvVoltage_factory() + { + return new SvVoltage; + } +} diff --git a/CGMES_3.0.0/SvVoltage.hpp b/CGMES_3.0.0/SvVoltage.hpp new file mode 100644 index 000000000..9a4efcb86 --- /dev/null +++ b/CGMES_3.0.0/SvVoltage.hpp @@ -0,0 +1,45 @@ +#ifndef SvVoltage_H +#define SvVoltage_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class TopologicalNode; + + /* + State variable for voltage. + */ + class SvVoltage : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SvVoltage_factory(); +} +#endif diff --git a/CGMES_3.0.0/Switch.cpp b/CGMES_3.0.0/Switch.cpp new file mode 100644 index 000000000..4f60eaf20 --- /dev/null +++ b/CGMES_3.0.0/Switch.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Switch.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_Switch_locked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->locked; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_normalOpen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalOpen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->open; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_ratedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratedCurrent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_Switch_retained(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (Switch* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->retained; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_SvSwitch_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SvSwitch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Switch* element = dynamic_cast(BaseClass_ptr1); + SvSwitch* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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_SwitchSchedule_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Switch* element = dynamic_cast(BaseClass_ptr1); + SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + +const char Switch::debugName[] = "Switch"; +const char* Switch::debugString() const +{ + return Switch::debugName; +} + +void Switch::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Switch::declare() +{ + return BaseClassDefiner(Switch::addConstructToMap, Switch::addPrimitiveAssignFnsToMap, Switch::addClassAssignFnsToMap, Switch::debugName); +} + +namespace CIMPP +{ + BaseClass* Switch_factory() + { + return new Switch; + } +} diff --git a/CGMES_3.0.0/Switch.hpp b/CGMES_3.0.0/Switch.hpp new file mode 100644 index 000000000..81ee6f882 --- /dev/null +++ b/CGMES_3.0.0/Switch.hpp @@ -0,0 +1,50 @@ +#ifndef Switch_H +#define Switch_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ConductingEquipment.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" + +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. + */ + class Switch : public ConductingEquipment + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Switch_factory(); +} +#endif diff --git a/CGMES_3.0.0/SwitchSchedule.cpp b/CGMES_3.0.0/SwitchSchedule.cpp new file mode 100644 index 000000000..2181dfba6 --- /dev/null +++ b/CGMES_3.0.0/SwitchSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SwitchSchedule.hpp" + +#include +#include + +#include "Switch.hpp" + +using namespace CIMPP; + +SwitchSchedule::SwitchSchedule() : Switch(nullptr) {}; +SwitchSchedule::~SwitchSchedule() {}; + + + + +bool assign_Switch_SwitchSchedules(BaseClass*, BaseClass*); +bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SwitchSchedule* element = dynamic_cast(BaseClass_ptr1); + Switch* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Switch != element2) + { + element->Switch = element2; + return assign_Switch_SwitchSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SwitchSchedule::debugName[] = "SwitchSchedule"; +const char* SwitchSchedule::debugString() const +{ + return SwitchSchedule::debugName; +} + +void SwitchSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SwitchSchedule"), &SwitchSchedule_factory)); +} + +void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SwitchSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SwitchSchedule.Switch"), &assign_SwitchSchedule_Switch)); +} + +const BaseClassDefiner SwitchSchedule::declare() +{ + return BaseClassDefiner(SwitchSchedule::addConstructToMap, SwitchSchedule::addPrimitiveAssignFnsToMap, SwitchSchedule::addClassAssignFnsToMap, SwitchSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* SwitchSchedule_factory() + { + return new SwitchSchedule; + } +} diff --git a/CGMES_3.0.0/SwitchSchedule.hpp b/CGMES_3.0.0/SwitchSchedule.hpp new file mode 100644 index 000000000..1fdd4c19b --- /dev/null +++ b/CGMES_3.0.0/SwitchSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef SwitchSchedule_H +#define SwitchSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Switch; + + /* + 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: + /* constructor initialising all attributes to null */ + SwitchSchedule(); + ~SwitchSchedule() override; + + CIMPP::Switch* Switch; /* A SwitchSchedule is associated with a Switch. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SwitchSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachine.cpp b/CGMES_3.0.0/SynchronousMachine.cpp new file mode 100644 index 000000000..c722dfdbf --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachine.cpp @@ -0,0 +1,423 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachine.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_SynchronousMachine_earthing(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->earthing; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthingStarPointR(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->earthingStarPointR; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthingStarPointX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->earthingStarPointX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_ikk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ikk; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->minQ; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_mu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->operatingMode; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_qPercent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qPercent; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->referencePriority; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->satDirectSubtransX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_satDirectSyncX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->satDirectSyncX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_satDirectTransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->satDirectTransX; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->shortCircuitRotorType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->type; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->voltageRegulationRange; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachine_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + 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; +} + + + + + + + + + + + + + + + + + + + + + + +const char SynchronousMachine::debugName[] = "SynchronousMachine"; +const char* SynchronousMachine::debugString() const +{ + return SynchronousMachine::debugName; +} + +void SynchronousMachine::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner SynchronousMachine::declare() +{ + return BaseClassDefiner(SynchronousMachine::addConstructToMap, SynchronousMachine::addPrimitiveAssignFnsToMap, SynchronousMachine::addClassAssignFnsToMap, SynchronousMachine::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachine_factory() + { + return new SynchronousMachine; + } +} diff --git a/CGMES_3.0.0/SynchronousMachine.hpp b/CGMES_3.0.0/SynchronousMachine.hpp new file mode 100644 index 000000000..a6fcbdece --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachine.hpp @@ -0,0 +1,76 @@ +#ifndef SynchronousMachine_H +#define SynchronousMachine_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachine.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "CurrentFlow.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "PU.hpp" +#include "PerCent.hpp" +#include "Reactance.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "ShortCircuitRotorKind.hpp" +#include "SynchronousMachineKind.hpp" +#include "SynchronousMachineOperatingMode.hpp" + +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. + */ + class SynchronousMachine : public RotatingMachine + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachine_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineDetailed.cpp b/CGMES_3.0.0/SynchronousMachineDetailed.cpp new file mode 100644 index 000000000..3697f8da4 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineDetailed.cpp @@ -0,0 +1,111 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineDetailed.hpp" + +#include +#include + +#include "Float.hpp" +#include "IfdBaseKind.hpp" +#include "Float.hpp" +#include "Float.hpp" + +using namespace CIMPP; + +SynchronousMachineDetailed::SynchronousMachineDetailed() {}; +SynchronousMachineDetailed::~SynchronousMachineDetailed() {}; + + +bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->efdBaseRatio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ifdBaseType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactor120QAxis; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->saturationFactorQAxis; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + +const char SynchronousMachineDetailed::debugName[] = "SynchronousMachineDetailed"; +const char* SynchronousMachineDetailed::debugString() const +{ + return SynchronousMachineDetailed::debugName; +} + +void SynchronousMachineDetailed::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineDetailed::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineDetailed::declare() +{ + return BaseClassDefiner(SynchronousMachineDetailed::addConstructToMap, SynchronousMachineDetailed::addPrimitiveAssignFnsToMap, SynchronousMachineDetailed::addClassAssignFnsToMap, SynchronousMachineDetailed::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineDetailed_factory() + { + return new SynchronousMachineDetailed; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineDetailed.hpp b/CGMES_3.0.0/SynchronousMachineDetailed.hpp new file mode 100644 index 000000000..e4833a848 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineDetailed.hpp @@ -0,0 +1,45 @@ +#ifndef SynchronousMachineDetailed_H +#define SynchronousMachineDetailed_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "IfdBaseKind.hpp" + +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. + */ + class SynchronousMachineDetailed : public SynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineDetailed_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineDynamics.cpp b/CGMES_3.0.0/SynchronousMachineDynamics.cpp new file mode 100644 index 000000000..bf7fc114e --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineDynamics.cpp @@ -0,0 +1,187 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineDynamics.hpp" + +#include +#include + +#include "CrossCompoundTurbineGovernorDynamics.hpp" +#include "CrossCompoundTurbineGovernorDynamics.hpp" +#include "ExcitationSystemDynamics.hpp" +#include "GenICompensationForGenJ.hpp" +#include "MechanicalLoadDynamics.hpp" +#include "SynchronousMachine.hpp" +#include "TurbineGovernorDynamics.hpp" + +using namespace CIMPP; + +SynchronousMachineDynamics::SynchronousMachineDynamics() : CrossCompoundTurbineGovernorDyanmics(nullptr), CrossCompoundTurbineGovernorDynamics(nullptr), ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {}; +SynchronousMachineDynamics::~SynchronousMachineDynamics() {}; + + + + + + + + + + +bool assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + CrossCompoundTurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CrossCompoundTurbineGovernorDyanmics != element2) + { + element->CrossCompoundTurbineGovernorDyanmics = element2; + return assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + CrossCompoundTurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CrossCompoundTurbineGovernorDynamics != element2) + { + element->CrossCompoundTurbineGovernorDynamics = element2; + return assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + GenICompensationForGenJ* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GenICompensationForGenJ.begin(), element->GenICompensationForGenJ.end(), element2) == element->GenICompensationForGenJ.end()) + { + element->GenICompensationForGenJ.push_back(element2); + return assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + MechanicalLoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->MechanicalLoadDynamics != element2) + { + element->MechanicalLoadDynamics = element2; + return assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachine != element2) + { + element->SynchronousMachine = element2; + return assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); +bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TurbineGovernorDynamics.begin(), element->TurbineGovernorDynamics.end(), element2) == element->TurbineGovernorDynamics.end()) + { + element->TurbineGovernorDynamics.push_back(element2); + return assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char SynchronousMachineDynamics::debugName[] = "SynchronousMachineDynamics"; +const char* SynchronousMachineDynamics::debugString() const +{ + return SynchronousMachineDynamics::debugName; +} + +void SynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics"), &SynchronousMachineDynamics_factory)); +} + +void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SynchronousMachineDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner SynchronousMachineDynamics::declare() +{ + return BaseClassDefiner(SynchronousMachineDynamics::addConstructToMap, SynchronousMachineDynamics::addPrimitiveAssignFnsToMap, SynchronousMachineDynamics::addClassAssignFnsToMap, SynchronousMachineDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineDynamics_factory() + { + return new SynchronousMachineDynamics; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineDynamics.hpp b/CGMES_3.0.0/SynchronousMachineDynamics.hpp new file mode 100644 index 000000000..4858a3c91 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineDynamics.hpp @@ -0,0 +1,52 @@ +#ifndef SynchronousMachineDynamics_H +#define SynchronousMachineDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RotatingMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class CrossCompoundTurbineGovernorDynamics; + class ExcitationSystemDynamics; + class GenICompensationForGenJ; + class MechanicalLoadDynamics; + 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.
+ */ + class SynchronousMachineDynamics : public RotatingMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp new file mode 100644 index 000000000..a228afafe --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp @@ -0,0 +1,223 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineEquivalentCircuit.hpp" + +#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() {}; + + +bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r1d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r1q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r2q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x1d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x1q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x2q; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xad; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xaq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xf1d; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xfd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + +const char SynchronousMachineEquivalentCircuit::debugName[] = "SynchronousMachineEquivalentCircuit"; +const char* SynchronousMachineEquivalentCircuit::debugString() const +{ + return SynchronousMachineEquivalentCircuit::debugName; +} + +void SynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineEquivalentCircuit::declare() +{ + return BaseClassDefiner(SynchronousMachineEquivalentCircuit::addConstructToMap, SynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap, SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap, SynchronousMachineEquivalentCircuit::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineEquivalentCircuit_factory() + { + return new SynchronousMachineEquivalentCircuit; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp new file mode 100644 index 000000000..a8cf0f737 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp @@ -0,0 +1,51 @@ +#ifndef SynchronousMachineEquivalentCircuit_H +#define SynchronousMachineEquivalentCircuit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDetailed.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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. + */ + class SynchronousMachineEquivalentCircuit : public SynchronousMachineDetailed + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineEquivalentCircuit_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineKind.cpp b/CGMES_3.0.0/SynchronousMachineKind.cpp new file mode 100644 index 000000000..55bd958b0 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineKind.cpp @@ -0,0 +1,135 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SynchronousMachineKind& SynchronousMachineKind::operator=(SynchronousMachineKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SynchronousMachineKind::operator SynchronousMachineKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SynchronousMachineKind::debugName[] = "SynchronousMachineKind"; +const char* SynchronousMachineKind::debugString() const +{ + return SynchronousMachineKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SynchronousMachineKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SynchronousMachineKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = SynchronousMachineKind::generator; + return lop; + } + if(EnumSymbol == "condenser") + { + rop = SynchronousMachineKind::condenser; + return lop; + } + if(EnumSymbol == "generatorOrCondenser") + { + rop = SynchronousMachineKind::generatorOrCondenser; + return lop; + } + if(EnumSymbol == "motor") + { + rop = SynchronousMachineKind::motor; + return lop; + } + if(EnumSymbol == "generatorOrMotor") + { + rop = SynchronousMachineKind::generatorOrMotor; + return lop; + } + if(EnumSymbol == "motorOrCondenser") + { + rop = SynchronousMachineKind::motorOrCondenser; + return lop; + } + if(EnumSymbol == "generatorOrCondenserOrMotor") + { + rop = SynchronousMachineKind::generatorOrCondenserOrMotor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SynchronousMachineKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SynchronousMachineKind::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == SynchronousMachineKind::condenser) + { + EnumSymbol = "condenser"; + } + if (obj.value == SynchronousMachineKind::generatorOrCondenser) + { + EnumSymbol = "generatorOrCondenser"; + } + if (obj.value == SynchronousMachineKind::motor) + { + EnumSymbol = "motor"; + } + if (obj.value == SynchronousMachineKind::generatorOrMotor) + { + EnumSymbol = "generatorOrMotor"; + } + if (obj.value == SynchronousMachineKind::motorOrCondenser) + { + EnumSymbol = "motorOrCondenser"; + } + if (obj.value == SynchronousMachineKind::generatorOrCondenserOrMotor) + { + EnumSymbol = "generatorOrCondenserOrMotor"; + } + + if (!EnumSymbol.empty()) + { + os << "SynchronousMachineKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineKind.hpp b/CGMES_3.0.0/SynchronousMachineKind.hpp new file mode 100644 index 000000000..6cf0d71b2 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineKind.hpp @@ -0,0 +1,66 @@ +#ifndef SynchronousMachineKind_H +#define SynchronousMachineKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Synchronous machine type. + */ + class SynchronousMachineKind + { + public: + enum SynchronousMachineKind_ENUM + { + /** + * Indicates the synchronous machine can operate as a generator. + */ + generator, + /** + * Indicates the synchronous machine can operate as a condenser. + */ + condenser, + /** + * Indicates the synchronous machine can operate as a generator or as a condenser. + */ + generatorOrCondenser, + /** + * Indicates the synchronous machine can operate as a motor. + */ + 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. + */ + motorOrCondenser, + /** + * Indicates the synchronous machine can operate as a generator or as a condenser or as a motor. + */ + generatorOrCondenserOrMotor, + }; + + SynchronousMachineKind() : value(), initialized(false) {} + SynchronousMachineKind(SynchronousMachineKind_ENUM value) : value(value), initialized(true) {} + + SynchronousMachineKind& operator=(SynchronousMachineKind_ENUM rop); + operator SynchronousMachineKind_ENUM() const; + + SynchronousMachineKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SynchronousMachineKind& rop); + friend std::ostream& operator<<(std::ostream& os, const SynchronousMachineKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineModelKind.cpp b/CGMES_3.0.0/SynchronousMachineModelKind.cpp new file mode 100644 index 000000000..10460ede1 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineModelKind.cpp @@ -0,0 +1,117 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineModelKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SynchronousMachineModelKind& SynchronousMachineModelKind::operator=(SynchronousMachineModelKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SynchronousMachineModelKind::operator SynchronousMachineModelKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SynchronousMachineModelKind::debugName[] = "SynchronousMachineModelKind"; +const char* SynchronousMachineModelKind::debugString() const +{ + return SynchronousMachineModelKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SynchronousMachineModelKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "subtransient") + { + rop = SynchronousMachineModelKind::subtransient; + return lop; + } + if(EnumSymbol == "subtransientTypeF") + { + rop = SynchronousMachineModelKind::subtransientTypeF; + return lop; + } + if(EnumSymbol == "subtransientTypeJ") + { + rop = SynchronousMachineModelKind::subtransientTypeJ; + return lop; + } + if(EnumSymbol == "subtransientSimplified") + { + rop = SynchronousMachineModelKind::subtransientSimplified; + return lop; + } + if(EnumSymbol == "subtransientSimplifiedDirectAxis") + { + rop = SynchronousMachineModelKind::subtransientSimplifiedDirectAxis; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SynchronousMachineModelKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SynchronousMachineModelKind::subtransient) + { + EnumSymbol = "subtransient"; + } + if (obj.value == SynchronousMachineModelKind::subtransientTypeF) + { + EnumSymbol = "subtransientTypeF"; + } + if (obj.value == SynchronousMachineModelKind::subtransientTypeJ) + { + EnumSymbol = "subtransientTypeJ"; + } + if (obj.value == SynchronousMachineModelKind::subtransientSimplified) + { + EnumSymbol = "subtransientSimplified"; + } + if (obj.value == SynchronousMachineModelKind::subtransientSimplifiedDirectAxis) + { + EnumSymbol = "subtransientSimplifiedDirectAxis"; + } + + if (!EnumSymbol.empty()) + { + os << "SynchronousMachineModelKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineModelKind.hpp b/CGMES_3.0.0/SynchronousMachineModelKind.hpp new file mode 100644 index 000000000..a48d28848 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineModelKind.hpp @@ -0,0 +1,58 @@ +#ifndef SynchronousMachineModelKind_H +#define SynchronousMachineModelKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Type of synchronous machine model used in dynamic simulation applications. + */ + class SynchronousMachineModelKind + { + public: + enum SynchronousMachineModelKind_ENUM + { + /** + * Subtransient synchronous machine model. + */ + subtransient, + /** + * WECC type F variant of subtransient synchronous machine model. + */ + subtransientTypeF, + /** + * 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. + */ + subtransientSimplified, + /** + * Simplified version of a subtransient synchronous machine model with no damper circuit on the direct-axis. + */ + subtransientSimplifiedDirectAxis, + }; + + SynchronousMachineModelKind() : value(), initialized(false) {} + SynchronousMachineModelKind(SynchronousMachineModelKind_ENUM value) : value(value), initialized(true) {} + + SynchronousMachineModelKind& operator=(SynchronousMachineModelKind_ENUM rop); + operator SynchronousMachineModelKind_ENUM() const; + + SynchronousMachineModelKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SynchronousMachineModelKind& rop); + friend std::ostream& operator<<(std::ostream& os, const SynchronousMachineModelKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp b/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp new file mode 100644 index 000000000..92b1e2cc3 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineOperatingMode.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +SynchronousMachineOperatingMode& SynchronousMachineOperatingMode::operator=(SynchronousMachineOperatingMode_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +SynchronousMachineOperatingMode::operator SynchronousMachineOperatingMode_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char SynchronousMachineOperatingMode::debugName[] = "SynchronousMachineOperatingMode"; +const char* SynchronousMachineOperatingMode::debugString() const +{ + return SynchronousMachineOperatingMode::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, SynchronousMachineOperatingMode& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "generator") + { + rop = SynchronousMachineOperatingMode::generator; + return lop; + } + if(EnumSymbol == "condenser") + { + rop = SynchronousMachineOperatingMode::condenser; + return lop; + } + if(EnumSymbol == "motor") + { + rop = SynchronousMachineOperatingMode::motor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const SynchronousMachineOperatingMode& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == SynchronousMachineOperatingMode::generator) + { + EnumSymbol = "generator"; + } + if (obj.value == SynchronousMachineOperatingMode::condenser) + { + EnumSymbol = "condenser"; + } + if (obj.value == SynchronousMachineOperatingMode::motor) + { + EnumSymbol = "motor"; + } + + if (!EnumSymbol.empty()) + { + os << "SynchronousMachineOperatingMode." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp b/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp new file mode 100644 index 000000000..0be32e335 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp @@ -0,0 +1,50 @@ +#ifndef SynchronousMachineOperatingMode_H +#define SynchronousMachineOperatingMode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Synchronous machine operating mode. + */ + class SynchronousMachineOperatingMode + { + public: + enum SynchronousMachineOperatingMode_ENUM + { + /** + * Operating as generator. + */ + generator, + /** + * Operating as condenser. + */ + condenser, + /** + * Operating as motor. + */ + motor, + }; + + SynchronousMachineOperatingMode() : value(), initialized(false) {} + SynchronousMachineOperatingMode(SynchronousMachineOperatingMode_ENUM value) : value(value), initialized(true) {} + + SynchronousMachineOperatingMode& operator=(SynchronousMachineOperatingMode_ENUM rop); + operator SynchronousMachineOperatingMode_ENUM() const; + + SynchronousMachineOperatingMode_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, SynchronousMachineOperatingMode& rop); + friend std::ostream& operator<<(std::ostream& os, const SynchronousMachineOperatingMode& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineSimplified.cpp b/CGMES_3.0.0/SynchronousMachineSimplified.cpp new file mode 100644 index 000000000..c871a8180 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineSimplified.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineSimplified.hpp" + +#include +#include + + +using namespace CIMPP; + +SynchronousMachineSimplified::SynchronousMachineSimplified() {}; +SynchronousMachineSimplified::~SynchronousMachineSimplified() {}; + + + +const char SynchronousMachineSimplified::debugName[] = "SynchronousMachineSimplified"; +const char* SynchronousMachineSimplified::debugString() const +{ + return SynchronousMachineSimplified::debugName; +} + +void SynchronousMachineSimplified::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineSimplified"), &SynchronousMachineSimplified_factory)); +} + +void SynchronousMachineSimplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void SynchronousMachineSimplified::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineSimplified::declare() +{ + return BaseClassDefiner(SynchronousMachineSimplified::addConstructToMap, SynchronousMachineSimplified::addPrimitiveAssignFnsToMap, SynchronousMachineSimplified::addClassAssignFnsToMap, SynchronousMachineSimplified::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineSimplified_factory() + { + return new SynchronousMachineSimplified; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineSimplified.hpp b/CGMES_3.0.0/SynchronousMachineSimplified.hpp new file mode 100644 index 000000000..d0705c3a3 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineSimplified.hpp @@ -0,0 +1,39 @@ +#ifndef SynchronousMachineSimplified_H +#define SynchronousMachineSimplified_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" + +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). + */ + class SynchronousMachineSimplified : public SynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + SynchronousMachineSimplified(); + ~SynchronousMachineSimplified() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineSimplified_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp new file mode 100644 index 000000000..c5643dc32 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp @@ -0,0 +1,271 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineTimeConstantReactance.hpp" + +#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() {}; + + +bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ks; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->modelType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rotorType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpdo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppdo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tppqo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpqo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xDirectSubtrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xDirectSync; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xDirectTrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xQuadSubtrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xQuadSync; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xQuadTrans; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + +const char SynchronousMachineTimeConstantReactance::debugName[] = "SynchronousMachineTimeConstantReactance"; +const char* SynchronousMachineTimeConstantReactance::debugString() const +{ + return SynchronousMachineTimeConstantReactance::debugName; +} + +void SynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner SynchronousMachineTimeConstantReactance::declare() +{ + return BaseClassDefiner(SynchronousMachineTimeConstantReactance::addConstructToMap, SynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap, SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap, SynchronousMachineTimeConstantReactance::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineTimeConstantReactance_factory() + { + return new SynchronousMachineTimeConstantReactance; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp new file mode 100644 index 000000000..6d3ed7524 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp @@ -0,0 +1,58 @@ +#ifndef SynchronousMachineTimeConstantReactance_H +#define SynchronousMachineTimeConstantReactance_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDetailed.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "RotorKind.hpp" +#include "Seconds.hpp" +#include "SynchronousMachineModelKind.hpp" + +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. + */ + class SynchronousMachineTimeConstantReactance : public SynchronousMachineDetailed + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineTimeConstantReactance_factory(); +} +#endif diff --git a/CGMES_3.0.0/SynchronousMachineUserDefined.cpp b/CGMES_3.0.0/SynchronousMachineUserDefined.cpp new file mode 100644 index 000000000..80c109209 --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "SynchronousMachineUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +SynchronousMachineUserDefined::SynchronousMachineUserDefined() {}; +SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {}; + + + +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) +{ + SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char SynchronousMachineUserDefined::debugName[] = "SynchronousMachineUserDefined"; +const char* SynchronousMachineUserDefined::debugString() const +{ + return SynchronousMachineUserDefined::debugName; +} + +void SynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void SynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner SynchronousMachineUserDefined::declare() +{ + return BaseClassDefiner(SynchronousMachineUserDefined::addConstructToMap, SynchronousMachineUserDefined::addPrimitiveAssignFnsToMap, SynchronousMachineUserDefined::addClassAssignFnsToMap, SynchronousMachineUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* SynchronousMachineUserDefined_factory() + { + return new SynchronousMachineUserDefined; + } +} diff --git a/CGMES_3.0.0/SynchronousMachineUserDefined.hpp b/CGMES_3.0.0/SynchronousMachineUserDefined.hpp new file mode 100644 index 000000000..896ea21db --- /dev/null +++ b/CGMES_3.0.0/SynchronousMachineUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef SynchronousMachineUserDefined_H +#define SynchronousMachineUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SynchronousMachineDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Synchronous machine whose dynamic behaviour is described by a user-defined model. + */ + class SynchronousMachineUserDefined : public SynchronousMachineDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* SynchronousMachineUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/TapChanger.cpp b/CGMES_3.0.0/TapChanger.cpp new file mode 100644 index 000000000..9b942069c --- /dev/null +++ b/CGMES_3.0.0/TapChanger.cpp @@ -0,0 +1,235 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapChanger.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_TapChanger_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->controlEnabled; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_highStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->highStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_lowStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->lowStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_ltcFlag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ltcFlag; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_neutralStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->neutralStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_neutralU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->neutralU; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_normalStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalStep; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChanger_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->step; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +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_TapChangerControl_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TapChangerControl != element2) + { + element->TapChangerControl = element2; + return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + 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; +} + + + + + + + + + +const char TapChanger::debugName[] = "TapChanger"; +const char* TapChanger::debugString() const +{ + return TapChanger::debugName; +} + +void TapChanger::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TapChanger::declare() +{ + return BaseClassDefiner(TapChanger::addConstructToMap, TapChanger::addPrimitiveAssignFnsToMap, TapChanger::addClassAssignFnsToMap, TapChanger::debugName); +} + +namespace CIMPP +{ + BaseClass* TapChanger_factory() + { + return new TapChanger; + } +} diff --git a/CGMES_3.0.0/TapChanger.hpp b/CGMES_3.0.0/TapChanger.hpp new file mode 100644 index 000000000..7900f1e66 --- /dev/null +++ b/CGMES_3.0.0/TapChanger.hpp @@ -0,0 +1,57 @@ +#ifndef TapChanger_H +#define TapChanger_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class SvTapStep; + class TapChangerControl; + class TapSchedule; + + /* + Mechanism for changing transformer winding tap positions. + */ + class TapChanger : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapChanger_factory(); +} +#endif diff --git a/CGMES_3.0.0/TapChangerControl.cpp b/CGMES_3.0.0/TapChangerControl.cpp new file mode 100644 index 000000000..031f9704e --- /dev/null +++ b/CGMES_3.0.0/TapChangerControl.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapChangerControl.hpp" + +#include +#include + +#include "TapChanger.hpp" + +using namespace CIMPP; + +TapChangerControl::TapChangerControl() {}; +TapChangerControl::~TapChangerControl() {}; + + + + +bool assign_TapChanger_TapChangerControl(BaseClass*, BaseClass*); +bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChangerControl* element = dynamic_cast(BaseClass_ptr1); + TapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TapChanger.begin(), element->TapChanger.end(), element2) == element->TapChanger.end()) + { + element->TapChanger.push_back(element2); + return assign_TapChanger_TapChangerControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TapChangerControl::debugName[] = "TapChangerControl"; +const char* TapChangerControl::debugString() const +{ + return TapChangerControl::debugName; +} + +void TapChangerControl::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TapChangerControl"), &TapChangerControl_factory)); +} + +void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TapChangerControl::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TapChangerControl.TapChanger"), &assign_TapChangerControl_TapChanger)); +} + +const BaseClassDefiner TapChangerControl::declare() +{ + return BaseClassDefiner(TapChangerControl::addConstructToMap, TapChangerControl::addPrimitiveAssignFnsToMap, TapChangerControl::addClassAssignFnsToMap, TapChangerControl::debugName); +} + +namespace CIMPP +{ + BaseClass* TapChangerControl_factory() + { + return new TapChangerControl; + } +} diff --git a/CGMES_3.0.0/TapChangerControl.hpp b/CGMES_3.0.0/TapChangerControl.hpp new file mode 100644 index 000000000..60fedbeca --- /dev/null +++ b/CGMES_3.0.0/TapChangerControl.hpp @@ -0,0 +1,41 @@ +#ifndef TapChangerControl_H +#define TapChangerControl_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "RegulatingControl.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class TapChangerControl : public RegulatingControl + { + public: + /* constructor initialising all attributes to null */ + TapChangerControl(); + ~TapChangerControl() override; + + std::list TapChanger; /* The tap changers that participates in this regulating tap control scheme. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapChangerControl_factory(); +} +#endif diff --git a/CGMES_3.0.0/TapChangerTablePoint.cpp b/CGMES_3.0.0/TapChangerTablePoint.cpp new file mode 100644 index 000000000..edbff031c --- /dev/null +++ b/CGMES_3.0.0/TapChangerTablePoint.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapChangerTablePoint.hpp" + +#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() {}; + + +bool assign_TapChangerTablePoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->g; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ratio; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->step; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TapChangerTablePoint_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->x; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char TapChangerTablePoint::debugName[] = "TapChangerTablePoint"; +const char* TapChangerTablePoint::debugString() const +{ + return TapChangerTablePoint::debugName; +} + +void TapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TapChangerTablePoint::declare() +{ + return BaseClassDefiner(TapChangerTablePoint::addConstructToMap, TapChangerTablePoint::addPrimitiveAssignFnsToMap, TapChangerTablePoint::addClassAssignFnsToMap, TapChangerTablePoint::debugName); +} + +namespace CIMPP +{ + BaseClass* TapChangerTablePoint_factory() + { + return new TapChangerTablePoint; + } +} diff --git a/CGMES_3.0.0/TapChangerTablePoint.hpp b/CGMES_3.0.0/TapChangerTablePoint.hpp new file mode 100644 index 000000000..c1beecaf8 --- /dev/null +++ b/CGMES_3.0.0/TapChangerTablePoint.hpp @@ -0,0 +1,48 @@ +#ifndef TapChangerTablePoint_H +#define TapChangerTablePoint_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "PerCent.hpp" + +namespace CIMPP +{ + + /* + Describes each tap step in the tabular curve. + */ + class TapChangerTablePoint : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapChangerTablePoint_factory(); +} +#endif diff --git a/CGMES_3.0.0/TapSchedule.cpp b/CGMES_3.0.0/TapSchedule.cpp new file mode 100644 index 000000000..638119eee --- /dev/null +++ b/CGMES_3.0.0/TapSchedule.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TapSchedule.hpp" + +#include +#include + +#include "TapChanger.hpp" + +using namespace CIMPP; + +TapSchedule::TapSchedule() : TapChanger(nullptr) {}; +TapSchedule::~TapSchedule() {}; + + + + +bool assign_TapChanger_TapSchedules(BaseClass*, BaseClass*); +bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapSchedule* element = dynamic_cast(BaseClass_ptr1); + TapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TapChanger != element2) + { + element->TapChanger = element2; + return assign_TapChanger_TapSchedules(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TapSchedule::debugName[] = "TapSchedule"; +const char* TapSchedule::debugString() const +{ + return TapSchedule::debugName; +} + +void TapSchedule::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TapSchedule"), &TapSchedule_factory)); +} + +void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TapSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TapSchedule.TapChanger"), &assign_TapSchedule_TapChanger)); +} + +const BaseClassDefiner TapSchedule::declare() +{ + return BaseClassDefiner(TapSchedule::addConstructToMap, TapSchedule::addPrimitiveAssignFnsToMap, TapSchedule::addClassAssignFnsToMap, TapSchedule::debugName); +} + +namespace CIMPP +{ + BaseClass* TapSchedule_factory() + { + return new TapSchedule; + } +} diff --git a/CGMES_3.0.0/TapSchedule.hpp b/CGMES_3.0.0/TapSchedule.hpp new file mode 100644 index 000000000..e95884ed5 --- /dev/null +++ b/CGMES_3.0.0/TapSchedule.hpp @@ -0,0 +1,41 @@ +#ifndef TapSchedule_H +#define TapSchedule_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "SeasonDayTypeSchedule.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class TapChanger; + + /* + A pre-established pattern over time for a tap step. + */ + class TapSchedule : public SeasonDayTypeSchedule + { + public: + /* constructor initialising all attributes to null */ + TapSchedule(); + ~TapSchedule() override; + + CIMPP::TapChanger* TapChanger; /* A TapSchedule is associated with a TapChanger. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TapSchedule_factory(); +} +#endif diff --git a/CGMES_3.0.0/Temperature.cpp b/CGMES_3.0.0/Temperature.cpp new file mode 100644 index 000000000..3a788af85 --- /dev/null +++ b/CGMES_3.0.0/Temperature.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Temperature.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Temperature& Temperature::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Temperature::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Temperature::debugName[] = "Temperature"; +const char* Temperature::debugString() const +{ + return Temperature::debugName; +} + +Temperature& Temperature::operator+=(const Temperature& rhs) +{ + value += rhs.value; + return *this; +} + +Temperature& Temperature::operator-=(const Temperature& rhs) +{ + value -= rhs.value; + return *this; +} + +Temperature& Temperature::operator*=(const Temperature& rhs) +{ + value *= rhs.value; + return *this; +} + +Temperature& Temperature::operator/=(const Temperature& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Temperature& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Temperature& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Temperature.hpp b/CGMES_3.0.0/Temperature.hpp new file mode 100644 index 000000000..33ba8ea2b --- /dev/null +++ b/CGMES_3.0.0/Temperature.hpp @@ -0,0 +1,39 @@ +#ifndef Temperature_H +#define Temperature_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Value of temperature in degrees Celsius. + */ + class Temperature + { + public: + Temperature() : value(0.0), initialized(false) {} + Temperature(long double value) : value(value), initialized(true) {} + + Temperature& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Temperature& operator+=(const Temperature& rhs); + Temperature& operator-=(const Temperature& rhs); + Temperature& operator*=(const Temperature& rhs); + Temperature& operator/=(const Temperature& rhs); + + friend std::istream& operator>>(std::istream& lop, Temperature& rop); + friend std::ostream& operator<<(std::ostream& os, const Temperature& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/Terminal.cpp b/CGMES_3.0.0/Terminal.cpp new file mode 100644 index 000000000..0eff31f7b --- /dev/null +++ b/CGMES_3.0.0/Terminal.cpp @@ -0,0 +1,303 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Terminal.hpp" + +#include +#include + +#include "AuxiliaryEquipment.hpp" +#include "ConductingEquipment.hpp" +#include "ConnectivityNode.hpp" +#include "ACDCConverter.hpp" +#include "MutualCoupling.hpp" +#include "MutualCoupling.hpp" +#include "RegulatingControl.hpp" +#include "RemoteInputSignal.hpp" +#include "SvPowerFlow.hpp" +#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() {}; + + + + + + + + + + + + + + +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) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + AuxiliaryEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->AuxiliaryEquipment.begin(), element->AuxiliaryEquipment.end(), element2) == element->AuxiliaryEquipment.end()) + { + element->AuxiliaryEquipment.push_back(element2); + return assign_AuxiliaryEquipment_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConductingEquipment_Terminals(BaseClass*, BaseClass*); +bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + ConductingEquipment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConductingEquipment != element2) + { + element->ConductingEquipment = element2; + return assign_ConductingEquipment_Terminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConnectivityNode_Terminals(BaseClass*, BaseClass*); +bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* 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_Terminals(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCConverter_PccTerminal(BaseClass*, BaseClass*); +bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + ACDCConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConverterDCSides.begin(), element->ConverterDCSides.end(), element2) == element->ConverterDCSides.end()) + { + element->ConverterDCSides.push_back(element2); + return assign_ACDCConverter_PccTerminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MutualCoupling_First_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + MutualCoupling* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HasFirstMutualCoupling.begin(), element->HasFirstMutualCoupling.end(), element2) == element->HasFirstMutualCoupling.end()) + { + element->HasFirstMutualCoupling.push_back(element2); + return assign_MutualCoupling_First_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_MutualCoupling_Second_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + MutualCoupling* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->HasSecondMutualCoupling.begin(), element->HasSecondMutualCoupling.end(), element2) == element->HasSecondMutualCoupling.end()) + { + element->HasSecondMutualCoupling.push_back(element2); + return assign_MutualCoupling_Second_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RegulatingControl_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + RegulatingControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RegulatingControl.begin(), element->RegulatingControl.end(), element2) == element->RegulatingControl.end()) + { + element->RegulatingControl.push_back(element2); + return assign_RegulatingControl_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RemoteInputSignal.begin(), element->RemoteInputSignal.end(), element2) == element->RemoteInputSignal.end()) + { + element->RemoteInputSignal.push_back(element2); + return assign_RemoteInputSignal_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvPowerFlow_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + SvPowerFlow* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvPowerFlow != element2) + { + element->SvPowerFlow = element2; + return assign_SvPowerFlow_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TieFlow_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + TieFlow* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TieFlow.begin(), element->TieFlow.end(), element2) == element->TieFlow.end()) + { + element->TieFlow.push_back(element2); + return assign_TieFlow_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TransformerEnd_Terminal(BaseClass*, BaseClass*); +bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + TransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TransformerEnd.begin(), element->TransformerEnd.end(), element2) == element->TransformerEnd.end()) + { + element->TransformerEnd.push_back(element2); + return assign_TransformerEnd_Terminal(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char Terminal::debugName[] = "Terminal"; +const char* Terminal::debugString() const +{ + return Terminal::debugName; +} + +void Terminal::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner Terminal::declare() +{ + return BaseClassDefiner(Terminal::addConstructToMap, Terminal::addPrimitiveAssignFnsToMap, Terminal::addClassAssignFnsToMap, Terminal::debugName); +} + +namespace CIMPP +{ + BaseClass* Terminal_factory() + { + return new Terminal; + } +} diff --git a/CGMES_3.0.0/Terminal.hpp b/CGMES_3.0.0/Terminal.hpp new file mode 100644 index 000000000..95b8eaff2 --- /dev/null +++ b/CGMES_3.0.0/Terminal.hpp @@ -0,0 +1,64 @@ +#ifndef Terminal_H +#define Terminal_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCTerminal.hpp" +#include "BaseClassDefiner.hpp" +#include "PhaseCode.hpp" + +namespace CIMPP +{ + class ACDCConverter; + class AuxiliaryEquipment; + class ConductingEquipment; + class ConnectivityNode; + class MutualCoupling; + class RegulatingControl; + class RemoteInputSignal; + class SvPowerFlow; + class TieFlow; + 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. + */ + class Terminal : public ACDCTerminal + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* Terminal_factory(); +} +#endif diff --git a/CGMES_3.0.0/TextDiagramObject.cpp b/CGMES_3.0.0/TextDiagramObject.cpp new file mode 100644 index 000000000..df7e44767 --- /dev/null +++ b/CGMES_3.0.0/TextDiagramObject.cpp @@ -0,0 +1,63 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TextDiagramObject.hpp" + +#include +#include + +#include "String.hpp" + +using namespace CIMPP; + +TextDiagramObject::TextDiagramObject() {}; +TextDiagramObject::~TextDiagramObject() {}; + + +bool assign_TextDiagramObject_text(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + { + element->text = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + +const char TextDiagramObject::debugName[] = "TextDiagramObject"; +const char* TextDiagramObject::debugString() const +{ + return TextDiagramObject::debugName; +} + +void TextDiagramObject::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TextDiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TextDiagramObject::declare() +{ + return BaseClassDefiner(TextDiagramObject::addConstructToMap, TextDiagramObject::addPrimitiveAssignFnsToMap, TextDiagramObject::addClassAssignFnsToMap, TextDiagramObject::debugName); +} + +namespace CIMPP +{ + BaseClass* TextDiagramObject_factory() + { + return new TextDiagramObject; + } +} diff --git a/CGMES_3.0.0/TextDiagramObject.hpp b/CGMES_3.0.0/TextDiagramObject.hpp new file mode 100644 index 000000000..a683f51d4 --- /dev/null +++ b/CGMES_3.0.0/TextDiagramObject.hpp @@ -0,0 +1,41 @@ +#ifndef TextDiagramObject_H +#define TextDiagramObject_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DiagramObject.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + A diagram object for placing free-text or text derived from an associated domain object. + */ + class TextDiagramObject : public DiagramObject + { + public: + /* constructor initialising all attributes to null */ + TextDiagramObject(); + ~TextDiagramObject() override; + + CIMPP::String text; /* The text that is displayed by this text diagram object. Default: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TextDiagramObject_factory(); +} +#endif diff --git a/CGMES_3.0.0/ThermalGeneratingUnit.cpp b/CGMES_3.0.0/ThermalGeneratingUnit.cpp new file mode 100644 index 000000000..b38cb9ce4 --- /dev/null +++ b/CGMES_3.0.0/ThermalGeneratingUnit.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ThermalGeneratingUnit.hpp" + +#include +#include + +#include "CAESPlant.hpp" +#include "CogenerationPlant.hpp" +#include "CombinedCyclePlant.hpp" +#include "FossilFuel.hpp" + +using namespace CIMPP; + +ThermalGeneratingUnit::ThermalGeneratingUnit() : CAESPlant(nullptr), CogenerationPlant(nullptr), CombinedCyclePlant(nullptr) {}; +ThermalGeneratingUnit::~ThermalGeneratingUnit() {}; + + + + + + + +bool assign_CAESPlant_ThermalGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ThermalGeneratingUnit_CAESPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + CAESPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CAESPlant != element2) + { + element->CAESPlant = element2; + return assign_CAESPlant_ThermalGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_CogenerationPlant_ThermalGeneratingUnits(BaseClass*, BaseClass*); +bool assign_ThermalGeneratingUnit_CogenerationPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + CogenerationPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CogenerationPlant != element2) + { + element->CogenerationPlant = element2; + return assign_CogenerationPlant_ThermalGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_CombinedCyclePlant_ThermalGeneratingUnits(BaseClass*, BaseClass*); +bool assign_ThermalGeneratingUnit_CombinedCyclePlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + CombinedCyclePlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CombinedCyclePlant != element2) + { + element->CombinedCyclePlant = element2; + return assign_CombinedCyclePlant_ThermalGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass*, BaseClass*); +bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + FossilFuel* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->FossilFuels.begin(), element->FossilFuels.end(), element2) == element->FossilFuels.end()) + { + element->FossilFuels.push_back(element2); + return assign_FossilFuel_ThermalGeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ThermalGeneratingUnit::debugName[] = "ThermalGeneratingUnit"; +const char* ThermalGeneratingUnit::debugString() const +{ + return ThermalGeneratingUnit::debugName; +} + +void ThermalGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit"), &ThermalGeneratingUnit_factory)); +} + +void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ThermalGeneratingUnit::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ThermalGeneratingUnit::declare() +{ + return BaseClassDefiner(ThermalGeneratingUnit::addConstructToMap, ThermalGeneratingUnit::addPrimitiveAssignFnsToMap, ThermalGeneratingUnit::addClassAssignFnsToMap, ThermalGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* ThermalGeneratingUnit_factory() + { + return new ThermalGeneratingUnit; + } +} diff --git a/CGMES_3.0.0/ThermalGeneratingUnit.hpp b/CGMES_3.0.0/ThermalGeneratingUnit.hpp new file mode 100644 index 000000000..f6ffb9f63 --- /dev/null +++ b/CGMES_3.0.0/ThermalGeneratingUnit.hpp @@ -0,0 +1,47 @@ +#ifndef ThermalGeneratingUnit_H +#define ThermalGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class CAESPlant; + class CogenerationPlant; + class CombinedCyclePlant; + class FossilFuel; + + /* + A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. + */ + class ThermalGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ThermalGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/TieFlow.cpp b/CGMES_3.0.0/TieFlow.cpp new file mode 100644 index 000000000..f7f2139c5 --- /dev/null +++ b/CGMES_3.0.0/TieFlow.cpp @@ -0,0 +1,103 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TieFlow.hpp" + +#include +#include + +#include "ControlArea.hpp" +#include "Terminal.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {}; +TieFlow::~TieFlow() {}; + + + + +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) +{ + TieFlow* element = dynamic_cast(BaseClass_ptr1); + ControlArea* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ControlArea != element2) + { + element->ControlArea = element2; + return assign_ControlArea_TieFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_TieFlow(BaseClass*, BaseClass*); +bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TieFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_TieFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char TieFlow::debugName[] = "TieFlow"; +const char* TieFlow::debugString() const +{ + return TieFlow::debugName; +} + +void TieFlow::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TieFlow::declare() +{ + return BaseClassDefiner(TieFlow::addConstructToMap, TieFlow::addPrimitiveAssignFnsToMap, TieFlow::addClassAssignFnsToMap, TieFlow::debugName); +} + +namespace CIMPP +{ + BaseClass* TieFlow_factory() + { + return new TieFlow; + } +} diff --git a/CGMES_3.0.0/TieFlow.hpp b/CGMES_3.0.0/TieFlow.hpp new file mode 100644 index 000000000..6b147944d --- /dev/null +++ b/CGMES_3.0.0/TieFlow.hpp @@ -0,0 +1,45 @@ +#ifndef TieFlow_H +#define TieFlow_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +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. + */ + class TieFlow : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TieFlow_factory(); +} +#endif diff --git a/CGMES_3.0.0/TopologicalIsland.cpp b/CGMES_3.0.0/TopologicalIsland.cpp new file mode 100644 index 000000000..8ee4fba25 --- /dev/null +++ b/CGMES_3.0.0/TopologicalIsland.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TopologicalIsland.hpp" + +#include +#include + +#include "TopologicalNode.hpp" +#include "TopologicalNode.hpp" + +using namespace CIMPP; + +TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {}; +TopologicalIsland::~TopologicalIsland() {}; + + + + + +bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass*, BaseClass*); +bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AngleRefTopologicalNode != element2) + { + element->AngleRefTopologicalNode = element2; + return assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalNode_TopologicalIsland(BaseClass*, BaseClass*); +bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->TopologicalNodes.begin(), element->TopologicalNodes.end(), element2) == element->TopologicalNodes.end()) + { + element->TopologicalNodes.push_back(element2); + return assign_TopologicalNode_TopologicalIsland(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TopologicalIsland::debugName[] = "TopologicalIsland"; +const char* TopologicalIsland::debugString() const +{ + return TopologicalIsland::debugName; +} + +void TopologicalIsland::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TopologicalIsland"), &TopologicalIsland_factory)); +} + +void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TopologicalIsland::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner TopologicalIsland::declare() +{ + return BaseClassDefiner(TopologicalIsland::addConstructToMap, TopologicalIsland::addPrimitiveAssignFnsToMap, TopologicalIsland::addClassAssignFnsToMap, TopologicalIsland::debugName); +} + +namespace CIMPP +{ + BaseClass* TopologicalIsland_factory() + { + return new TopologicalIsland; + } +} diff --git a/CGMES_3.0.0/TopologicalIsland.hpp b/CGMES_3.0.0/TopologicalIsland.hpp new file mode 100644 index 000000000..36117a01b --- /dev/null +++ b/CGMES_3.0.0/TopologicalIsland.hpp @@ -0,0 +1,42 @@ +#ifndef TopologicalIsland_H +#define TopologicalIsland_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class TopologicalIsland : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TopologicalIsland_factory(); +} +#endif diff --git a/CGMES_3.0.0/TopologicalNode.cpp b/CGMES_3.0.0/TopologicalNode.cpp new file mode 100644 index 000000000..e020296bf --- /dev/null +++ b/CGMES_3.0.0/TopologicalNode.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TopologicalNode.hpp" + +#include +#include + +#include "TopologicalIsland.hpp" +#include "BaseVoltage.hpp" +#include "ConnectivityNodeContainer.hpp" +#include "ConnectivityNode.hpp" +#include "ReportingGroup.hpp" +#include "SvInjection.hpp" +#include "SvVoltage.hpp" +#include "Terminal.hpp" +#include "TopologicalIsland.hpp" + +using namespace CIMPP; + +TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {}; +TopologicalNode::~TopologicalNode() {}; + + + + + + + + + + + + +bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalIsland* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AngleRefTopologicalIsland != element2) + { + element->AngleRefTopologicalIsland = element2; + return assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_BaseVoltage_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* 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_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ConnectivityNode_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ConnectivityNodes.begin(), element->ConnectivityNodes.end(), element2) == element->ConnectivityNodes.end()) + { + element->ConnectivityNodes.push_back(element2); + return assign_ConnectivityNode_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ReportingGroup_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + ReportingGroup* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReportingGroup != element2) + { + element->ReportingGroup = element2; + return assign_ReportingGroup_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvInjection_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + SvInjection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvInjection != element2) + { + element->SvInjection = element2; + return assign_SvInjection_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SvVoltage_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + SvVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvVoltage != element2) + { + element->SvVoltage = element2; + return assign_SvVoltage_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_TopologicalNode(BaseClass*, BaseClass*); +bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Terminal.begin(), element->Terminal.end(), element2) == element->Terminal.end()) + { + element->Terminal.push_back(element2); + return assign_Terminal_TopologicalNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TopologicalIsland_TopologicalNodes(BaseClass*, BaseClass*); +bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalIsland* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TopologicalIsland != element2) + { + element->TopologicalIsland = element2; + return assign_TopologicalIsland_TopologicalNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TopologicalNode::debugName[] = "TopologicalNode"; +const char* TopologicalNode::debugString() const +{ + return TopologicalNode::debugName; +} + +void TopologicalNode::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TopologicalNode"), &TopologicalNode_factory)); +} + +void TopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner TopologicalNode::declare() +{ + return BaseClassDefiner(TopologicalNode::addConstructToMap, TopologicalNode::addPrimitiveAssignFnsToMap, TopologicalNode::addClassAssignFnsToMap, TopologicalNode::debugName); +} + +namespace CIMPP +{ + BaseClass* TopologicalNode_factory() + { + return new TopologicalNode; + } +} diff --git a/CGMES_3.0.0/TopologicalNode.hpp b/CGMES_3.0.0/TopologicalNode.hpp new file mode 100644 index 000000000..3b48de045 --- /dev/null +++ b/CGMES_3.0.0/TopologicalNode.hpp @@ -0,0 +1,56 @@ +#ifndef TopologicalNode_H +#define TopologicalNode_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class BaseVoltage; + class ConnectivityNode; + class ConnectivityNodeContainer; + class ReportingGroup; + class SvInjection; + class SvVoltage; + 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". + */ + class TopologicalNode : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TopologicalNode_factory(); +} +#endif diff --git a/CGMES_3.0.0/TownDetail.cpp b/CGMES_3.0.0/TownDetail.cpp new file mode 100644 index 000000000..05a5a457c --- /dev/null +++ b/CGMES_3.0.0/TownDetail.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TownDetail.hpp" + +#include +#include + +#include "String.hpp" +#include "String.hpp" +#include "String.hpp" +#include "String.hpp" +#include "String.hpp" + +using namespace CIMPP; + +TownDetail::TownDetail() {}; +TownDetail::~TownDetail() {}; + + +bool assign_TownDetail_code(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->code = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TownDetail_country(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->country = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TownDetail_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->name = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TownDetail_section(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->section = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TownDetail_stateOrProvince(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + { + element->stateOrProvince = buffer.str(); + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + +const char TownDetail::debugName[] = "TownDetail"; +const char* TownDetail::debugString() const +{ + return TownDetail::debugName; +} + +void TownDetail::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TownDetail::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TownDetail::declare() +{ + return BaseClassDefiner(TownDetail::addConstructToMap, TownDetail::addPrimitiveAssignFnsToMap, TownDetail::addClassAssignFnsToMap, TownDetail::debugName); +} + +namespace CIMPP +{ + BaseClass* TownDetail_factory() + { + return new TownDetail; + } +} diff --git a/CGMES_3.0.0/TownDetail.hpp b/CGMES_3.0.0/TownDetail.hpp new file mode 100644 index 000000000..bc10afb21 --- /dev/null +++ b/CGMES_3.0.0/TownDetail.hpp @@ -0,0 +1,45 @@ +#ifndef TownDetail_H +#define TownDetail_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "BaseClass.hpp" +#include "BaseClassDefiner.hpp" +#include "String.hpp" + +namespace CIMPP +{ + + /* + Town details, in the context of address. + */ + class TownDetail : public BaseClass + { + public: + /* constructor initialising all attributes to null */ + 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: '' */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TownDetail_factory(); +} +#endif diff --git a/CGMES_3.0.0/TransformerEnd.cpp b/CGMES_3.0.0/TransformerEnd.cpp new file mode 100644 index 000000000..241deae09 --- /dev/null +++ b/CGMES_3.0.0/TransformerEnd.cpp @@ -0,0 +1,191 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TransformerEnd.hpp" + +#include +#include + +#include "BaseVoltage.hpp" +#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() {}; + + + + + + +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) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_TransformerEnds(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_PhaseTapChanger_TransformerEnd(BaseClass*, BaseClass*); +bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + PhaseTapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PhaseTapChanger != element2) + { + element->PhaseTapChanger = element2; + return assign_PhaseTapChanger_TransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RatioTapChanger_TransformerEnd(BaseClass*, BaseClass*); +bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + RatioTapChanger* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RatioTapChanger != element2) + { + element->RatioTapChanger = element2; + return assign_RatioTapChanger_TransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_TransformerEnd(BaseClass*, BaseClass*); +bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_TransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char TransformerEnd::debugName[] = "TransformerEnd"; +const char* TransformerEnd::debugString() const +{ + return TransformerEnd::debugName; +} + +void TransformerEnd::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner TransformerEnd::declare() +{ + return BaseClassDefiner(TransformerEnd::addConstructToMap, TransformerEnd::addPrimitiveAssignFnsToMap, TransformerEnd::addClassAssignFnsToMap, TransformerEnd::debugName); +} + +namespace CIMPP +{ + BaseClass* TransformerEnd_factory() + { + return new TransformerEnd; + } +} diff --git a/CGMES_3.0.0/TransformerEnd.hpp b/CGMES_3.0.0/TransformerEnd.hpp new file mode 100644 index 000000000..d97bc66e6 --- /dev/null +++ b/CGMES_3.0.0/TransformerEnd.hpp @@ -0,0 +1,55 @@ +#ifndef TransformerEnd_H +#define TransformerEnd_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Integer.hpp" +#include "Reactance.hpp" +#include "Resistance.hpp" + +namespace CIMPP +{ + class BaseVoltage; + class PhaseTapChanger; + 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. + */ + class TransformerEnd : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TransformerEnd_factory(); +} +#endif diff --git a/CGMES_3.0.0/TurbLCFB1.cpp b/CGMES_3.0.0/TurbLCFB1.cpp new file mode 100644 index 000000000..b5c4049d7 --- /dev/null +++ b/CGMES_3.0.0/TurbLCFB1.cpp @@ -0,0 +1,239 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbLCFB1.hpp" + +#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() {}; + + +bool assign_TurbLCFB1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->db; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->emax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_fb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_irmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->irmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ki; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwbase; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_pbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pbf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmwset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->speedReferenceGovernor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_TurbLCFB1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpelec; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + +const char TurbLCFB1::debugName[] = "TurbLCFB1"; +const char* TurbLCFB1::debugString() const +{ + return TurbLCFB1::debugName; +} + +void TurbLCFB1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TurbLCFB1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner TurbLCFB1::declare() +{ + return BaseClassDefiner(TurbLCFB1::addConstructToMap, TurbLCFB1::addPrimitiveAssignFnsToMap, TurbLCFB1::addClassAssignFnsToMap, TurbLCFB1::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbLCFB1_factory() + { + return new TurbLCFB1; + } +} diff --git a/CGMES_3.0.0/TurbLCFB1.hpp b/CGMES_3.0.0/TurbLCFB1.hpp new file mode 100644 index 000000000..d350e1d78 --- /dev/null +++ b/CGMES_3.0.0/TurbLCFB1.hpp @@ -0,0 +1,55 @@ +#ifndef TurbLCFB1_H +#define TurbLCFB1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineLoadControllerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "ActivePower.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class TurbLCFB1 : public TurbineLoadControllerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbLCFB1_factory(); +} +#endif diff --git a/CGMES_3.0.0/TurbineGovernorDynamics.cpp b/CGMES_3.0.0/TurbineGovernorDynamics.cpp new file mode 100644 index 000000000..1a9e65c60 --- /dev/null +++ b/CGMES_3.0.0/TurbineGovernorDynamics.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineGovernorDynamics.hpp" + +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "SynchronousMachineDynamics.hpp" +#include "TurbineLoadControllerDynamics.hpp" + +using namespace CIMPP; + +TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {}; +TurbineGovernorDynamics::~TurbineGovernorDynamics() {}; + + + + + + +bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineGovernorDynamics* 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_TurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineGovernorDynamics* 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_TurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); +bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineLoadControllerDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineLoadControllerDynamics != element2) + { + element->TurbineLoadControllerDynamics = element2; + return assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TurbineGovernorDynamics::debugName[] = "TurbineGovernorDynamics"; +const char* TurbineGovernorDynamics::debugString() const +{ + return TurbineGovernorDynamics::debugName; +} + +void TurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics"), &TurbineGovernorDynamics_factory)); +} + +void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TurbineGovernorDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner TurbineGovernorDynamics::declare() +{ + return BaseClassDefiner(TurbineGovernorDynamics::addConstructToMap, TurbineGovernorDynamics::addPrimitiveAssignFnsToMap, TurbineGovernorDynamics::addClassAssignFnsToMap, TurbineGovernorDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineGovernorDynamics_factory() + { + return new TurbineGovernorDynamics; + } +} diff --git a/CGMES_3.0.0/TurbineGovernorDynamics.hpp b/CGMES_3.0.0/TurbineGovernorDynamics.hpp new file mode 100644 index 000000000..4e781d803 --- /dev/null +++ b/CGMES_3.0.0/TurbineGovernorDynamics.hpp @@ -0,0 +1,45 @@ +#ifndef TurbineGovernorDynamics_H +#define TurbineGovernorDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class AsynchronousMachineDynamics; + 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. + */ + class TurbineGovernorDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineGovernorDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/TurbineGovernorUserDefined.cpp b/CGMES_3.0.0/TurbineGovernorUserDefined.cpp new file mode 100644 index 000000000..8ebaeff3f --- /dev/null +++ b/CGMES_3.0.0/TurbineGovernorUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineGovernorUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +TurbineGovernorUserDefined::TurbineGovernorUserDefined() {}; +TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {}; + + + +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) +{ + TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char TurbineGovernorUserDefined::debugName[] = "TurbineGovernorUserDefined"; +const char* TurbineGovernorUserDefined::debugString() const +{ + return TurbineGovernorUserDefined::debugName; +} + +void TurbineGovernorUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TurbineGovernorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics"), &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner TurbineGovernorUserDefined::declare() +{ + return BaseClassDefiner(TurbineGovernorUserDefined::addConstructToMap, TurbineGovernorUserDefined::addPrimitiveAssignFnsToMap, TurbineGovernorUserDefined::addClassAssignFnsToMap, TurbineGovernorUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineGovernorUserDefined_factory() + { + return new TurbineGovernorUserDefined; + } +} diff --git a/CGMES_3.0.0/TurbineGovernorUserDefined.hpp b/CGMES_3.0.0/TurbineGovernorUserDefined.hpp new file mode 100644 index 000000000..02d77c77c --- /dev/null +++ b/CGMES_3.0.0/TurbineGovernorUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef TurbineGovernorUserDefined_H +#define TurbineGovernorUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineGovernorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Turbine-governor function block whose dynamic behaviour is described by a user-defined model. + */ + class TurbineGovernorUserDefined : public TurbineGovernorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineGovernorUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp b/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp new file mode 100644 index 000000000..eac14ab44 --- /dev/null +++ b/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineLoadControllerDynamics.hpp" + +#include +#include + +#include "TurbineGovernorDynamics.hpp" + +using namespace CIMPP; + +TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {}; +TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {}; + + + + +bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass*, BaseClass*); +bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1); + TurbineGovernorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->TurbineGovernorDynamics != element2) + { + element->TurbineGovernorDynamics = element2; + return assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char TurbineLoadControllerDynamics::debugName[] = "TurbineLoadControllerDynamics"; +const char* TurbineLoadControllerDynamics::debugString() const +{ + return TurbineLoadControllerDynamics::debugName; +} + +void TurbineLoadControllerDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics"), &TurbineLoadControllerDynamics_factory)); +} + +void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void TurbineLoadControllerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics"), &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics)); +} + +const BaseClassDefiner TurbineLoadControllerDynamics::declare() +{ + return BaseClassDefiner(TurbineLoadControllerDynamics::addConstructToMap, TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap, TurbineLoadControllerDynamics::addClassAssignFnsToMap, TurbineLoadControllerDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineLoadControllerDynamics_factory() + { + return new TurbineLoadControllerDynamics; + } +} diff --git a/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp b/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp new file mode 100644 index 000000000..dab9cf732 --- /dev/null +++ b/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef TurbineLoadControllerDynamics_H +#define TurbineLoadControllerDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class TurbineLoadControllerDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + TurbineLoadControllerDynamics(); + ~TurbineLoadControllerDynamics() override; + + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor controlled by this turbine load controller. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineLoadControllerDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp b/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp new file mode 100644 index 000000000..70752dcc4 --- /dev/null +++ b/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "TurbineLoadControllerUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {}; +TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {}; + + + +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) +{ + TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char TurbineLoadControllerUserDefined::debugName[] = "TurbineLoadControllerUserDefined"; +const char* TurbineLoadControllerUserDefined::debugString() const +{ + return TurbineLoadControllerUserDefined::debugName; +} + +void TurbineLoadControllerUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void TurbineLoadControllerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics"), &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner TurbineLoadControllerUserDefined::declare() +{ + return BaseClassDefiner(TurbineLoadControllerUserDefined::addConstructToMap, TurbineLoadControllerUserDefined::addPrimitiveAssignFnsToMap, TurbineLoadControllerUserDefined::addClassAssignFnsToMap, TurbineLoadControllerUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* TurbineLoadControllerUserDefined_factory() + { + return new TurbineLoadControllerUserDefined; + } +} diff --git a/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp b/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp new file mode 100644 index 000000000..ac963c6c6 --- /dev/null +++ b/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef TurbineLoadControllerUserDefined_H +#define TurbineLoadControllerUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "TurbineLoadControllerDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Turbine load controller function block whose dynamic behaviour is described by a user-defined model. + */ + class TurbineLoadControllerUserDefined : public TurbineLoadControllerDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* TurbineLoadControllerUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcLim2Simplified.cpp b/CGMES_3.0.0/UnderexcLim2Simplified.cpp new file mode 100644 index 000000000..c9798125d --- /dev/null +++ b/CGMES_3.0.0/UnderexcLim2Simplified.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLim2Simplified.hpp" + +#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() {}; + + +bool assign_UnderexcLim2Simplified_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kui; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLim2Simplified_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char UnderexcLim2Simplified::debugName[] = "UnderexcLim2Simplified"; +const char* UnderexcLim2Simplified::debugString() const +{ + return UnderexcLim2Simplified::debugName; +} + +void UnderexcLim2Simplified::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLim2Simplified::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLim2Simplified::declare() +{ + return BaseClassDefiner(UnderexcLim2Simplified::addConstructToMap, UnderexcLim2Simplified::addPrimitiveAssignFnsToMap, UnderexcLim2Simplified::addClassAssignFnsToMap, UnderexcLim2Simplified::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLim2Simplified_factory() + { + return new UnderexcLim2Simplified; + } +} diff --git a/CGMES_3.0.0/UnderexcLim2Simplified.hpp b/CGMES_3.0.0/UnderexcLim2Simplified.hpp new file mode 100644 index 000000000..2c7828f17 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLim2Simplified.hpp @@ -0,0 +1,47 @@ +#ifndef UnderexcLim2Simplified_H +#define UnderexcLim2Simplified_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +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). + */ + class UnderexcLim2Simplified : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLim2Simplified_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcLimIEEE1.cpp b/CGMES_3.0.0/UnderexcLimIEEE1.cpp new file mode 100644 index 000000000..e09b8a4fd --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimIEEE1.cpp @@ -0,0 +1,287 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimIEEE1.hpp" + +#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() {}; + + +bool assign_UnderexcLimIEEE1_kuc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kuc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kuf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kui; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_kur(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kur; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vucmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE1_vurmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vurmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + +const char UnderexcLimIEEE1::debugName[] = "UnderexcLimIEEE1"; +const char* UnderexcLimIEEE1::debugString() const +{ + return UnderexcLimIEEE1::debugName; +} + +void UnderexcLimIEEE1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimIEEE1::declare() +{ + return BaseClassDefiner(UnderexcLimIEEE1::addConstructToMap, UnderexcLimIEEE1::addPrimitiveAssignFnsToMap, UnderexcLimIEEE1::addClassAssignFnsToMap, UnderexcLimIEEE1::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimIEEE1_factory() + { + return new UnderexcLimIEEE1; + } +} diff --git a/CGMES_3.0.0/UnderexcLimIEEE1.hpp b/CGMES_3.0.0/UnderexcLimIEEE1.hpp new file mode 100644 index 000000000..c7d143a93 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimIEEE1.hpp @@ -0,0 +1,56 @@ +#ifndef UnderexcLimIEEE1_H +#define UnderexcLimIEEE1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class UnderexcLimIEEE1 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimIEEE1_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcLimIEEE2.cpp b/CGMES_3.0.0/UnderexcLimIEEE2.cpp new file mode 100644 index 000000000..71d70afd8 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimIEEE2.cpp @@ -0,0 +1,687 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimIEEE2.hpp" + +#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() {}; + + +bool assign_UnderexcLimIEEE2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kfb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kfb; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kuf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kui; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_p9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->p9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q10; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q5; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q6; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q7; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q8; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_q9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->q9; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tu4; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tul; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tup; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tuq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_tuv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vuimin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimIEEE2_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vulmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const char UnderexcLimIEEE2::debugName[] = "UnderexcLimIEEE2"; +const char* UnderexcLimIEEE2::debugString() const +{ + return UnderexcLimIEEE2::debugName; +} + +void UnderexcLimIEEE2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimIEEE2::declare() +{ + return BaseClassDefiner(UnderexcLimIEEE2::addConstructToMap, UnderexcLimIEEE2::addPrimitiveAssignFnsToMap, UnderexcLimIEEE2::addClassAssignFnsToMap, UnderexcLimIEEE2::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimIEEE2_factory() + { + return new UnderexcLimIEEE2; + } +} diff --git a/CGMES_3.0.0/UnderexcLimIEEE2.hpp b/CGMES_3.0.0/UnderexcLimIEEE2.hpp new file mode 100644 index 000000000..aeb789f56 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimIEEE2.hpp @@ -0,0 +1,82 @@ +#ifndef UnderexcLimIEEE2_H +#define UnderexcLimIEEE2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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)). + */ + class UnderexcLimIEEE2 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimIEEE2_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcLimX1.cpp b/CGMES_3.0.0/UnderexcLimX1.cpp new file mode 100644 index 000000000..3d9a9b6e1 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimX1.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimX1.hpp" + +#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() {}; + + +bool assign_UnderexcLimX1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->k; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->melmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX1_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char UnderexcLimX1::debugName[] = "UnderexcLimX1"; +const char* UnderexcLimX1::debugString() const +{ + return UnderexcLimX1::debugName; +} + +void UnderexcLimX1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimX1::declare() +{ + return BaseClassDefiner(UnderexcLimX1::addConstructToMap, UnderexcLimX1::addPrimitiveAssignFnsToMap, UnderexcLimX1::addClassAssignFnsToMap, UnderexcLimX1::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimX1_factory() + { + return new UnderexcLimX1; + } +} diff --git a/CGMES_3.0.0/UnderexcLimX1.hpp b/CGMES_3.0.0/UnderexcLimX1.hpp new file mode 100644 index 000000000..22d659909 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimX1.hpp @@ -0,0 +1,47 @@ +#ifndef UnderexcLimX1_H +#define UnderexcLimX1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Allis-Chalmers minimum excitation limiter. + */ + class UnderexcLimX1 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimX1_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcLimX2.cpp b/CGMES_3.0.0/UnderexcLimX2.cpp new file mode 100644 index 000000000..9b6bc21c8 --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimX2.cpp @@ -0,0 +1,159 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcLimX2.hpp" + +#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() {}; + + +bool assign_UnderexcLimX2_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->km; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->melmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_qo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qo; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->r; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tf2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_UnderexcLimX2_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tm; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + + +const char UnderexcLimX2::debugName[] = "UnderexcLimX2"; +const char* UnderexcLimX2::debugString() const +{ + return UnderexcLimX2::debugName; +} + +void UnderexcLimX2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner UnderexcLimX2::declare() +{ + return BaseClassDefiner(UnderexcLimX2::addConstructToMap, UnderexcLimX2::addPrimitiveAssignFnsToMap, UnderexcLimX2::addClassAssignFnsToMap, UnderexcLimX2::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcLimX2_factory() + { + return new UnderexcLimX2; + } +} diff --git a/CGMES_3.0.0/UnderexcLimX2.hpp b/CGMES_3.0.0/UnderexcLimX2.hpp new file mode 100644 index 000000000..004a48bbd --- /dev/null +++ b/CGMES_3.0.0/UnderexcLimX2.hpp @@ -0,0 +1,48 @@ +#ifndef UnderexcLimX2_H +#define UnderexcLimX2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + + /* + Westinghouse minimum excitation limiter. + */ + class UnderexcLimX2 : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcLimX2_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp b/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp new file mode 100644 index 000000000..131bea982 --- /dev/null +++ b/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcitationLimiterDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; +UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); +bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); +bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char UnderexcitationLimiterDynamics::debugName[] = "UnderexcitationLimiterDynamics"; +const char* UnderexcitationLimiterDynamics::debugString() const +{ + return UnderexcitationLimiterDynamics::debugName; +} + +void UnderexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics"), &UnderexcitationLimiterDynamics_factory)); +} + +void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +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)); +} + +const BaseClassDefiner UnderexcitationLimiterDynamics::declare() +{ + return BaseClassDefiner(UnderexcitationLimiterDynamics::addConstructToMap, UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap, UnderexcitationLimiterDynamics::addClassAssignFnsToMap, UnderexcitationLimiterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcitationLimiterDynamics_factory() + { + return new UnderexcitationLimiterDynamics; + } +} diff --git a/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp b/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp new file mode 100644 index 000000000..260f5fb89 --- /dev/null +++ b/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef UnderexcitationLimiterDynamics_H +#define UnderexcitationLimiterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class UnderexcitationLimiterDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcitationLimiterDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp new file mode 100644 index 000000000..6415389ab --- /dev/null +++ b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnderexcitationLimiterUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {}; +UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {}; + + + +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) +{ + UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char UnderexcitationLimiterUserDefined::debugName[] = "UnderexcitationLimiterUserDefined"; +const char* UnderexcitationLimiterUserDefined::debugString() const +{ + return UnderexcitationLimiterUserDefined::debugName; +} + +void UnderexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void UnderexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner UnderexcitationLimiterUserDefined::declare() +{ + return BaseClassDefiner(UnderexcitationLimiterUserDefined::addConstructToMap, UnderexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap, UnderexcitationLimiterUserDefined::addClassAssignFnsToMap, UnderexcitationLimiterUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* UnderexcitationLimiterUserDefined_factory() + { + return new UnderexcitationLimiterUserDefined; + } +} diff --git a/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp new file mode 100644 index 000000000..fb47404ae --- /dev/null +++ b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef UnderexcitationLimiterUserDefined_H +#define UnderexcitationLimiterUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "UnderexcitationLimiterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Underexcitation limiter function block whose dynamic behaviour is described by a user-defined model. + */ + class UnderexcitationLimiterUserDefined : public UnderexcitationLimiterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* UnderexcitationLimiterUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/UnitMultiplier.cpp b/CGMES_3.0.0/UnitMultiplier.cpp new file mode 100644 index 000000000..120e409af --- /dev/null +++ b/CGMES_3.0.0/UnitMultiplier.cpp @@ -0,0 +1,261 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnitMultiplier.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +UnitMultiplier& UnitMultiplier::operator=(UnitMultiplier_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +UnitMultiplier::operator UnitMultiplier_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char UnitMultiplier::debugName[] = "UnitMultiplier"; +const char* UnitMultiplier::debugString() const +{ + return UnitMultiplier::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, UnitMultiplier& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "UnitMultiplier") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "y") + { + rop = UnitMultiplier::y; + return lop; + } + if(EnumSymbol == "z") + { + rop = UnitMultiplier::z; + return lop; + } + if(EnumSymbol == "a") + { + rop = UnitMultiplier::a; + return lop; + } + if(EnumSymbol == "f") + { + rop = UnitMultiplier::f; + return lop; + } + if(EnumSymbol == "p") + { + rop = UnitMultiplier::p; + return lop; + } + if(EnumSymbol == "n") + { + rop = UnitMultiplier::n; + return lop; + } + if(EnumSymbol == "micro") + { + rop = UnitMultiplier::micro; + return lop; + } + if(EnumSymbol == "m") + { + rop = UnitMultiplier::m; + return lop; + } + if(EnumSymbol == "c") + { + rop = UnitMultiplier::c; + return lop; + } + if(EnumSymbol == "d") + { + rop = UnitMultiplier::d; + return lop; + } + if(EnumSymbol == "none") + { + rop = UnitMultiplier::none; + return lop; + } + if(EnumSymbol == "da") + { + rop = UnitMultiplier::da; + return lop; + } + if(EnumSymbol == "h") + { + rop = UnitMultiplier::h; + return lop; + } + if(EnumSymbol == "k") + { + rop = UnitMultiplier::k; + return lop; + } + if(EnumSymbol == "M") + { + rop = UnitMultiplier::M; + return lop; + } + if(EnumSymbol == "G") + { + rop = UnitMultiplier::G; + return lop; + } + if(EnumSymbol == "T") + { + rop = UnitMultiplier::T; + return lop; + } + if(EnumSymbol == "P") + { + rop = UnitMultiplier::P; + return lop; + } + if(EnumSymbol == "E") + { + rop = UnitMultiplier::E; + return lop; + } + if(EnumSymbol == "Z") + { + rop = UnitMultiplier::Z; + return lop; + } + if(EnumSymbol == "Y") + { + rop = UnitMultiplier::Y; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const UnitMultiplier& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == UnitMultiplier::y) + { + EnumSymbol = "y"; + } + if (obj.value == UnitMultiplier::z) + { + EnumSymbol = "z"; + } + if (obj.value == UnitMultiplier::a) + { + EnumSymbol = "a"; + } + if (obj.value == UnitMultiplier::f) + { + EnumSymbol = "f"; + } + if (obj.value == UnitMultiplier::p) + { + EnumSymbol = "p"; + } + if (obj.value == UnitMultiplier::n) + { + EnumSymbol = "n"; + } + if (obj.value == UnitMultiplier::micro) + { + EnumSymbol = "micro"; + } + if (obj.value == UnitMultiplier::m) + { + EnumSymbol = "m"; + } + if (obj.value == UnitMultiplier::c) + { + EnumSymbol = "c"; + } + if (obj.value == UnitMultiplier::d) + { + EnumSymbol = "d"; + } + if (obj.value == UnitMultiplier::none) + { + EnumSymbol = "none"; + } + if (obj.value == UnitMultiplier::da) + { + EnumSymbol = "da"; + } + if (obj.value == UnitMultiplier::h) + { + EnumSymbol = "h"; + } + if (obj.value == UnitMultiplier::k) + { + EnumSymbol = "k"; + } + if (obj.value == UnitMultiplier::M) + { + EnumSymbol = "M"; + } + if (obj.value == UnitMultiplier::G) + { + EnumSymbol = "G"; + } + if (obj.value == UnitMultiplier::T) + { + EnumSymbol = "T"; + } + if (obj.value == UnitMultiplier::P) + { + EnumSymbol = "P"; + } + if (obj.value == UnitMultiplier::E) + { + EnumSymbol = "E"; + } + if (obj.value == UnitMultiplier::Z) + { + EnumSymbol = "Z"; + } + if (obj.value == UnitMultiplier::Y) + { + EnumSymbol = "Y"; + } + + if (!EnumSymbol.empty()) + { + os << "UnitMultiplier." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/UnitMultiplier.hpp b/CGMES_3.0.0/UnitMultiplier.hpp new file mode 100644 index 000000000..6ab6e5f4a --- /dev/null +++ b/CGMES_3.0.0/UnitMultiplier.hpp @@ -0,0 +1,122 @@ +#ifndef UnitMultiplier_H +#define UnitMultiplier_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +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". + */ + class UnitMultiplier + { + public: + enum UnitMultiplier_ENUM + { + /** + * Yocto 10**-24. + */ + y, + /** + * Zepto 10**-21. + */ + z, + /** + * Atto 10**-18. + */ + a, + /** + * Femto 10**-15. + */ + f, + /** + * Pico 10**-12. + */ + p, + /** + * Nano 10**-9. + */ + n, + /** + * Micro 10**-6. + */ + micro, + /** + * Milli 10**-3. + */ + m, + /** + * Centi 10**-2. + */ + c, + /** + * Deci 10**-1. + */ + d, + /** + * No multiplier or equivalently multiply by 1. + */ + none, + /** + * Deca 10**1. + */ + da, + /** + * Hecto 10**2. + */ + h, + /** + * Kilo 10**3. + */ + k, + /** + * Mega 10**6. + */ + M, + /** + * Giga 10**9. + */ + G, + /** + * Tera 10**12. + */ + T, + /** + * Peta 10**15. + */ + P, + /** + * Exa 10**18. + */ + E, + /** + * Zetta 10**21. + */ + Z, + /** + * Yotta 10**24. + */ + Y, + }; + + UnitMultiplier() : value(), initialized(false) {} + UnitMultiplier(UnitMultiplier_ENUM value) : value(value), initialized(true) {} + + UnitMultiplier& operator=(UnitMultiplier_ENUM rop); + operator UnitMultiplier_ENUM() const; + + UnitMultiplier_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, UnitMultiplier& rop); + friend std::ostream& operator<<(std::ostream& os, const UnitMultiplier& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/UnitSymbol.cpp b/CGMES_3.0.0/UnitSymbol.cpp new file mode 100644 index 000000000..f88c45b30 --- /dev/null +++ b/CGMES_3.0.0/UnitSymbol.cpp @@ -0,0 +1,1341 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "UnitSymbol.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +UnitSymbol& UnitSymbol::operator=(UnitSymbol_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +UnitSymbol::operator UnitSymbol_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char UnitSymbol::debugName[] = "UnitSymbol"; +const char* UnitSymbol::debugString() const +{ + return UnitSymbol::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, UnitSymbol& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "UnitSymbol") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "none") + { + rop = UnitSymbol::none; + return lop; + } + if(EnumSymbol == "m") + { + rop = UnitSymbol::m; + return lop; + } + if(EnumSymbol == "kg") + { + rop = UnitSymbol::kg; + return lop; + } + if(EnumSymbol == "s") + { + rop = UnitSymbol::s; + return lop; + } + if(EnumSymbol == "A") + { + rop = UnitSymbol::A; + return lop; + } + if(EnumSymbol == "K") + { + rop = UnitSymbol::K; + return lop; + } + if(EnumSymbol == "mol") + { + rop = UnitSymbol::mol; + return lop; + } + if(EnumSymbol == "cd") + { + rop = UnitSymbol::cd; + return lop; + } + if(EnumSymbol == "deg") + { + rop = UnitSymbol::deg; + return lop; + } + if(EnumSymbol == "rad") + { + rop = UnitSymbol::rad; + return lop; + } + if(EnumSymbol == "sr") + { + rop = UnitSymbol::sr; + return lop; + } + if(EnumSymbol == "Gy") + { + rop = UnitSymbol::Gy; + return lop; + } + if(EnumSymbol == "Bq") + { + rop = UnitSymbol::Bq; + return lop; + } + if(EnumSymbol == "degC") + { + rop = UnitSymbol::degC; + return lop; + } + if(EnumSymbol == "Sv") + { + rop = UnitSymbol::Sv; + return lop; + } + if(EnumSymbol == "F") + { + rop = UnitSymbol::F; + return lop; + } + if(EnumSymbol == "C") + { + rop = UnitSymbol::C; + return lop; + } + if(EnumSymbol == "S") + { + rop = UnitSymbol::S; + return lop; + } + if(EnumSymbol == "H") + { + rop = UnitSymbol::H; + return lop; + } + if(EnumSymbol == "V") + { + rop = UnitSymbol::V; + return lop; + } + if(EnumSymbol == "ohm") + { + rop = UnitSymbol::ohm; + return lop; + } + if(EnumSymbol == "J") + { + rop = UnitSymbol::J; + return lop; + } + if(EnumSymbol == "N") + { + rop = UnitSymbol::N; + return lop; + } + if(EnumSymbol == "Hz") + { + rop = UnitSymbol::Hz; + return lop; + } + if(EnumSymbol == "lx") + { + rop = UnitSymbol::lx; + return lop; + } + if(EnumSymbol == "lm") + { + rop = UnitSymbol::lm; + return lop; + } + if(EnumSymbol == "Wb") + { + rop = UnitSymbol::Wb; + return lop; + } + if(EnumSymbol == "T") + { + rop = UnitSymbol::T; + return lop; + } + if(EnumSymbol == "W") + { + rop = UnitSymbol::W; + return lop; + } + if(EnumSymbol == "Pa") + { + rop = UnitSymbol::Pa; + return lop; + } + if(EnumSymbol == "m2") + { + rop = UnitSymbol::m2; + return lop; + } + if(EnumSymbol == "m3") + { + rop = UnitSymbol::m3; + return lop; + } + if(EnumSymbol == "mPers") + { + rop = UnitSymbol::mPers; + return lop; + } + if(EnumSymbol == "mPers2") + { + rop = UnitSymbol::mPers2; + return lop; + } + if(EnumSymbol == "m3Pers") + { + rop = UnitSymbol::m3Pers; + return lop; + } + if(EnumSymbol == "mPerm3") + { + rop = UnitSymbol::mPerm3; + return lop; + } + if(EnumSymbol == "kgm") + { + rop = UnitSymbol::kgm; + return lop; + } + if(EnumSymbol == "kgPerm3") + { + rop = UnitSymbol::kgPerm3; + return lop; + } + if(EnumSymbol == "m2Pers") + { + rop = UnitSymbol::m2Pers; + return lop; + } + if(EnumSymbol == "WPermK") + { + rop = UnitSymbol::WPermK; + return lop; + } + if(EnumSymbol == "JPerK") + { + rop = UnitSymbol::JPerK; + return lop; + } + if(EnumSymbol == "ppm") + { + rop = UnitSymbol::ppm; + return lop; + } + if(EnumSymbol == "rotPers") + { + rop = UnitSymbol::rotPers; + return lop; + } + if(EnumSymbol == "radPers") + { + rop = UnitSymbol::radPers; + return lop; + } + if(EnumSymbol == "WPerm2") + { + rop = UnitSymbol::WPerm2; + return lop; + } + if(EnumSymbol == "JPerm2") + { + rop = UnitSymbol::JPerm2; + return lop; + } + if(EnumSymbol == "SPerm") + { + rop = UnitSymbol::SPerm; + return lop; + } + if(EnumSymbol == "KPers") + { + rop = UnitSymbol::KPers; + return lop; + } + if(EnumSymbol == "PaPers") + { + rop = UnitSymbol::PaPers; + return lop; + } + if(EnumSymbol == "JPerkgK") + { + rop = UnitSymbol::JPerkgK; + return lop; + } + if(EnumSymbol == "VA") + { + rop = UnitSymbol::VA; + return lop; + } + if(EnumSymbol == "VAr") + { + rop = UnitSymbol::VAr; + return lop; + } + if(EnumSymbol == "cosPhi") + { + rop = UnitSymbol::cosPhi; + return lop; + } + if(EnumSymbol == "Vs") + { + rop = UnitSymbol::Vs; + return lop; + } + if(EnumSymbol == "V2") + { + rop = UnitSymbol::V2; + return lop; + } + if(EnumSymbol == "As") + { + rop = UnitSymbol::As; + return lop; + } + if(EnumSymbol == "A2") + { + rop = UnitSymbol::A2; + return lop; + } + if(EnumSymbol == "A2s") + { + rop = UnitSymbol::A2s; + return lop; + } + if(EnumSymbol == "VAh") + { + rop = UnitSymbol::VAh; + return lop; + } + if(EnumSymbol == "Wh") + { + rop = UnitSymbol::Wh; + return lop; + } + if(EnumSymbol == "VArh") + { + rop = UnitSymbol::VArh; + return lop; + } + if(EnumSymbol == "VPerHz") + { + rop = UnitSymbol::VPerHz; + return lop; + } + if(EnumSymbol == "HzPers") + { + rop = UnitSymbol::HzPers; + return lop; + } + if(EnumSymbol == "character") + { + rop = UnitSymbol::character; + return lop; + } + if(EnumSymbol == "charPers") + { + rop = UnitSymbol::charPers; + return lop; + } + if(EnumSymbol == "kgm2") + { + rop = UnitSymbol::kgm2; + return lop; + } + if(EnumSymbol == "dB") + { + rop = UnitSymbol::dB; + return lop; + } + if(EnumSymbol == "WPers") + { + rop = UnitSymbol::WPers; + return lop; + } + if(EnumSymbol == "lPers") + { + rop = UnitSymbol::lPers; + return lop; + } + if(EnumSymbol == "dBm") + { + rop = UnitSymbol::dBm; + return lop; + } + if(EnumSymbol == "h") + { + rop = UnitSymbol::h; + return lop; + } + if(EnumSymbol == "min") + { + rop = UnitSymbol::min; + return lop; + } + if(EnumSymbol == "Q") + { + rop = UnitSymbol::Q; + return lop; + } + if(EnumSymbol == "Qh") + { + rop = UnitSymbol::Qh; + return lop; + } + if(EnumSymbol == "ohmm") + { + rop = UnitSymbol::ohmm; + return lop; + } + if(EnumSymbol == "APerm") + { + rop = UnitSymbol::APerm; + return lop; + } + if(EnumSymbol == "V2h") + { + rop = UnitSymbol::V2h; + return lop; + } + if(EnumSymbol == "A2h") + { + rop = UnitSymbol::A2h; + return lop; + } + if(EnumSymbol == "Ah") + { + rop = UnitSymbol::Ah; + return lop; + } + if(EnumSymbol == "count") + { + rop = UnitSymbol::count; + return lop; + } + if(EnumSymbol == "ft3") + { + rop = UnitSymbol::ft3; + return lop; + } + if(EnumSymbol == "m3Perh") + { + rop = UnitSymbol::m3Perh; + return lop; + } + if(EnumSymbol == "gal") + { + rop = UnitSymbol::gal; + return lop; + } + if(EnumSymbol == "Btu") + { + rop = UnitSymbol::Btu; + return lop; + } + if(EnumSymbol == "l") + { + rop = UnitSymbol::l; + return lop; + } + if(EnumSymbol == "lPerh") + { + rop = UnitSymbol::lPerh; + return lop; + } + if(EnumSymbol == "lPerl") + { + rop = UnitSymbol::lPerl; + return lop; + } + if(EnumSymbol == "gPerg") + { + rop = UnitSymbol::gPerg; + return lop; + } + if(EnumSymbol == "molPerm3") + { + rop = UnitSymbol::molPerm3; + return lop; + } + if(EnumSymbol == "molPermol") + { + rop = UnitSymbol::molPermol; + return lop; + } + if(EnumSymbol == "molPerkg") + { + rop = UnitSymbol::molPerkg; + return lop; + } + if(EnumSymbol == "sPers") + { + rop = UnitSymbol::sPers; + return lop; + } + if(EnumSymbol == "HzPerHz") + { + rop = UnitSymbol::HzPerHz; + return lop; + } + if(EnumSymbol == "VPerV") + { + rop = UnitSymbol::VPerV; + return lop; + } + if(EnumSymbol == "APerA") + { + rop = UnitSymbol::APerA; + return lop; + } + if(EnumSymbol == "VPerVA") + { + rop = UnitSymbol::VPerVA; + return lop; + } + if(EnumSymbol == "rev") + { + rop = UnitSymbol::rev; + return lop; + } + if(EnumSymbol == "kat") + { + rop = UnitSymbol::kat; + return lop; + } + if(EnumSymbol == "JPerkg") + { + rop = UnitSymbol::JPerkg; + return lop; + } + if(EnumSymbol == "m3Uncompensated") + { + rop = UnitSymbol::m3Uncompensated; + return lop; + } + if(EnumSymbol == "m3Compensated") + { + rop = UnitSymbol::m3Compensated; + return lop; + } + if(EnumSymbol == "WPerW") + { + rop = UnitSymbol::WPerW; + return lop; + } + if(EnumSymbol == "therm") + { + rop = UnitSymbol::therm; + return lop; + } + if(EnumSymbol == "onePerm") + { + rop = UnitSymbol::onePerm; + return lop; + } + if(EnumSymbol == "m3Perkg") + { + rop = UnitSymbol::m3Perkg; + return lop; + } + if(EnumSymbol == "Pas") + { + rop = UnitSymbol::Pas; + return lop; + } + if(EnumSymbol == "Nm") + { + rop = UnitSymbol::Nm; + return lop; + } + if(EnumSymbol == "NPerm") + { + rop = UnitSymbol::NPerm; + return lop; + } + if(EnumSymbol == "radPers2") + { + rop = UnitSymbol::radPers2; + return lop; + } + if(EnumSymbol == "JPerm3") + { + rop = UnitSymbol::JPerm3; + return lop; + } + if(EnumSymbol == "VPerm") + { + rop = UnitSymbol::VPerm; + return lop; + } + if(EnumSymbol == "CPerm3") + { + rop = UnitSymbol::CPerm3; + return lop; + } + if(EnumSymbol == "CPerm2") + { + rop = UnitSymbol::CPerm2; + return lop; + } + if(EnumSymbol == "FPerm") + { + rop = UnitSymbol::FPerm; + return lop; + } + if(EnumSymbol == "HPerm") + { + rop = UnitSymbol::HPerm; + return lop; + } + if(EnumSymbol == "JPermol") + { + rop = UnitSymbol::JPermol; + return lop; + } + if(EnumSymbol == "JPermolK") + { + rop = UnitSymbol::JPermolK; + return lop; + } + if(EnumSymbol == "CPerkg") + { + rop = UnitSymbol::CPerkg; + return lop; + } + if(EnumSymbol == "GyPers") + { + rop = UnitSymbol::GyPers; + return lop; + } + if(EnumSymbol == "WPersr") + { + rop = UnitSymbol::WPersr; + return lop; + } + if(EnumSymbol == "WPerm2sr") + { + rop = UnitSymbol::WPerm2sr; + return lop; + } + if(EnumSymbol == "katPerm3") + { + rop = UnitSymbol::katPerm3; + return lop; + } + if(EnumSymbol == "d") + { + rop = UnitSymbol::d; + return lop; + } + if(EnumSymbol == "anglemin") + { + rop = UnitSymbol::anglemin; + return lop; + } + if(EnumSymbol == "anglesec") + { + rop = UnitSymbol::anglesec; + return lop; + } + if(EnumSymbol == "ha") + { + rop = UnitSymbol::ha; + return lop; + } + if(EnumSymbol == "tonne") + { + rop = UnitSymbol::tonne; + return lop; + } + if(EnumSymbol == "bar") + { + rop = UnitSymbol::bar; + return lop; + } + if(EnumSymbol == "mmHg") + { + rop = UnitSymbol::mmHg; + return lop; + } + if(EnumSymbol == "M") + { + rop = UnitSymbol::M; + return lop; + } + if(EnumSymbol == "kn") + { + rop = UnitSymbol::kn; + return lop; + } + if(EnumSymbol == "Mx") + { + rop = UnitSymbol::Mx; + return lop; + } + if(EnumSymbol == "G") + { + rop = UnitSymbol::G; + return lop; + } + if(EnumSymbol == "Oe") + { + rop = UnitSymbol::Oe; + return lop; + } + if(EnumSymbol == "Vh") + { + rop = UnitSymbol::Vh; + return lop; + } + if(EnumSymbol == "WPerA") + { + rop = UnitSymbol::WPerA; + return lop; + } + if(EnumSymbol == "onePerHz") + { + rop = UnitSymbol::onePerHz; + return lop; + } + if(EnumSymbol == "VPerVAr") + { + rop = UnitSymbol::VPerVAr; + return lop; + } + if(EnumSymbol == "ohmPerm") + { + rop = UnitSymbol::ohmPerm; + return lop; + } + if(EnumSymbol == "kgPerJ") + { + rop = UnitSymbol::kgPerJ; + return lop; + } + if(EnumSymbol == "JPers") + { + rop = UnitSymbol::JPers; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const UnitSymbol& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == UnitSymbol::none) + { + EnumSymbol = "none"; + } + if (obj.value == UnitSymbol::m) + { + EnumSymbol = "m"; + } + if (obj.value == UnitSymbol::kg) + { + EnumSymbol = "kg"; + } + if (obj.value == UnitSymbol::s) + { + EnumSymbol = "s"; + } + if (obj.value == UnitSymbol::A) + { + EnumSymbol = "A"; + } + if (obj.value == UnitSymbol::K) + { + EnumSymbol = "K"; + } + if (obj.value == UnitSymbol::mol) + { + EnumSymbol = "mol"; + } + if (obj.value == UnitSymbol::cd) + { + EnumSymbol = "cd"; + } + if (obj.value == UnitSymbol::deg) + { + EnumSymbol = "deg"; + } + if (obj.value == UnitSymbol::rad) + { + EnumSymbol = "rad"; + } + if (obj.value == UnitSymbol::sr) + { + EnumSymbol = "sr"; + } + if (obj.value == UnitSymbol::Gy) + { + EnumSymbol = "Gy"; + } + if (obj.value == UnitSymbol::Bq) + { + EnumSymbol = "Bq"; + } + if (obj.value == UnitSymbol::degC) + { + EnumSymbol = "degC"; + } + if (obj.value == UnitSymbol::Sv) + { + EnumSymbol = "Sv"; + } + if (obj.value == UnitSymbol::F) + { + EnumSymbol = "F"; + } + if (obj.value == UnitSymbol::C) + { + EnumSymbol = "C"; + } + if (obj.value == UnitSymbol::S) + { + EnumSymbol = "S"; + } + if (obj.value == UnitSymbol::H) + { + EnumSymbol = "H"; + } + if (obj.value == UnitSymbol::V) + { + EnumSymbol = "V"; + } + if (obj.value == UnitSymbol::ohm) + { + EnumSymbol = "ohm"; + } + if (obj.value == UnitSymbol::J) + { + EnumSymbol = "J"; + } + if (obj.value == UnitSymbol::N) + { + EnumSymbol = "N"; + } + if (obj.value == UnitSymbol::Hz) + { + EnumSymbol = "Hz"; + } + if (obj.value == UnitSymbol::lx) + { + EnumSymbol = "lx"; + } + if (obj.value == UnitSymbol::lm) + { + EnumSymbol = "lm"; + } + if (obj.value == UnitSymbol::Wb) + { + EnumSymbol = "Wb"; + } + if (obj.value == UnitSymbol::T) + { + EnumSymbol = "T"; + } + if (obj.value == UnitSymbol::W) + { + EnumSymbol = "W"; + } + if (obj.value == UnitSymbol::Pa) + { + EnumSymbol = "Pa"; + } + if (obj.value == UnitSymbol::m2) + { + EnumSymbol = "m2"; + } + if (obj.value == UnitSymbol::m3) + { + EnumSymbol = "m3"; + } + if (obj.value == UnitSymbol::mPers) + { + EnumSymbol = "mPers"; + } + if (obj.value == UnitSymbol::mPers2) + { + EnumSymbol = "mPers2"; + } + if (obj.value == UnitSymbol::m3Pers) + { + EnumSymbol = "m3Pers"; + } + if (obj.value == UnitSymbol::mPerm3) + { + EnumSymbol = "mPerm3"; + } + if (obj.value == UnitSymbol::kgm) + { + EnumSymbol = "kgm"; + } + if (obj.value == UnitSymbol::kgPerm3) + { + EnumSymbol = "kgPerm3"; + } + if (obj.value == UnitSymbol::m2Pers) + { + EnumSymbol = "m2Pers"; + } + if (obj.value == UnitSymbol::WPermK) + { + EnumSymbol = "WPermK"; + } + if (obj.value == UnitSymbol::JPerK) + { + EnumSymbol = "JPerK"; + } + if (obj.value == UnitSymbol::ppm) + { + EnumSymbol = "ppm"; + } + if (obj.value == UnitSymbol::rotPers) + { + EnumSymbol = "rotPers"; + } + if (obj.value == UnitSymbol::radPers) + { + EnumSymbol = "radPers"; + } + if (obj.value == UnitSymbol::WPerm2) + { + EnumSymbol = "WPerm2"; + } + if (obj.value == UnitSymbol::JPerm2) + { + EnumSymbol = "JPerm2"; + } + if (obj.value == UnitSymbol::SPerm) + { + EnumSymbol = "SPerm"; + } + if (obj.value == UnitSymbol::KPers) + { + EnumSymbol = "KPers"; + } + if (obj.value == UnitSymbol::PaPers) + { + EnumSymbol = "PaPers"; + } + if (obj.value == UnitSymbol::JPerkgK) + { + EnumSymbol = "JPerkgK"; + } + if (obj.value == UnitSymbol::VA) + { + EnumSymbol = "VA"; + } + if (obj.value == UnitSymbol::VAr) + { + EnumSymbol = "VAr"; + } + if (obj.value == UnitSymbol::cosPhi) + { + EnumSymbol = "cosPhi"; + } + if (obj.value == UnitSymbol::Vs) + { + EnumSymbol = "Vs"; + } + if (obj.value == UnitSymbol::V2) + { + EnumSymbol = "V2"; + } + if (obj.value == UnitSymbol::As) + { + EnumSymbol = "As"; + } + if (obj.value == UnitSymbol::A2) + { + EnumSymbol = "A2"; + } + if (obj.value == UnitSymbol::A2s) + { + EnumSymbol = "A2s"; + } + if (obj.value == UnitSymbol::VAh) + { + EnumSymbol = "VAh"; + } + if (obj.value == UnitSymbol::Wh) + { + EnumSymbol = "Wh"; + } + if (obj.value == UnitSymbol::VArh) + { + EnumSymbol = "VArh"; + } + if (obj.value == UnitSymbol::VPerHz) + { + EnumSymbol = "VPerHz"; + } + if (obj.value == UnitSymbol::HzPers) + { + EnumSymbol = "HzPers"; + } + if (obj.value == UnitSymbol::character) + { + EnumSymbol = "character"; + } + if (obj.value == UnitSymbol::charPers) + { + EnumSymbol = "charPers"; + } + if (obj.value == UnitSymbol::kgm2) + { + EnumSymbol = "kgm2"; + } + if (obj.value == UnitSymbol::dB) + { + EnumSymbol = "dB"; + } + if (obj.value == UnitSymbol::WPers) + { + EnumSymbol = "WPers"; + } + if (obj.value == UnitSymbol::lPers) + { + EnumSymbol = "lPers"; + } + if (obj.value == UnitSymbol::dBm) + { + EnumSymbol = "dBm"; + } + if (obj.value == UnitSymbol::h) + { + EnumSymbol = "h"; + } + if (obj.value == UnitSymbol::min) + { + EnumSymbol = "min"; + } + if (obj.value == UnitSymbol::Q) + { + EnumSymbol = "Q"; + } + if (obj.value == UnitSymbol::Qh) + { + EnumSymbol = "Qh"; + } + if (obj.value == UnitSymbol::ohmm) + { + EnumSymbol = "ohmm"; + } + if (obj.value == UnitSymbol::APerm) + { + EnumSymbol = "APerm"; + } + if (obj.value == UnitSymbol::V2h) + { + EnumSymbol = "V2h"; + } + if (obj.value == UnitSymbol::A2h) + { + EnumSymbol = "A2h"; + } + if (obj.value == UnitSymbol::Ah) + { + EnumSymbol = "Ah"; + } + if (obj.value == UnitSymbol::count) + { + EnumSymbol = "count"; + } + if (obj.value == UnitSymbol::ft3) + { + EnumSymbol = "ft3"; + } + if (obj.value == UnitSymbol::m3Perh) + { + EnumSymbol = "m3Perh"; + } + if (obj.value == UnitSymbol::gal) + { + EnumSymbol = "gal"; + } + if (obj.value == UnitSymbol::Btu) + { + EnumSymbol = "Btu"; + } + if (obj.value == UnitSymbol::l) + { + EnumSymbol = "l"; + } + if (obj.value == UnitSymbol::lPerh) + { + EnumSymbol = "lPerh"; + } + if (obj.value == UnitSymbol::lPerl) + { + EnumSymbol = "lPerl"; + } + if (obj.value == UnitSymbol::gPerg) + { + EnumSymbol = "gPerg"; + } + if (obj.value == UnitSymbol::molPerm3) + { + EnumSymbol = "molPerm3"; + } + if (obj.value == UnitSymbol::molPermol) + { + EnumSymbol = "molPermol"; + } + if (obj.value == UnitSymbol::molPerkg) + { + EnumSymbol = "molPerkg"; + } + if (obj.value == UnitSymbol::sPers) + { + EnumSymbol = "sPers"; + } + if (obj.value == UnitSymbol::HzPerHz) + { + EnumSymbol = "HzPerHz"; + } + if (obj.value == UnitSymbol::VPerV) + { + EnumSymbol = "VPerV"; + } + if (obj.value == UnitSymbol::APerA) + { + EnumSymbol = "APerA"; + } + if (obj.value == UnitSymbol::VPerVA) + { + EnumSymbol = "VPerVA"; + } + if (obj.value == UnitSymbol::rev) + { + EnumSymbol = "rev"; + } + if (obj.value == UnitSymbol::kat) + { + EnumSymbol = "kat"; + } + if (obj.value == UnitSymbol::JPerkg) + { + EnumSymbol = "JPerkg"; + } + if (obj.value == UnitSymbol::m3Uncompensated) + { + EnumSymbol = "m3Uncompensated"; + } + if (obj.value == UnitSymbol::m3Compensated) + { + EnumSymbol = "m3Compensated"; + } + if (obj.value == UnitSymbol::WPerW) + { + EnumSymbol = "WPerW"; + } + if (obj.value == UnitSymbol::therm) + { + EnumSymbol = "therm"; + } + if (obj.value == UnitSymbol::onePerm) + { + EnumSymbol = "onePerm"; + } + if (obj.value == UnitSymbol::m3Perkg) + { + EnumSymbol = "m3Perkg"; + } + if (obj.value == UnitSymbol::Pas) + { + EnumSymbol = "Pas"; + } + if (obj.value == UnitSymbol::Nm) + { + EnumSymbol = "Nm"; + } + if (obj.value == UnitSymbol::NPerm) + { + EnumSymbol = "NPerm"; + } + if (obj.value == UnitSymbol::radPers2) + { + EnumSymbol = "radPers2"; + } + if (obj.value == UnitSymbol::JPerm3) + { + EnumSymbol = "JPerm3"; + } + if (obj.value == UnitSymbol::VPerm) + { + EnumSymbol = "VPerm"; + } + if (obj.value == UnitSymbol::CPerm3) + { + EnumSymbol = "CPerm3"; + } + if (obj.value == UnitSymbol::CPerm2) + { + EnumSymbol = "CPerm2"; + } + if (obj.value == UnitSymbol::FPerm) + { + EnumSymbol = "FPerm"; + } + if (obj.value == UnitSymbol::HPerm) + { + EnumSymbol = "HPerm"; + } + if (obj.value == UnitSymbol::JPermol) + { + EnumSymbol = "JPermol"; + } + if (obj.value == UnitSymbol::JPermolK) + { + EnumSymbol = "JPermolK"; + } + if (obj.value == UnitSymbol::CPerkg) + { + EnumSymbol = "CPerkg"; + } + if (obj.value == UnitSymbol::GyPers) + { + EnumSymbol = "GyPers"; + } + if (obj.value == UnitSymbol::WPersr) + { + EnumSymbol = "WPersr"; + } + if (obj.value == UnitSymbol::WPerm2sr) + { + EnumSymbol = "WPerm2sr"; + } + if (obj.value == UnitSymbol::katPerm3) + { + EnumSymbol = "katPerm3"; + } + if (obj.value == UnitSymbol::d) + { + EnumSymbol = "d"; + } + if (obj.value == UnitSymbol::anglemin) + { + EnumSymbol = "anglemin"; + } + if (obj.value == UnitSymbol::anglesec) + { + EnumSymbol = "anglesec"; + } + if (obj.value == UnitSymbol::ha) + { + EnumSymbol = "ha"; + } + if (obj.value == UnitSymbol::tonne) + { + EnumSymbol = "tonne"; + } + if (obj.value == UnitSymbol::bar) + { + EnumSymbol = "bar"; + } + if (obj.value == UnitSymbol::mmHg) + { + EnumSymbol = "mmHg"; + } + if (obj.value == UnitSymbol::M) + { + EnumSymbol = "M"; + } + if (obj.value == UnitSymbol::kn) + { + EnumSymbol = "kn"; + } + if (obj.value == UnitSymbol::Mx) + { + EnumSymbol = "Mx"; + } + if (obj.value == UnitSymbol::G) + { + EnumSymbol = "G"; + } + if (obj.value == UnitSymbol::Oe) + { + EnumSymbol = "Oe"; + } + if (obj.value == UnitSymbol::Vh) + { + EnumSymbol = "Vh"; + } + if (obj.value == UnitSymbol::WPerA) + { + EnumSymbol = "WPerA"; + } + if (obj.value == UnitSymbol::onePerHz) + { + EnumSymbol = "onePerHz"; + } + if (obj.value == UnitSymbol::VPerVAr) + { + EnumSymbol = "VPerVAr"; + } + if (obj.value == UnitSymbol::ohmPerm) + { + EnumSymbol = "ohmPerm"; + } + if (obj.value == UnitSymbol::kgPerJ) + { + EnumSymbol = "kgPerJ"; + } + if (obj.value == UnitSymbol::JPers) + { + EnumSymbol = "JPers"; + } + + if (!EnumSymbol.empty()) + { + os << "UnitSymbol." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/UnitSymbol.hpp b/CGMES_3.0.0/UnitSymbol.hpp new file mode 100644 index 000000000..e4c8d145d --- /dev/null +++ b/CGMES_3.0.0/UnitSymbol.hpp @@ -0,0 +1,602 @@ +#ifndef UnitSymbol_H +#define UnitSymbol_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +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. + */ + class UnitSymbol + { + public: + enum UnitSymbol_ENUM + { + /** + * Dimension less quantity, e.g. count, per unit, etc. + */ + none, + /** + * Length in metres. + */ + m, + /** + * Mass in kilograms. Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. + */ + kg, + /** + * Time in seconds. + */ + s, + /** + * Current in amperes. + */ + A, + /** + * Temperature in kelvins. + */ + K, + /** + * Amount of substance in moles. + */ + mol, + /** + * Luminous intensity in candelas. + */ + cd, + /** + * Plane angle in degrees. + */ + deg, + /** + * Plane angle in radians (m/m). + */ + rad, + /** + * Solid angle in steradians (m2/m2). + */ + sr, + /** + * Absorbed dose in grays (J/kg). + */ + Gy, + /** + * 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. + */ + degC, + /** + * Dose equivalent in sieverts (J/kg). + */ + Sv, + /** + * Electric capacitance in farads (C/V). + */ + F, + /** + * Electric charge in coulombs (A·s). + */ + C, + /** + * Conductance in siemens. + */ + S, + /** + * Electric inductance in henrys (Wb/A). + */ + H, + /** + * Electric potential in volts (W/A). + */ + V, + /** + * Electric resistance in ohms (V/A). + */ + ohm, + /** + * Energy in joules (N·m = C·V = W·s). + */ + J, + /** + * Force in newtons (kg·m/s²). + */ + N, + /** + * Frequency in hertz (1/s). + */ + Hz, + /** + * Illuminance in lux (lm/m²). + */ + lx, + /** + * Luminous flux in lumens (cd·sr). + */ + lm, + /** + * Magnetic flux in webers (V·s). + */ + Wb, + /** + * 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. + */ + 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. + */ + Pa, + /** + * Area in square metres (m²). + */ + m2, + /** + * Volume in cubic metres (m³). + */ + m3, + /** + * Velocity in metres per second (m/s). + */ + mPers, + /** + * Acceleration in metres per second squared (m/s²). + */ + mPers2, + /** + * Volumetric flow rate in cubic metres per second (m³/s). + */ + m3Pers, + /** + * 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. + */ + kgm, + /** + * 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). + */ + m2Pers, + /** + * Thermal conductivity in watt/metres kelvin. + */ + WPermK, + /** + * Heat capacity in joules/kelvin. + */ + JPerK, + /** + * Concentration in parts per million. + */ + ppm, + /** + * Rotations per second (1/s). See also Hz (1/s). + */ + rotPers, + /** + * Angular velocity in radians per second (rad/s). + */ + radPers, + /** + * Heat flux density, irradiance, watts per square metre. + */ + WPerm2, + /** + * Insulation energy density, joules per square metre or watt second per square metre. + */ + JPerm2, + /** + * Conductance per length (F/m). + */ + SPerm, + /** + * Temperature change rate in kelvins per second. + */ + KPers, + /** + * Pressure change rate in pascals per second. + */ + PaPers, + /** + * Specific heat capacity, specific entropy, joules per kilogram Kelvin. + */ + JPerkgK, + /** + * 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. + */ + 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. + */ + cosPhi, + /** + * Volt seconds (Ws/A). + */ + Vs, + /** + * Volt squared (W²/A²). + */ + V2, + /** + * Ampere seconds (A·s). + */ + As, + /** + * Amperes squared (A²). + */ + A2, + /** + * Ampere squared time in square amperes (A²s). + */ + A2s, + /** + * Apparent energy in volt ampere hours. + */ + VAh, + /** + * Real energy in watt hours. + */ + Wh, + /** + * Reactive energy in volt ampere reactive hours. + */ + VArh, + /** + * Magnetic flux in volt per hertz. + */ + VPerHz, + /** + * Rate of change of frequency in hertz per second. + */ + HzPers, + /** + * Number of characters. + */ + character, + /** + * 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. + */ + kgm2, + /** + * 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. + */ + WPers, + /** + * 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. + */ + dBm, + /** + * Time in hours, hour = 60 min = 3600 s. + */ + h, + /** + * Time in minutes, minute = 60 s. + */ + min, + /** + * Quantity power, Q. + */ + Q, + /** + * Quantity energy, Qh. + */ + Qh, + /** + * Resistivity, ohm metres, (rho). + */ + ohmm, + /** + * A/m, magnetic field strength, amperes per metre. + */ + APerm, + /** + * Volt-squared hour, volt-squared-hours. + */ + V2h, + /** + * Ampere-squared hour, ampere-squared hour. + */ + A2h, + /** + * Ampere-hours, ampere-hours. + */ + Ah, + /** + * Amount of substance, Counter value. + */ + count, + /** + * Volume, cubic feet. + */ + ft3, + /** + * Volumetric flow rate, cubic metres per hour. + */ + m3Perh, + /** + * Volume in gallons, US gallon (1 gal = 231 in3 = 128 fl ounce). + */ + gal, + /** + * Energy, British Thermal Units. + */ + Btu, + /** + * Volume in litres, litre = dm3 = m3/1000. + */ + l, + /** + * 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'. + */ + 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'. + */ + gPerg, + /** + * 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. + */ + molPermol, + /** + * 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'. + */ + sPers, + /** + * 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'. + */ + VPerV, + /** + * 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. + */ + VPerVA, + /** + * Amount of rotation, revolutions. + */ + rev, + /** + * Catalytic activity, katal = mol / s. + */ + kat, + /** + * Specific energy, Joules / kg. + */ + JPerkg, + /** + * Volume, cubic metres, with the value uncompensated for weather effects. + */ + m3Uncompensated, + /** + * 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'. + */ + WPerW, + /** + * Energy, therms. + */ + therm, + /** + * Wavenumber, reciprocal metres, (1/m). + */ + onePerm, + /** + * Specific volume, cubic metres per kilogram, v. + */ + m3Perkg, + /** + * Dynamic viscosity, pascal seconds. + */ + Pas, + /** + * Moment of force, newton metres. + */ + Nm, + /** + * Surface tension, newton per metre. + */ + NPerm, + /** + * Angular acceleration, radians per second squared. + */ + radPers2, + /** + * Energy density, joules per cubic metre. + */ + JPerm3, + /** + * Electric field strength, volts per metre. + */ + VPerm, + /** + * Electric charge density, coulombs per cubic metre. + */ + CPerm3, + /** + * Surface charge density, coulombs per square metre. + */ + CPerm2, + /** + * Permittivity, farads per metre. + */ + FPerm, + /** + * Permeability, henrys per metre. + */ + HPerm, + /** + * Molar energy, joules per mole. + */ + JPermol, + /** + * Molar entropy, molar heat capacity, joules per mole kelvin. + */ + JPermolK, + /** + * Exposure (x rays), coulombs per kilogram. + */ + CPerkg, + /** + * Absorbed dose rate, grays per second. + */ + GyPers, + /** + * Radiant intensity, watts per steradian. + */ + WPersr, + /** + * Radiance, watts per square metre steradian. + */ + WPerm2sr, + /** + * Catalytic activity concentration, katals per cubic metre. + */ + katPerm3, + /** + * Time in days, day = 24 h = 86400 s. + */ + d, + /** + * Plane angle, minutes. + */ + anglemin, + /** + * Plane angle, seconds. + */ + anglesec, + /** + * Area, hectares. + */ + ha, + /** + * Mass in tons, "tonne" or "metric ton" (1000 kg = 1 Mg). + */ + tonne, + /** + * Pressure in bars, (1 bar = 100 kPa). + */ + bar, + /** + * Pressure, millimetres of mercury (1 mmHg is approximately 133.3 Pa). + */ + mmHg, + /** + * Length, nautical miles (1 M = 1852 m). + */ + M, + /** + * Speed, knots (1 kn = 1852/3600) m/s. + */ + kn, + /** + * Magnetic flux, maxwells (1 Mx = 10-8 Wb). + */ + Mx, + /** + * Magnetic flux density, gausses (1 G = 10-4 T). + */ + G, + /** + * Magnetic field in oersteds, (1 Oe = (103/4p) A/m). + */ + Oe, + /** + * Volt-hour, Volt hours. + */ + Vh, + /** + * Active power per current flow, watts per Ampere. + */ + WPerA, + /** + * 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. + */ + VPerVAr, + /** + * 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. + */ + kgPerJ, + /** + * Energy rate in joules per second (J/s). + */ + JPers, + }; + + UnitSymbol() : value(), initialized(false) {} + UnitSymbol(UnitSymbol_ENUM value) : value(value), initialized(true) {} + + UnitSymbol& operator=(UnitSymbol_ENUM rop); + operator UnitSymbol_ENUM() const; + + UnitSymbol_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, UnitSymbol& rop); + friend std::ostream& operator<<(std::ostream& os, const UnitSymbol& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/VAdjIEEE.cpp b/CGMES_3.0.0/VAdjIEEE.cpp new file mode 100644 index 000000000..508743157 --- /dev/null +++ b/CGMES_3.0.0/VAdjIEEE.cpp @@ -0,0 +1,143 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VAdjIEEE.hpp" + +#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() {}; + + +bool assign_VAdjIEEE_adjslew(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->adjslew; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_taoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->taoff; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_taon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->taon; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_vadjf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadjf; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_vadjmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadjmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VAdjIEEE_vadjmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->vadjmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + + + + +const char VAdjIEEE::debugName[] = "VAdjIEEE"; +const char* VAdjIEEE::debugString() const +{ + return VAdjIEEE::debugName; +} + +void VAdjIEEE::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VAdjIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner VAdjIEEE::declare() +{ + return BaseClassDefiner(VAdjIEEE::addConstructToMap, VAdjIEEE::addPrimitiveAssignFnsToMap, VAdjIEEE::addClassAssignFnsToMap, VAdjIEEE::debugName); +} + +namespace CIMPP +{ + BaseClass* VAdjIEEE_factory() + { + return new VAdjIEEE; + } +} diff --git a/CGMES_3.0.0/VAdjIEEE.hpp b/CGMES_3.0.0/VAdjIEEE.hpp new file mode 100644 index 000000000..c24315e1f --- /dev/null +++ b/CGMES_3.0.0/VAdjIEEE.hpp @@ -0,0 +1,48 @@ +#ifndef VAdjIEEE_H +#define VAdjIEEE_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageAdjusterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class VAdjIEEE : public VoltageAdjusterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VAdjIEEE_factory(); +} +#endif diff --git a/CGMES_3.0.0/VCompIEEEType1.cpp b/CGMES_3.0.0/VCompIEEEType1.cpp new file mode 100644 index 000000000..81a902412 --- /dev/null +++ b/CGMES_3.0.0/VCompIEEEType1.cpp @@ -0,0 +1,95 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VCompIEEEType1.hpp" + +#include +#include + +#include "PU.hpp" +#include "Seconds.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +VCompIEEEType1::VCompIEEEType1() {}; +VCompIEEEType1::~VCompIEEEType1() {}; + + +bool assign_VCompIEEEType1_rc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VCompIEEEType1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VCompIEEEType1_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + + +const char VCompIEEEType1::debugName[] = "VCompIEEEType1"; +const char* VCompIEEEType1::debugString() const +{ + return VCompIEEEType1::debugName; +} + +void VCompIEEEType1::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VCompIEEEType1::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner VCompIEEEType1::declare() +{ + return BaseClassDefiner(VCompIEEEType1::addConstructToMap, VCompIEEEType1::addPrimitiveAssignFnsToMap, VCompIEEEType1::addClassAssignFnsToMap, VCompIEEEType1::debugName); +} + +namespace CIMPP +{ + BaseClass* VCompIEEEType1_factory() + { + return new VCompIEEEType1; + } +} diff --git a/CGMES_3.0.0/VCompIEEEType1.hpp b/CGMES_3.0.0/VCompIEEEType1.hpp new file mode 100644 index 000000000..81ebc85de --- /dev/null +++ b/CGMES_3.0.0/VCompIEEEType1.hpp @@ -0,0 +1,44 @@ +#ifndef VCompIEEEType1_H +#define VCompIEEEType1_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class VCompIEEEType1 : public VoltageCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VCompIEEEType1_factory(); +} +#endif diff --git a/CGMES_3.0.0/VCompIEEEType2.cpp b/CGMES_3.0.0/VCompIEEEType2.cpp new file mode 100644 index 000000000..828250e60 --- /dev/null +++ b/CGMES_3.0.0/VCompIEEEType2.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VCompIEEEType2.hpp" + +#include +#include + +#include "GenICompensationForGenJ.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +VCompIEEEType2::VCompIEEEType2() {}; +VCompIEEEType2::~VCompIEEEType2() {}; + + + +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) +{ + VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + GenICompensationForGenJ* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GenICompensationForGenJ.begin(), element->GenICompensationForGenJ.end(), element2) == element->GenICompensationForGenJ.end()) + { + element->GenICompensationForGenJ.push_back(element2); + return assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VCompIEEEType2::debugName[] = "VCompIEEEType2"; +const char* VCompIEEEType2::debugString() const +{ + return VCompIEEEType2::debugName; +} + +void VCompIEEEType2::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VCompIEEEType2::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.GenICompensationForGenJ"), &assign_VCompIEEEType2_GenICompensationForGenJ)); +} + +const BaseClassDefiner VCompIEEEType2::declare() +{ + return BaseClassDefiner(VCompIEEEType2::addConstructToMap, VCompIEEEType2::addPrimitiveAssignFnsToMap, VCompIEEEType2::addClassAssignFnsToMap, VCompIEEEType2::debugName); +} + +namespace CIMPP +{ + BaseClass* VCompIEEEType2_factory() + { + return new VCompIEEEType2; + } +} diff --git a/CGMES_3.0.0/VCompIEEEType2.hpp b/CGMES_3.0.0/VCompIEEEType2.hpp new file mode 100644 index 000000000..811f18f75 --- /dev/null +++ b/CGMES_3.0.0/VCompIEEEType2.hpp @@ -0,0 +1,43 @@ +#ifndef VCompIEEEType2_H +#define VCompIEEEType2_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Seconds.hpp" + +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. + */ + class VCompIEEEType2 : public VoltageCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VCompIEEEType2_factory(); +} +#endif diff --git a/CGMES_3.0.0/VSCDynamics.cpp b/CGMES_3.0.0/VSCDynamics.cpp new file mode 100644 index 000000000..fbf01e807 --- /dev/null +++ b/CGMES_3.0.0/VSCDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VSCDynamics.hpp" + +#include +#include + +#include "VsConverter.hpp" + +using namespace CIMPP; + +VSCDynamics::VSCDynamics() : VsConverter(nullptr) {}; +VSCDynamics::~VSCDynamics() {}; + + + + +bool assign_VsConverter_VSCDynamics(BaseClass*, BaseClass*); +bool assign_VSCDynamics_VsConverter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VSCDynamics* element = dynamic_cast(BaseClass_ptr1); + VsConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VsConverter != element2) + { + element->VsConverter = element2; + return assign_VsConverter_VSCDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VSCDynamics::debugName[] = "VSCDynamics"; +const char* VSCDynamics::debugString() const +{ + return VSCDynamics::debugName; +} + +void VSCDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VSCDynamics"), &VSCDynamics_factory)); +} + +void VSCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VSCDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VSCDynamics.VsConverter"), &assign_VSCDynamics_VsConverter)); +} + +const BaseClassDefiner VSCDynamics::declare() +{ + return BaseClassDefiner(VSCDynamics::addConstructToMap, VSCDynamics::addPrimitiveAssignFnsToMap, VSCDynamics::addClassAssignFnsToMap, VSCDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* VSCDynamics_factory() + { + return new VSCDynamics; + } +} diff --git a/CGMES_3.0.0/VSCDynamics.hpp b/CGMES_3.0.0/VSCDynamics.hpp new file mode 100644 index 000000000..16baae123 --- /dev/null +++ b/CGMES_3.0.0/VSCDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef VSCDynamics_H +#define VSCDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "HVDCDynamics.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class VSCDynamics : public HVDCDynamics + { + public: + /* constructor initialising all attributes to null */ + VSCDynamics(); + ~VSCDynamics() override; + + CIMPP::VsConverter* VsConverter; /* Voltage source converter to which voltage source converter dynamics model applies. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VSCDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/VSCUserDefined.cpp b/CGMES_3.0.0/VSCUserDefined.cpp new file mode 100644 index 000000000..710eef3c6 --- /dev/null +++ b/CGMES_3.0.0/VSCUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VSCUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +VSCUserDefined::VSCUserDefined() {}; +VSCUserDefined::~VSCUserDefined() {}; + + + +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) +{ + VSCUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_VSCUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VSCUserDefined::debugName[] = "VSCUserDefined"; +const char* VSCUserDefined::debugString() const +{ + return VSCUserDefined::debugName; +} + +void VSCUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VSCUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VSCUserDefined.ProprietaryParameterDynamics"), &assign_VSCUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner VSCUserDefined::declare() +{ + return BaseClassDefiner(VSCUserDefined::addConstructToMap, VSCUserDefined::addPrimitiveAssignFnsToMap, VSCUserDefined::addClassAssignFnsToMap, VSCUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* VSCUserDefined_factory() + { + return new VSCUserDefined; + } +} diff --git a/CGMES_3.0.0/VSCUserDefined.hpp b/CGMES_3.0.0/VSCUserDefined.hpp new file mode 100644 index 000000000..b53bd1a32 --- /dev/null +++ b/CGMES_3.0.0/VSCUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef VSCUserDefined_H +#define VSCUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VSCDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Voltage source converter (VSC) function block whose dynamic behaviour is described by a user-defined model. + */ + class VSCUserDefined : public VSCDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VSCUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/Validity.cpp b/CGMES_3.0.0/Validity.cpp new file mode 100644 index 000000000..9796a2efa --- /dev/null +++ b/CGMES_3.0.0/Validity.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Validity.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Validity& Validity::operator=(Validity_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +Validity::operator Validity_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Validity::debugName[] = "Validity"; +const char* Validity::debugString() const +{ + return Validity::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Validity& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "Validity") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "GOOD") + { + rop = Validity::GOOD; + return lop; + } + if(EnumSymbol == "QUESTIONABLE") + { + rop = Validity::QUESTIONABLE; + return lop; + } + if(EnumSymbol == "INVALID") + { + rop = Validity::INVALID; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Validity& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == Validity::GOOD) + { + EnumSymbol = "GOOD"; + } + if (obj.value == Validity::QUESTIONABLE) + { + EnumSymbol = "QUESTIONABLE"; + } + if (obj.value == Validity::INVALID) + { + EnumSymbol = "INVALID"; + } + + if (!EnumSymbol.empty()) + { + os << "Validity." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/Validity.hpp b/CGMES_3.0.0/Validity.hpp new file mode 100644 index 000000000..fb4d8ce56 --- /dev/null +++ b/CGMES_3.0.0/Validity.hpp @@ -0,0 +1,50 @@ +#ifndef Validity_H +#define Validity_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + INVALID, + }; + + Validity() : value(), initialized(false) {} + Validity(Validity_ENUM value) : value(value), initialized(true) {} + + Validity& operator=(Validity_ENUM rop); + operator Validity_ENUM() const; + + Validity_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, Validity& rop); + friend std::ostream& operator<<(std::ostream& os, const Validity& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/ValueAliasSet.cpp b/CGMES_3.0.0/ValueAliasSet.cpp new file mode 100644 index 000000000..09cad7fd2 --- /dev/null +++ b/CGMES_3.0.0/ValueAliasSet.cpp @@ -0,0 +1,127 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ValueAliasSet.hpp" + +#include +#include + +#include "Command.hpp" +#include "Discrete.hpp" +#include "RaiseLowerCommand.hpp" +#include "ValueToAlias.hpp" + +using namespace CIMPP; + +ValueAliasSet::ValueAliasSet() {}; +ValueAliasSet::~ValueAliasSet() {}; + + + + + + + +bool assign_Command_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + Command* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Commands.begin(), element->Commands.end(), element2) == element->Commands.end()) + { + element->Commands.push_back(element2); + return assign_Command_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Discrete_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + Discrete* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Discretes.begin(), element->Discretes.end(), element2) == element->Discretes.end()) + { + element->Discretes.push_back(element2); + return assign_Discrete_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + RaiseLowerCommand* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RaiseLowerCommands.begin(), element->RaiseLowerCommands.end(), element2) == element->RaiseLowerCommands.end()) + { + element->RaiseLowerCommands.push_back(element2); + return assign_RaiseLowerCommand_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ValueToAlias_ValueAliasSet(BaseClass*, BaseClass*); +bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ValueAliasSet* element = dynamic_cast(BaseClass_ptr1); + ValueToAlias* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Values.begin(), element->Values.end(), element2) == element->Values.end()) + { + element->Values.push_back(element2); + return assign_ValueToAlias_ValueAliasSet(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char ValueAliasSet::debugName[] = "ValueAliasSet"; +const char* ValueAliasSet::debugString() const +{ + return ValueAliasSet::debugName; +} + +void ValueAliasSet::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:ValueAliasSet"), &ValueAliasSet_factory)); +} + +void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void ValueAliasSet::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner ValueAliasSet::declare() +{ + return BaseClassDefiner(ValueAliasSet::addConstructToMap, ValueAliasSet::addPrimitiveAssignFnsToMap, ValueAliasSet::addClassAssignFnsToMap, ValueAliasSet::debugName); +} + +namespace CIMPP +{ + BaseClass* ValueAliasSet_factory() + { + return new ValueAliasSet; + } +} diff --git a/CGMES_3.0.0/ValueAliasSet.hpp b/CGMES_3.0.0/ValueAliasSet.hpp new file mode 100644 index 000000000..00116d2e9 --- /dev/null +++ b/CGMES_3.0.0/ValueAliasSet.hpp @@ -0,0 +1,47 @@ +#ifndef ValueAliasSet_H +#define ValueAliasSet_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class Command; + class Discrete; + 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. + */ + class ValueAliasSet : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ValueAliasSet_factory(); +} +#endif diff --git a/CGMES_3.0.0/ValueToAlias.cpp b/CGMES_3.0.0/ValueToAlias.cpp new file mode 100644 index 000000000..6472d61b0 --- /dev/null +++ b/CGMES_3.0.0/ValueToAlias.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "ValueToAlias.hpp" + +#include +#include + +#include "ValueAliasSet.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {}; +ValueToAlias::~ValueToAlias() {}; + + + +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) +{ + ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + ValueAliasSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ValueAliasSet != element2) + { + element->ValueAliasSet = element2; + return assign_ValueAliasSet_Values(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char ValueToAlias::debugName[] = "ValueToAlias"; +const char* ValueToAlias::debugString() const +{ + return ValueToAlias::debugName; +} + +void ValueToAlias::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void ValueToAlias::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.ValueAliasSet"), &assign_ValueToAlias_ValueAliasSet)); +} + +const BaseClassDefiner ValueToAlias::declare() +{ + return BaseClassDefiner(ValueToAlias::addConstructToMap, ValueToAlias::addPrimitiveAssignFnsToMap, ValueToAlias::addClassAssignFnsToMap, ValueToAlias::debugName); +} + +namespace CIMPP +{ + BaseClass* ValueToAlias_factory() + { + return new ValueToAlias; + } +} diff --git a/CGMES_3.0.0/ValueToAlias.hpp b/CGMES_3.0.0/ValueToAlias.hpp new file mode 100644 index 000000000..9a0a16de5 --- /dev/null +++ b/CGMES_3.0.0/ValueToAlias.hpp @@ -0,0 +1,43 @@ +#ifndef ValueToAlias_H +#define ValueToAlias_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +namespace CIMPP +{ + class ValueAliasSet; + + /* + Describes the translation of one particular value into a name, e.g. 1 as "Open". + */ + class ValueToAlias : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + ValueToAlias(); + ~ValueToAlias() override; + + CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + CIMPP::Integer value; /* The value that is mapped. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* ValueToAlias_factory(); +} +#endif diff --git a/CGMES_3.0.0/VisibilityLayer.cpp b/CGMES_3.0.0/VisibilityLayer.cpp new file mode 100644 index 000000000..f08a78d66 --- /dev/null +++ b/CGMES_3.0.0/VisibilityLayer.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VisibilityLayer.hpp" + +#include +#include + +#include "DiagramObject.hpp" +#include "Integer.hpp" + +using namespace CIMPP; + +VisibilityLayer::VisibilityLayer() {}; +VisibilityLayer::~VisibilityLayer() {}; + + + +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) +{ + VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VisibleObjects.begin(), element->VisibleObjects.end(), element2) == element->VisibleObjects.end()) + { + element->VisibleObjects.push_back(element2); + return assign_DiagramObject_VisibilityLayers(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VisibilityLayer::debugName[] = "VisibilityLayer"; +const char* VisibilityLayer::debugString() const +{ + return VisibilityLayer::debugName; +} + +void VisibilityLayer::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VisibilityLayer::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.VisibleObjects"), &assign_VisibilityLayer_VisibleObjects)); +} + +const BaseClassDefiner VisibilityLayer::declare() +{ + return BaseClassDefiner(VisibilityLayer::addConstructToMap, VisibilityLayer::addPrimitiveAssignFnsToMap, VisibilityLayer::addClassAssignFnsToMap, VisibilityLayer::debugName); +} + +namespace CIMPP +{ + BaseClass* VisibilityLayer_factory() + { + return new VisibilityLayer; + } +} diff --git a/CGMES_3.0.0/VisibilityLayer.hpp b/CGMES_3.0.0/VisibilityLayer.hpp new file mode 100644 index 000000000..d8c5b22ea --- /dev/null +++ b/CGMES_3.0.0/VisibilityLayer.hpp @@ -0,0 +1,43 @@ +#ifndef VisibilityLayer_H +#define VisibilityLayer_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Integer.hpp" + +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. + */ + class VisibilityLayer : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VisibilityLayer_factory(); +} +#endif diff --git a/CGMES_3.0.0/Voltage.cpp b/CGMES_3.0.0/Voltage.cpp new file mode 100644 index 000000000..3f7992f4e --- /dev/null +++ b/CGMES_3.0.0/Voltage.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "Voltage.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +Voltage& Voltage::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +Voltage::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char Voltage::debugName[] = "Voltage"; +const char* Voltage::debugString() const +{ + return Voltage::debugName; +} + +Voltage& Voltage::operator+=(const Voltage& rhs) +{ + value += rhs.value; + return *this; +} + +Voltage& Voltage::operator-=(const Voltage& rhs) +{ + value -= rhs.value; + return *this; +} + +Voltage& Voltage::operator*=(const Voltage& rhs) +{ + value *= rhs.value; + return *this; +} + +Voltage& Voltage::operator/=(const Voltage& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, Voltage& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const Voltage& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/Voltage.hpp b/CGMES_3.0.0/Voltage.hpp new file mode 100644 index 000000000..12eb87179 --- /dev/null +++ b/CGMES_3.0.0/Voltage.hpp @@ -0,0 +1,39 @@ +#ifndef Voltage_H +#define Voltage_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Electrical voltage, can be both AC and DC. + */ + class Voltage + { + public: + Voltage() : value(0.0), initialized(false) {} + Voltage(long double value) : value(value), initialized(true) {} + + Voltage& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + Voltage& operator+=(const Voltage& rhs); + Voltage& operator-=(const Voltage& rhs); + Voltage& operator*=(const Voltage& rhs); + Voltage& operator/=(const Voltage& rhs); + + friend std::istream& operator>>(std::istream& lop, Voltage& rop); + friend std::ostream& operator<<(std::ostream& os, const Voltage& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/VoltageAdjusterDynamics.cpp b/CGMES_3.0.0/VoltageAdjusterDynamics.cpp new file mode 100644 index 000000000..fbd1e515e --- /dev/null +++ b/CGMES_3.0.0/VoltageAdjusterDynamics.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageAdjusterDynamics.hpp" + +#include +#include + +#include "PFVArControllerType1Dynamics.hpp" + +using namespace CIMPP; + +VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {}; +VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {}; + + + + +bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass*, BaseClass*); +bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1); + PFVArControllerType1Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PFVArControllerType1Dynamics != element2) + { + element->PFVArControllerType1Dynamics = element2; + return assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VoltageAdjusterDynamics::debugName[] = "VoltageAdjusterDynamics"; +const char* VoltageAdjusterDynamics::debugString() const +{ + return VoltageAdjusterDynamics::debugName; +} + +void VoltageAdjusterDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics"), &VoltageAdjusterDynamics_factory)); +} + +void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VoltageAdjusterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics"), &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics)); +} + +const BaseClassDefiner VoltageAdjusterDynamics::declare() +{ + return BaseClassDefiner(VoltageAdjusterDynamics::addConstructToMap, VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap, VoltageAdjusterDynamics::addClassAssignFnsToMap, VoltageAdjusterDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageAdjusterDynamics_factory() + { + return new VoltageAdjusterDynamics; + } +} diff --git a/CGMES_3.0.0/VoltageAdjusterDynamics.hpp b/CGMES_3.0.0/VoltageAdjusterDynamics.hpp new file mode 100644 index 000000000..0f7916229 --- /dev/null +++ b/CGMES_3.0.0/VoltageAdjusterDynamics.hpp @@ -0,0 +1,41 @@ +#ifndef VoltageAdjusterDynamics_H +#define VoltageAdjusterDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class VoltageAdjusterDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + VoltageAdjusterDynamics(); + ~VoltageAdjusterDynamics() override; + + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power factor or VAr controller type 1 model with which this voltage adjuster is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageAdjusterDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp b/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp new file mode 100644 index 000000000..b41599c4a --- /dev/null +++ b/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageAdjusterUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {}; +VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {}; + + + +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) +{ + VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VoltageAdjusterUserDefined::debugName[] = "VoltageAdjusterUserDefined"; +const char* VoltageAdjusterUserDefined::debugString() const +{ + return VoltageAdjusterUserDefined::debugName; +} + +void VoltageAdjusterUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VoltageAdjusterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics"), &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner VoltageAdjusterUserDefined::declare() +{ + return BaseClassDefiner(VoltageAdjusterUserDefined::addConstructToMap, VoltageAdjusterUserDefined::addPrimitiveAssignFnsToMap, VoltageAdjusterUserDefined::addClassAssignFnsToMap, VoltageAdjusterUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageAdjusterUserDefined_factory() + { + return new VoltageAdjusterUserDefined; + } +} diff --git a/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp b/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp new file mode 100644 index 000000000..9b3ed94a7 --- /dev/null +++ b/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef VoltageAdjusterUserDefined_H +#define VoltageAdjusterUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageAdjusterDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Voltage adjuster function block whose dynamic behaviour is described by a user-defined model. + */ + class VoltageAdjusterUserDefined : public VoltageAdjusterDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageAdjusterUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/VoltageCompensatorDynamics.cpp b/CGMES_3.0.0/VoltageCompensatorDynamics.cpp new file mode 100644 index 000000000..283d81921 --- /dev/null +++ b/CGMES_3.0.0/VoltageCompensatorDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageCompensatorDynamics.hpp" + +#include +#include + +#include "ExcitationSystemDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; +VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {}; + + + + + +bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass*, BaseClass*); +bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + ExcitationSystemDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ExcitationSystemDynamics != element2) + { + element->ExcitationSystemDynamics = element2; + return assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass*, BaseClass*); +bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VoltageCompensatorDynamics::debugName[] = "VoltageCompensatorDynamics"; +const char* VoltageCompensatorDynamics::debugString() const +{ + return VoltageCompensatorDynamics::debugName; +} + +void VoltageCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics"), &VoltageCompensatorDynamics_factory)); +} + +void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VoltageCompensatorDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner VoltageCompensatorDynamics::declare() +{ + return BaseClassDefiner(VoltageCompensatorDynamics::addConstructToMap, VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap, VoltageCompensatorDynamics::addClassAssignFnsToMap, VoltageCompensatorDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageCompensatorDynamics_factory() + { + return new VoltageCompensatorDynamics; + } +} diff --git a/CGMES_3.0.0/VoltageCompensatorDynamics.hpp b/CGMES_3.0.0/VoltageCompensatorDynamics.hpp new file mode 100644 index 000000000..42e07e811 --- /dev/null +++ b/CGMES_3.0.0/VoltageCompensatorDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef VoltageCompensatorDynamics_H +#define VoltageCompensatorDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class VoltageCompensatorDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageCompensatorDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp b/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp new file mode 100644 index 000000000..7c74de428 --- /dev/null +++ b/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageCompensatorUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {}; +VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {}; + + + +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) +{ + VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char VoltageCompensatorUserDefined::debugName[] = "VoltageCompensatorUserDefined"; +const char* VoltageCompensatorUserDefined::debugString() const +{ + return VoltageCompensatorUserDefined::debugName; +} + +void VoltageCompensatorUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VoltageCompensatorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics"), &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner VoltageCompensatorUserDefined::declare() +{ + return BaseClassDefiner(VoltageCompensatorUserDefined::addConstructToMap, VoltageCompensatorUserDefined::addPrimitiveAssignFnsToMap, VoltageCompensatorUserDefined::addClassAssignFnsToMap, VoltageCompensatorUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageCompensatorUserDefined_factory() + { + return new VoltageCompensatorUserDefined; + } +} diff --git a/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp b/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp new file mode 100644 index 000000000..7221ea8e1 --- /dev/null +++ b/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef VoltageCompensatorUserDefined_H +#define VoltageCompensatorUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "VoltageCompensatorDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Voltage compensator function block whose dynamic behaviour is described by a user-defined model. + */ + class VoltageCompensatorUserDefined : public VoltageCompensatorDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageCompensatorUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/VoltageLevel.cpp b/CGMES_3.0.0/VoltageLevel.cpp new file mode 100644 index 000000000..4fa8006ee --- /dev/null +++ b/CGMES_3.0.0/VoltageLevel.cpp @@ -0,0 +1,139 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageLevel.hpp" + +#include +#include + +#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() {}; + + + + + +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) +{ + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + BaseVoltage* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->BaseVoltage != element2) + { + element->BaseVoltage = element2; + return assign_BaseVoltage_VoltageLevel(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Bay_VoltageLevel(BaseClass*, BaseClass*); +bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + Bay* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->Bays.begin(), element->Bays.end(), element2) == element->Bays.end()) + { + element->Bays.push_back(element2); + return assign_Bay_VoltageLevel(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Substation_VoltageLevels(BaseClass*, BaseClass*); +bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + Substation* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Substation != element2) + { + element->Substation = element2; + return assign_Substation_VoltageLevels(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char VoltageLevel::debugName[] = "VoltageLevel"; +const char* VoltageLevel::debugString() const +{ + return VoltageLevel::debugName; +} + +void VoltageLevel::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner VoltageLevel::declare() +{ + return BaseClassDefiner(VoltageLevel::addConstructToMap, VoltageLevel::addPrimitiveAssignFnsToMap, VoltageLevel::addClassAssignFnsToMap, VoltageLevel::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageLevel_factory() + { + return new VoltageLevel; + } +} diff --git a/CGMES_3.0.0/VoltageLevel.hpp b/CGMES_3.0.0/VoltageLevel.hpp new file mode 100644 index 000000000..80b83867b --- /dev/null +++ b/CGMES_3.0.0/VoltageLevel.hpp @@ -0,0 +1,48 @@ +#ifndef VoltageLevel_H +#define VoltageLevel_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "EquipmentContainer.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +namespace CIMPP +{ + class BaseVoltage; + 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. + */ + class VoltageLevel : public EquipmentContainer + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageLevel_factory(); +} +#endif diff --git a/CGMES_3.0.0/VoltageLimit.cpp b/CGMES_3.0.0/VoltageLimit.cpp new file mode 100644 index 000000000..e42ec242f --- /dev/null +++ b/CGMES_3.0.0/VoltageLimit.cpp @@ -0,0 +1,79 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltageLimit.hpp" + +#include +#include + +#include "Voltage.hpp" +#include "Voltage.hpp" + +using namespace CIMPP; + +VoltageLimit::VoltageLimit() {}; +VoltageLimit::~VoltageLimit() {}; + + +bool assign_VoltageLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->normalValue; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VoltageLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->value; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + + + +const char VoltageLimit::debugName[] = "VoltageLimit"; +const char* VoltageLimit::debugString() const +{ + return VoltageLimit::debugName; +} + +void VoltageLimit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void VoltageLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner VoltageLimit::declare() +{ + return BaseClassDefiner(VoltageLimit::addConstructToMap, VoltageLimit::addPrimitiveAssignFnsToMap, VoltageLimit::addClassAssignFnsToMap, VoltageLimit::debugName); +} + +namespace CIMPP +{ + BaseClass* VoltageLimit_factory() + { + return new VoltageLimit; + } +} diff --git a/CGMES_3.0.0/VoltageLimit.hpp b/CGMES_3.0.0/VoltageLimit.hpp new file mode 100644 index 000000000..2fcc6e356 --- /dev/null +++ b/CGMES_3.0.0/VoltageLimit.hpp @@ -0,0 +1,42 @@ +#ifndef VoltageLimit_H +#define VoltageLimit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "OperationalLimit.hpp" +#include "BaseClassDefiner.hpp" +#include "Voltage.hpp" + +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. + */ + class VoltageLimit : public OperationalLimit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VoltageLimit_factory(); +} +#endif diff --git a/CGMES_3.0.0/VoltagePerReactivePower.cpp b/CGMES_3.0.0/VoltagePerReactivePower.cpp new file mode 100644 index 000000000..70718a915 --- /dev/null +++ b/CGMES_3.0.0/VoltagePerReactivePower.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VoltagePerReactivePower.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VoltagePerReactivePower& VoltagePerReactivePower::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +VoltagePerReactivePower::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VoltagePerReactivePower::debugName[] = "VoltagePerReactivePower"; +const char* VoltagePerReactivePower::debugString() const +{ + return VoltagePerReactivePower::debugName; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator+=(const VoltagePerReactivePower& rhs) +{ + value += rhs.value; + return *this; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator-=(const VoltagePerReactivePower& rhs) +{ + value -= rhs.value; + return *this; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator*=(const VoltagePerReactivePower& rhs) +{ + value *= rhs.value; + return *this; +} + +VoltagePerReactivePower& VoltagePerReactivePower::operator/=(const VoltagePerReactivePower& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VoltagePerReactivePower& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VoltagePerReactivePower& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/VoltagePerReactivePower.hpp b/CGMES_3.0.0/VoltagePerReactivePower.hpp new file mode 100644 index 000000000..51ef9b955 --- /dev/null +++ b/CGMES_3.0.0/VoltagePerReactivePower.hpp @@ -0,0 +1,39 @@ +#ifndef VoltagePerReactivePower_H +#define VoltagePerReactivePower_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Voltage variation with reactive power. + */ + class VoltagePerReactivePower + { + public: + VoltagePerReactivePower() : value(0.0), initialized(false) {} + VoltagePerReactivePower(long double value) : value(value), initialized(true) {} + + VoltagePerReactivePower& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + VoltagePerReactivePower& operator+=(const VoltagePerReactivePower& rhs); + VoltagePerReactivePower& operator-=(const VoltagePerReactivePower& rhs); + VoltagePerReactivePower& operator*=(const VoltagePerReactivePower& rhs); + VoltagePerReactivePower& operator/=(const VoltagePerReactivePower& rhs); + + friend std::istream& operator>>(std::istream& lop, VoltagePerReactivePower& rop); + friend std::ostream& operator<<(std::ostream& os, const VoltagePerReactivePower& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/VolumeFlowRate.cpp b/CGMES_3.0.0/VolumeFlowRate.cpp new file mode 100644 index 000000000..4ccbb5db3 --- /dev/null +++ b/CGMES_3.0.0/VolumeFlowRate.cpp @@ -0,0 +1,77 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VolumeFlowRate.hpp" + +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VolumeFlowRate& VolumeFlowRate::operator=(long double rop) +{ + value = rop; + initialized = true; + return *this; +} + +VolumeFlowRate::operator long double() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VolumeFlowRate::debugName[] = "VolumeFlowRate"; +const char* VolumeFlowRate::debugString() const +{ + return VolumeFlowRate::debugName; +} + +VolumeFlowRate& VolumeFlowRate::operator+=(const VolumeFlowRate& rhs) +{ + value += rhs.value; + return *this; +} + +VolumeFlowRate& VolumeFlowRate::operator-=(const VolumeFlowRate& rhs) +{ + value -= rhs.value; + return *this; +} + +VolumeFlowRate& VolumeFlowRate::operator*=(const VolumeFlowRate& rhs) +{ + value *= rhs.value; + return *this; +} + +VolumeFlowRate& VolumeFlowRate::operator/=(const VolumeFlowRate& rhs) +{ + value /= rhs.value; + return *this; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VolumeFlowRate& rop) + { + std::string tmp; + lop >> tmp; + rop.value = stold(tmp); + rop.initialized = true; + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VolumeFlowRate& obj) + { + if (obj.initialized) + { + os << obj.value; + } + return os; + } +} diff --git a/CGMES_3.0.0/VolumeFlowRate.hpp b/CGMES_3.0.0/VolumeFlowRate.hpp new file mode 100644 index 000000000..256cf7e18 --- /dev/null +++ b/CGMES_3.0.0/VolumeFlowRate.hpp @@ -0,0 +1,39 @@ +#ifndef VolumeFlowRate_H +#define VolumeFlowRate_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Volume per time. + */ + class VolumeFlowRate + { + public: + VolumeFlowRate() : value(0.0), initialized(false) {} + VolumeFlowRate(long double value) : value(value), initialized(true) {} + + VolumeFlowRate& operator=(long double rop); + operator long double() const; + + long double value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + VolumeFlowRate& operator+=(const VolumeFlowRate& rhs); + VolumeFlowRate& operator-=(const VolumeFlowRate& rhs); + VolumeFlowRate& operator*=(const VolumeFlowRate& rhs); + VolumeFlowRate& operator/=(const VolumeFlowRate& rhs); + + friend std::istream& operator>>(std::istream& lop, VolumeFlowRate& rop); + friend std::ostream& operator<<(std::ostream& os, const VolumeFlowRate& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/VsCapabilityCurve.cpp b/CGMES_3.0.0/VsCapabilityCurve.cpp new file mode 100644 index 000000000..ada4fd1b3 --- /dev/null +++ b/CGMES_3.0.0/VsCapabilityCurve.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsCapabilityCurve.hpp" + +#include +#include + +#include "VsConverter.hpp" + +using namespace CIMPP; + +VsCapabilityCurve::VsCapabilityCurve() {}; +VsCapabilityCurve::~VsCapabilityCurve() {}; + + + + +bool assign_VsConverter_CapabilityCurve(BaseClass*, BaseClass*); +bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VsCapabilityCurve* element = dynamic_cast(BaseClass_ptr1); + VsConverter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->VsConverterDCSides.begin(), element->VsConverterDCSides.end(), element2) == element->VsConverterDCSides.end()) + { + element->VsConverterDCSides.push_back(element2); + return assign_VsConverter_CapabilityCurve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char VsCapabilityCurve::debugName[] = "VsCapabilityCurve"; +const char* VsCapabilityCurve::debugString() const +{ + return VsCapabilityCurve::debugName; +} + +void VsCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve"), &VsCapabilityCurve_factory)); +} + +void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void VsCapabilityCurve::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve.VsConverterDCSides"), &assign_VsCapabilityCurve_VsConverterDCSides)); +} + +const BaseClassDefiner VsCapabilityCurve::declare() +{ + return BaseClassDefiner(VsCapabilityCurve::addConstructToMap, VsCapabilityCurve::addPrimitiveAssignFnsToMap, VsCapabilityCurve::addClassAssignFnsToMap, VsCapabilityCurve::debugName); +} + +namespace CIMPP +{ + BaseClass* VsCapabilityCurve_factory() + { + return new VsCapabilityCurve; + } +} diff --git a/CGMES_3.0.0/VsCapabilityCurve.hpp b/CGMES_3.0.0/VsCapabilityCurve.hpp new file mode 100644 index 000000000..76e8b8f35 --- /dev/null +++ b/CGMES_3.0.0/VsCapabilityCurve.hpp @@ -0,0 +1,41 @@ +#ifndef VsCapabilityCurve_H +#define VsCapabilityCurve_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Curve.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class VsCapabilityCurve : public Curve + { + public: + /* constructor initialising all attributes to null */ + VsCapabilityCurve(); + ~VsCapabilityCurve() override; + + std::list VsConverterDCSides; /* All converters with this capability curve. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VsCapabilityCurve_factory(); +} +#endif diff --git a/CGMES_3.0.0/VsConverter.cpp b/CGMES_3.0.0/VsConverter.cpp new file mode 100644 index 000000000..b8cbc0b6e --- /dev/null +++ b/CGMES_3.0.0/VsConverter.cpp @@ -0,0 +1,295 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsConverter.hpp" + +#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" + +using namespace CIMPP; + +VsConverter::VsConverter() : CapabilityCurve(nullptr), VSCDynamics(nullptr) {}; +VsConverter::~VsConverter() {}; + + + + +bool assign_VsConverter_delta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->delta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_droop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->droop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_droopCompensation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->droopCompensation; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_maxModulationIndex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->maxModulationIndex; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pPccControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_qPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qPccControl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_qShare(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qShare; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetPWMfactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetPWMfactor; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetPhasePcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetPhasePcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetPowerFactorPcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetPowerFactorPcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetQpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->targetQpcc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_VsConverter_targetUpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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_VSCDynamics_VsConverter(BaseClass*, BaseClass*); +bool assign_VsConverter_VSCDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + 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; +} + + + + + + + + + + + + + + +const char VsConverter::debugName[] = "VsConverter"; +const char* VsConverter::debugString() const +{ + return VsConverter::debugName; +} + +void VsConverter::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner VsConverter::declare() +{ + return BaseClassDefiner(VsConverter::addConstructToMap, VsConverter::addPrimitiveAssignFnsToMap, VsConverter::addClassAssignFnsToMap, VsConverter::debugName); +} + +namespace CIMPP +{ + BaseClass* VsConverter_factory() + { + return new VsConverter; + } +} diff --git a/CGMES_3.0.0/VsConverter.hpp b/CGMES_3.0.0/VsConverter.hpp new file mode 100644 index 000000000..c6dc6e7dc --- /dev/null +++ b/CGMES_3.0.0/VsConverter.hpp @@ -0,0 +1,65 @@ +#ifndef VsConverter_H +#define VsConverter_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "ACDCConverter.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "PerCent.hpp" +#include "ReactivePower.hpp" +#include "Resistance.hpp" +#include "Voltage.hpp" +#include "VsPpccControlKind.hpp" +#include "VsQpccControlKind.hpp" + +namespace CIMPP +{ + class VSCDynamics; + class VsCapabilityCurve; + + /* + DC side of the voltage source converter (VSC). + */ + class VsConverter : public ACDCConverter + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* VsConverter_factory(); +} +#endif diff --git a/CGMES_3.0.0/VsPpccControlKind.cpp b/CGMES_3.0.0/VsPpccControlKind.cpp new file mode 100644 index 000000000..9201e6ef9 --- /dev/null +++ b/CGMES_3.0.0/VsPpccControlKind.cpp @@ -0,0 +1,126 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsPpccControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VsPpccControlKind& VsPpccControlKind::operator=(VsPpccControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +VsPpccControlKind::operator VsPpccControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VsPpccControlKind::debugName[] = "VsPpccControlKind"; +const char* VsPpccControlKind::debugString() const +{ + return VsPpccControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VsPpccControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "VsPpccControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "pPcc") + { + rop = VsPpccControlKind::pPcc; + return lop; + } + if(EnumSymbol == "udc") + { + rop = VsPpccControlKind::udc; + return lop; + } + if(EnumSymbol == "pPccAndUdcDroop") + { + rop = VsPpccControlKind::pPccAndUdcDroop; + return lop; + } + if(EnumSymbol == "pPccAndUdcDroopWithCompensation") + { + rop = VsPpccControlKind::pPccAndUdcDroopWithCompensation; + return lop; + } + if(EnumSymbol == "pPccAndUdcDroopPilot") + { + rop = VsPpccControlKind::pPccAndUdcDroopPilot; + return lop; + } + if(EnumSymbol == "phasePcc") + { + rop = VsPpccControlKind::phasePcc; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VsPpccControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == VsPpccControlKind::pPcc) + { + EnumSymbol = "pPcc"; + } + if (obj.value == VsPpccControlKind::udc) + { + EnumSymbol = "udc"; + } + if (obj.value == VsPpccControlKind::pPccAndUdcDroop) + { + EnumSymbol = "pPccAndUdcDroop"; + } + if (obj.value == VsPpccControlKind::pPccAndUdcDroopWithCompensation) + { + EnumSymbol = "pPccAndUdcDroopWithCompensation"; + } + if (obj.value == VsPpccControlKind::pPccAndUdcDroopPilot) + { + EnumSymbol = "pPccAndUdcDroopPilot"; + } + if (obj.value == VsPpccControlKind::phasePcc) + { + EnumSymbol = "phasePcc"; + } + + if (!EnumSymbol.empty()) + { + os << "VsPpccControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/VsPpccControlKind.hpp b/CGMES_3.0.0/VsPpccControlKind.hpp new file mode 100644 index 000000000..68d6714ac --- /dev/null +++ b/CGMES_3.0.0/VsPpccControlKind.hpp @@ -0,0 +1,62 @@ +#ifndef VsPpccControlKind_H +#define VsPpccControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + pPcc, + /** + * 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. + */ + 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. + */ + 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. + */ + pPccAndUdcDroopPilot, + /** + * Control is phase at point of common coupling. Target is provided by VsConverter.targetPhasePcc. + */ + phasePcc, + }; + + VsPpccControlKind() : value(), initialized(false) {} + VsPpccControlKind(VsPpccControlKind_ENUM value) : value(value), initialized(true) {} + + VsPpccControlKind& operator=(VsPpccControlKind_ENUM rop); + operator VsPpccControlKind_ENUM() const; + + VsPpccControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, VsPpccControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const VsPpccControlKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/VsQpccControlKind.cpp b/CGMES_3.0.0/VsQpccControlKind.cpp new file mode 100644 index 000000000..8410d2bc8 --- /dev/null +++ b/CGMES_3.0.0/VsQpccControlKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "VsQpccControlKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +VsQpccControlKind& VsQpccControlKind::operator=(VsQpccControlKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +VsQpccControlKind::operator VsQpccControlKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char VsQpccControlKind::debugName[] = "VsQpccControlKind"; +const char* VsQpccControlKind::debugString() const +{ + return VsQpccControlKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, VsQpccControlKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "VsQpccControlKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "reactivePcc") + { + rop = VsQpccControlKind::reactivePcc; + return lop; + } + if(EnumSymbol == "voltagePcc") + { + rop = VsQpccControlKind::voltagePcc; + return lop; + } + if(EnumSymbol == "powerFactorPcc") + { + rop = VsQpccControlKind::powerFactorPcc; + return lop; + } + if(EnumSymbol == "pulseWidthModulation") + { + rop = VsQpccControlKind::pulseWidthModulation; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const VsQpccControlKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == VsQpccControlKind::reactivePcc) + { + EnumSymbol = "reactivePcc"; + } + if (obj.value == VsQpccControlKind::voltagePcc) + { + EnumSymbol = "voltagePcc"; + } + if (obj.value == VsQpccControlKind::powerFactorPcc) + { + EnumSymbol = "powerFactorPcc"; + } + if (obj.value == VsQpccControlKind::pulseWidthModulation) + { + EnumSymbol = "pulseWidthModulation"; + } + + if (!EnumSymbol.empty()) + { + os << "VsQpccControlKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/VsQpccControlKind.hpp b/CGMES_3.0.0/VsQpccControlKind.hpp new file mode 100644 index 000000000..01d27303d --- /dev/null +++ b/CGMES_3.0.0/VsQpccControlKind.hpp @@ -0,0 +1,54 @@ +#ifndef VsQpccControlKind_H +#define VsQpccControlKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + reactivePcc, + /** + * 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. + */ + powerFactorPcc, + /** + * No explicit control. Pulse-modulation factor is directly set in magnitude (VsConverter.targetPWMfactor) and phase (VsConverter.targetPhasePcc). + */ + pulseWidthModulation, + }; + + VsQpccControlKind() : value(), initialized(false) {} + VsQpccControlKind(VsQpccControlKind_ENUM value) : value(value), initialized(true) {} + + VsQpccControlKind& operator=(VsQpccControlKind_ENUM rop); + operator VsQpccControlKind_ENUM() const; + + VsQpccControlKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, VsQpccControlKind& rop); + friend std::ostream& operator<<(std::ostream& os, const VsQpccControlKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WaveTrap.cpp b/CGMES_3.0.0/WaveTrap.cpp new file mode 100644 index 000000000..d198c17d2 --- /dev/null +++ b/CGMES_3.0.0/WaveTrap.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WaveTrap.hpp" + +#include +#include + + +using namespace CIMPP; + +WaveTrap::WaveTrap() {}; +WaveTrap::~WaveTrap() {}; + + + +const char WaveTrap::debugName[] = "WaveTrap"; +const char* WaveTrap::debugString() const +{ + return WaveTrap::debugName; +} + +void WaveTrap::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WaveTrap"), &WaveTrap_factory)); +} + +void WaveTrap::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WaveTrap::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner WaveTrap::declare() +{ + return BaseClassDefiner(WaveTrap::addConstructToMap, WaveTrap::addPrimitiveAssignFnsToMap, WaveTrap::addClassAssignFnsToMap, WaveTrap::debugName); +} + +namespace CIMPP +{ + BaseClass* WaveTrap_factory() + { + return new WaveTrap; + } +} diff --git a/CGMES_3.0.0/WaveTrap.hpp b/CGMES_3.0.0/WaveTrap.hpp new file mode 100644 index 000000000..68f1dc9cf --- /dev/null +++ b/CGMES_3.0.0/WaveTrap.hpp @@ -0,0 +1,39 @@ +#ifndef WaveTrap_H +#define WaveTrap_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "AuxiliaryEquipment.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + 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: + /* constructor initialising all attributes to null */ + WaveTrap(); + ~WaveTrap() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WaveTrap_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindAeroConstIEC.cpp b/CGMES_3.0.0/WindAeroConstIEC.cpp new file mode 100644 index 000000000..7915b18f3 --- /dev/null +++ b/CGMES_3.0.0/WindAeroConstIEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindAeroConstIEC.hpp" + +#include +#include + +#include "WindGenTurbineType1aIEC.hpp" + +using namespace CIMPP; + +WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1aIEC(nullptr) {}; +WindAeroConstIEC::~WindAeroConstIEC() {}; + + + + +bool assign_WindGenTurbineType1aIEC_WindAeroConstIEC(BaseClass*, BaseClass*); +bool assign_WindAeroConstIEC_WindGenTurbineType1aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindAeroConstIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType1aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType1aIEC != element2) + { + element->WindGenTurbineType1aIEC = element2; + return assign_WindGenTurbineType1aIEC_WindAeroConstIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindAeroConstIEC::debugName[] = "WindAeroConstIEC"; +const char* WindAeroConstIEC::debugString() const +{ + return WindAeroConstIEC::debugName; +} + +void WindAeroConstIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC"), &WindAeroConstIEC_factory)); +} + +void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindAeroConstIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC.WindGenTurbineType1aIEC"), &assign_WindAeroConstIEC_WindGenTurbineType1aIEC)); +} + +const BaseClassDefiner WindAeroConstIEC::declare() +{ + return BaseClassDefiner(WindAeroConstIEC::addConstructToMap, WindAeroConstIEC::addPrimitiveAssignFnsToMap, WindAeroConstIEC::addClassAssignFnsToMap, WindAeroConstIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindAeroConstIEC_factory() + { + return new WindAeroConstIEC; + } +} diff --git a/CGMES_3.0.0/WindAeroConstIEC.hpp b/CGMES_3.0.0/WindAeroConstIEC.hpp new file mode 100644 index 000000000..28a26e8db --- /dev/null +++ b/CGMES_3.0.0/WindAeroConstIEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindAeroConstIEC_H +#define WindAeroConstIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindAeroConstIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + WindAeroConstIEC(); + ~WindAeroConstIEC() override; + + CIMPP::WindGenTurbineType1aIEC* WindGenTurbineType1aIEC; /* Wind turbine type 1A model with which this wind aerodynamic model is associated. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindAeroConstIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindAeroOneDimIEC.cpp b/CGMES_3.0.0/WindAeroOneDimIEC.cpp new file mode 100644 index 000000000..8a490aab3 --- /dev/null +++ b/CGMES_3.0.0/WindAeroOneDimIEC.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindAeroOneDimIEC.hpp" + +#include +#include + +#include "WindTurbineType3IEC.hpp" +#include "Float.hpp" +#include "AngleDegrees.hpp" + +using namespace CIMPP; + +WindAeroOneDimIEC::WindAeroOneDimIEC() : WindTurbineType3IEC(nullptr) {}; +WindAeroOneDimIEC::~WindAeroOneDimIEC() {}; + + + +bool assign_WindAeroOneDimIEC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->ka; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroOneDimIEC_thetaomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetaomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass*, BaseClass*); +bool assign_WindAeroOneDimIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindAeroOneDimIEC* 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_WindAeroOneDimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char WindAeroOneDimIEC::debugName[] = "WindAeroOneDimIEC"; +const char* WindAeroOneDimIEC::debugString() const +{ + return WindAeroOneDimIEC::debugName; +} + +void WindAeroOneDimIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindAeroOneDimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindAeroOneDimIEC.WindTurbineType3IEC"), &assign_WindAeroOneDimIEC_WindTurbineType3IEC)); +} + +const BaseClassDefiner WindAeroOneDimIEC::declare() +{ + return BaseClassDefiner(WindAeroOneDimIEC::addConstructToMap, WindAeroOneDimIEC::addPrimitiveAssignFnsToMap, WindAeroOneDimIEC::addClassAssignFnsToMap, WindAeroOneDimIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindAeroOneDimIEC_factory() + { + return new WindAeroOneDimIEC; + } +} diff --git a/CGMES_3.0.0/WindAeroOneDimIEC.hpp b/CGMES_3.0.0/WindAeroOneDimIEC.hpp new file mode 100644 index 000000000..537fa21b6 --- /dev/null +++ b/CGMES_3.0.0/WindAeroOneDimIEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindAeroOneDimIEC_H +#define WindAeroOneDimIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Float.hpp" + +namespace CIMPP +{ + class WindTurbineType3IEC; + + /* + One-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.2. + */ + class WindAeroOneDimIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindAeroOneDimIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindAeroTwoDimIEC.cpp b/CGMES_3.0.0/WindAeroTwoDimIEC.cpp new file mode 100644 index 000000000..1c857b71b --- /dev/null +++ b/CGMES_3.0.0/WindAeroTwoDimIEC.cpp @@ -0,0 +1,179 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindAeroTwoDimIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindAeroTwoDimIEC_dpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroTwoDimIEC_dptheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dptheta; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroTwoDimIEC_dpv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpv1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroTwoDimIEC_omegazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegazero; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroTwoDimIEC_pavail(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pavail; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindAeroTwoDimIEC_thetav2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + +const char WindAeroTwoDimIEC::debugName[] = "WindAeroTwoDimIEC"; +const char* WindAeroTwoDimIEC::debugString() const +{ + return WindAeroTwoDimIEC::debugName; +} + +void WindAeroTwoDimIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindAeroTwoDimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.WindTurbineType3IEC"), &assign_WindAeroTwoDimIEC_WindTurbineType3IEC)); +} + +const BaseClassDefiner WindAeroTwoDimIEC::declare() +{ + return BaseClassDefiner(WindAeroTwoDimIEC::addConstructToMap, WindAeroTwoDimIEC::addPrimitiveAssignFnsToMap, WindAeroTwoDimIEC::addClassAssignFnsToMap, WindAeroTwoDimIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindAeroTwoDimIEC_factory() + { + return new WindAeroTwoDimIEC; + } +} diff --git a/CGMES_3.0.0/WindAeroTwoDimIEC.hpp b/CGMES_3.0.0/WindAeroTwoDimIEC.hpp new file mode 100644 index 000000000..cf488c589 --- /dev/null +++ b/CGMES_3.0.0/WindAeroTwoDimIEC.hpp @@ -0,0 +1,50 @@ +#ifndef WindAeroTwoDimIEC_H +#define WindAeroTwoDimIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "PU.hpp" + +namespace CIMPP +{ + class WindTurbineType3IEC; + + /* + Two-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.3. + */ + class WindAeroTwoDimIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindAeroTwoDimIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContCurrLimIEC.cpp b/CGMES_3.0.0/WindContCurrLimIEC.cpp new file mode 100644 index 000000000..e8bc2b0d0 --- /dev/null +++ b/CGMES_3.0.0/WindContCurrLimIEC.cpp @@ -0,0 +1,199 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContCurrLimIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindContCurrLimIEC_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_imaxdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->imaxdip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_kpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpqu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_mdfslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mdfslim; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_mqpri(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mqpri; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_tufiltcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufiltcl; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_upqumax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upqumax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContCurrLimIEC* 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_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContCurrLimIEC* 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_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + +const char WindContCurrLimIEC::debugName[] = "WindContCurrLimIEC"; +const char* WindContCurrLimIEC::debugString() const +{ + return WindContCurrLimIEC::debugName; +} + +void WindContCurrLimIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContCurrLimIEC::declare() +{ + return BaseClassDefiner(WindContCurrLimIEC::addConstructToMap, WindContCurrLimIEC::addPrimitiveAssignFnsToMap, WindContCurrLimIEC::addClassAssignFnsToMap, WindContCurrLimIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContCurrLimIEC_factory() + { + return new WindContCurrLimIEC; + } +} diff --git a/CGMES_3.0.0/WindContCurrLimIEC.hpp b/CGMES_3.0.0/WindContCurrLimIEC.hpp new file mode 100644 index 000000000..52e5a162d --- /dev/null +++ b/CGMES_3.0.0/WindContCurrLimIEC.hpp @@ -0,0 +1,53 @@ +#ifndef WindContCurrLimIEC_H +#define WindContCurrLimIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +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. + */ + class WindContCurrLimIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContCurrLimIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContPType3IEC.cpp b/CGMES_3.0.0/WindContPType3IEC.cpp new file mode 100644 index 000000000..60fb12197 --- /dev/null +++ b/CGMES_3.0.0/WindContPType3IEC.cpp @@ -0,0 +1,455 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPType3IEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindContPType3IEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dprefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dprefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dthetamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dthetamaxuvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dthetamaxuvrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_kdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdtd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_mpuvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mpuvrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_omegadtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegadtd; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_omegaoffset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->omegaoffset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_pdtdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pdtdmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tdvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tdvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_thetaemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetaemin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_thetauscale(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetauscale; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tomegafiltp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomegafiltp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tomegaref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomegaref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tpfiltp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfiltp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpord; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_tufiltp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufiltp3; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_udvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udvs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_updip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->updip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType3IEC_zeta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->zeta; + if (buffer.fail()) + return false; + else + 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; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char WindContPType3IEC::debugName[] = "WindContPType3IEC"; +const char* WindContPType3IEC::debugString() const +{ + return WindContPType3IEC::debugName; +} + +void WindContPType3IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContPType3IEC::declare() +{ + return BaseClassDefiner(WindContPType3IEC::addConstructToMap, WindContPType3IEC::addPrimitiveAssignFnsToMap, WindContPType3IEC::addClassAssignFnsToMap, WindContPType3IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPType3IEC_factory() + { + return new WindContPType3IEC; + } +} diff --git a/CGMES_3.0.0/WindContPType3IEC.hpp b/CGMES_3.0.0/WindContPType3IEC.hpp new file mode 100644 index 000000000..178eab146 --- /dev/null +++ b/CGMES_3.0.0/WindContPType3IEC.hpp @@ -0,0 +1,70 @@ +#ifndef WindContPType3IEC_H +#define WindContPType3IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindTurbineType3IEC; + + /* + P control model type 3. Reference: IEC 61400-27-1:2015, 5.6.5.4. + */ + class WindContPType3IEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPType3IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContPType4aIEC.cpp b/CGMES_3.0.0/WindContPType4aIEC.cpp new file mode 100644 index 000000000..d165c953b --- /dev/null +++ b/CGMES_3.0.0/WindContPType4aIEC.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPType4aIEC.hpp" + +#include +#include + +#include "WindTurbineType4aIEC.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {}; +WindContPType4aIEC::~WindContPType4aIEC() {}; + + + +bool assign_WindContPType4aIEC_dpmaxp4a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmaxp4a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4aIEC_tpordp4a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpordp4a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4aIEC_tufiltp4a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufiltp4a; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char WindContPType4aIEC::debugName[] = "WindContPType4aIEC"; +const char* WindContPType4aIEC::debugString() const +{ + return WindContPType4aIEC::debugName; +} + +void WindContPType4aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContPType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.WindTurbineType4aIEC"), &assign_WindContPType4aIEC_WindTurbineType4aIEC)); +} + +const BaseClassDefiner WindContPType4aIEC::declare() +{ + return BaseClassDefiner(WindContPType4aIEC::addConstructToMap, WindContPType4aIEC::addPrimitiveAssignFnsToMap, WindContPType4aIEC::addClassAssignFnsToMap, WindContPType4aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPType4aIEC_factory() + { + return new WindContPType4aIEC; + } +} diff --git a/CGMES_3.0.0/WindContPType4aIEC.hpp b/CGMES_3.0.0/WindContPType4aIEC.hpp new file mode 100644 index 000000000..eb4addb28 --- /dev/null +++ b/CGMES_3.0.0/WindContPType4aIEC.hpp @@ -0,0 +1,46 @@ +#ifndef WindContPType4aIEC_H +#define WindContPType4aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType4aIEC; + + /* + P control model type 4A. Reference: IEC 61400-27-1:2015, 5.6.5.5. + */ + class WindContPType4aIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPType4aIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContPType4bIEC.cpp b/CGMES_3.0.0/WindContPType4bIEC.cpp new file mode 100644 index 000000000..3d732b4ea --- /dev/null +++ b/CGMES_3.0.0/WindContPType4bIEC.cpp @@ -0,0 +1,131 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPType4bIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindContPType4bIEC_dpmaxp4b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmaxp4b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4bIEC_tpaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpaero; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4bIEC_tpordp4b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpordp4b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPType4bIEC_tufiltp4b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufiltp4b; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindContPType4bIEC::debugName[] = "WindContPType4bIEC"; +const char* WindContPType4bIEC::debugString() const +{ + return WindContPType4bIEC::debugName; +} + +void WindContPType4bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContPType4bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.WindTurbineType4bIEC"), &assign_WindContPType4bIEC_WindTurbineType4bIEC)); +} + +const BaseClassDefiner WindContPType4bIEC::declare() +{ + return BaseClassDefiner(WindContPType4bIEC::addConstructToMap, WindContPType4bIEC::addPrimitiveAssignFnsToMap, WindContPType4bIEC::addClassAssignFnsToMap, WindContPType4bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPType4bIEC_factory() + { + return new WindContPType4bIEC; + } +} diff --git a/CGMES_3.0.0/WindContPType4bIEC.hpp b/CGMES_3.0.0/WindContPType4bIEC.hpp new file mode 100644 index 000000000..e9298da87 --- /dev/null +++ b/CGMES_3.0.0/WindContPType4bIEC.hpp @@ -0,0 +1,47 @@ +#ifndef WindContPType4bIEC_H +#define WindContPType4bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType4bIEC; + + /* + P control model type 4B. Reference: IEC 61400-27-1:2015, 5.6.5.6. + */ + class WindContPType4bIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPType4bIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContPitchAngleIEC.cpp b/CGMES_3.0.0/WindContPitchAngleIEC.cpp new file mode 100644 index 000000000..baa3aa3e9 --- /dev/null +++ b/CGMES_3.0.0/WindContPitchAngleIEC.cpp @@ -0,0 +1,227 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContPitchAngleIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dthetamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dthetamin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kiomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpomega; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_kpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_thetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->thetamax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_thetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + +const char WindContPitchAngleIEC::debugName[] = "WindContPitchAngleIEC"; +const char* WindContPitchAngleIEC::debugString() const +{ + return WindContPitchAngleIEC::debugName; +} + +void WindContPitchAngleIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContPitchAngleIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.WindTurbineType3IEC"), &assign_WindContPitchAngleIEC_WindTurbineType3IEC)); +} + +const BaseClassDefiner WindContPitchAngleIEC::declare() +{ + return BaseClassDefiner(WindContPitchAngleIEC::addConstructToMap, WindContPitchAngleIEC::addPrimitiveAssignFnsToMap, WindContPitchAngleIEC::addClassAssignFnsToMap, WindContPitchAngleIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContPitchAngleIEC_factory() + { + return new WindContPitchAngleIEC; + } +} diff --git a/CGMES_3.0.0/WindContPitchAngleIEC.hpp b/CGMES_3.0.0/WindContPitchAngleIEC.hpp new file mode 100644 index 000000000..1a4b8acc3 --- /dev/null +++ b/CGMES_3.0.0/WindContPitchAngleIEC.hpp @@ -0,0 +1,55 @@ +#ifndef WindContPitchAngleIEC_H +#define WindContPitchAngleIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "AngleDegrees.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType3IEC; + + /* + Pitch angle control model. Reference: IEC 61400-27-1:2015, 5.6.5.2. + */ + class WindContPitchAngleIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContPitchAngleIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContQIEC.cpp b/CGMES_3.0.0/WindContQIEC.cpp new file mode 100644 index 000000000..b3221555e --- /dev/null +++ b/CGMES_3.0.0/WindContQIEC.cpp @@ -0,0 +1,435 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContQIEC.hpp" + +#include +#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() {}; + + + +bool assign_WindContQIEC_iqh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqh1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_iqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_iqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_iqpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->iqpost; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kiu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kpq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_kqv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kqv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_rdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rdroop; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tpfiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfiltq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpost; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tqord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tqord; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_tufiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tufiltq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_udb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udb1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_udb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->udb2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_umax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->umax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_umin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->umin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_uqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uqdip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_uref0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uref0; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_windQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->windQcontrolModesType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQIEC_windUVRTQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + return true; + } + return false; +} + + +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; +} + + + + + + + + + + + + + + + + + + + + + + + + +const char WindContQIEC::debugName[] = "WindContQIEC"; +const char* WindContQIEC::debugString() const +{ + return WindContQIEC::debugName; +} + +void WindContQIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContQIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.WindTurbineType3or4IEC"), &assign_WindContQIEC_WindTurbineType3or4IEC)); +} + +const BaseClassDefiner WindContQIEC::declare() +{ + return BaseClassDefiner(WindContQIEC::addConstructToMap, WindContQIEC::addPrimitiveAssignFnsToMap, WindContQIEC::addClassAssignFnsToMap, WindContQIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContQIEC_factory() + { + return new WindContQIEC; + } +} diff --git a/CGMES_3.0.0/WindContQIEC.hpp b/CGMES_3.0.0/WindContQIEC.hpp new file mode 100644 index 000000000..cfede2676 --- /dev/null +++ b/CGMES_3.0.0/WindContQIEC.hpp @@ -0,0 +1,68 @@ +#ifndef WindContQIEC_H +#define WindContQIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "WindQcontrolModeKind.hpp" +#include "WindUVRTQcontrolModeKind.hpp" + +namespace CIMPP +{ + class WindTurbineType3or4IEC; + + /* + Q control model. Reference: IEC 61400-27-1:2015, 5.6.5.7. + */ + class WindContQIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContQIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContQLimIEC.cpp b/CGMES_3.0.0/WindContQLimIEC.cpp new file mode 100644 index 000000000..317db152d --- /dev/null +++ b/CGMES_3.0.0/WindContQLimIEC.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContQLimIEC.hpp" + +#include +#include + +#include "WindTurbineType3or4IEC.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +WindContQLimIEC::WindContQLimIEC() : WindTurbineType3or4IEC(nullptr) {}; +WindContQLimIEC::~WindContQLimIEC() {}; + + + +bool assign_WindContQLimIEC_qmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContQLimIEC_qmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->qmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass*, BaseClass*); +bool assign_WindContQLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContQLimIEC* 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_WindContQLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char WindContQLimIEC::debugName[] = "WindContQLimIEC"; +const char* WindContQLimIEC::debugString() const +{ + return WindContQLimIEC::debugName; +} + +void WindContQLimIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindContQLimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindContQLimIEC.WindTurbineType3or4IEC"), &assign_WindContQLimIEC_WindTurbineType3or4IEC)); +} + +const BaseClassDefiner WindContQLimIEC::declare() +{ + return BaseClassDefiner(WindContQLimIEC::addConstructToMap, WindContQLimIEC::addPrimitiveAssignFnsToMap, WindContQLimIEC::addClassAssignFnsToMap, WindContQLimIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContQLimIEC_factory() + { + return new WindContQLimIEC; + } +} diff --git a/CGMES_3.0.0/WindContQLimIEC.hpp b/CGMES_3.0.0/WindContQLimIEC.hpp new file mode 100644 index 000000000..f9806837c --- /dev/null +++ b/CGMES_3.0.0/WindContQLimIEC.hpp @@ -0,0 +1,44 @@ +#ifndef WindContQLimIEC_H +#define WindContQLimIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +namespace CIMPP +{ + class WindTurbineType3or4IEC; + + /* + Constant Q limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.9. + */ + class WindContQLimIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContQLimIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContQPQULimIEC.cpp b/CGMES_3.0.0/WindContQPQULimIEC.cpp new file mode 100644 index 000000000..090f2a737 --- /dev/null +++ b/CGMES_3.0.0/WindContQPQULimIEC.cpp @@ -0,0 +1,119 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContQPQULimIEC.hpp" + +#include +#include + +#include "WindDynamicsLookupTable.hpp" +#include "WindTurbineType3or4IEC.hpp" +#include "Seconds.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +WindContQPQULimIEC::WindContQPQULimIEC() : WindTurbineType3or4IEC(nullptr) {}; +WindContQPQULimIEC::~WindContQPQULimIEC() {}; + + + + +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) +{ + WindContQPQULimIEC* 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_WindContQPQULimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4IEC_WindContQPQULimIEC(BaseClass*, BaseClass*); +bool assign_WindContQPQULimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContQPQULimIEC* 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_WindContQPQULimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char WindContQPQULimIEC::debugName[] = "WindContQPQULimIEC"; +const char* WindContQPQULimIEC::debugString() const +{ + return WindContQPQULimIEC::debugName; +} + +void WindContQPQULimIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContQPQULimIEC::declare() +{ + return BaseClassDefiner(WindContQPQULimIEC::addConstructToMap, WindContQPQULimIEC::addPrimitiveAssignFnsToMap, WindContQPQULimIEC::addClassAssignFnsToMap, WindContQPQULimIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContQPQULimIEC_factory() + { + return new WindContQPQULimIEC; + } +} diff --git a/CGMES_3.0.0/WindContQPQULimIEC.hpp b/CGMES_3.0.0/WindContQPQULimIEC.hpp new file mode 100644 index 000000000..67ce86edc --- /dev/null +++ b/CGMES_3.0.0/WindContQPQULimIEC.hpp @@ -0,0 +1,46 @@ +#ifndef WindContQPQULimIEC_H +#define WindContQPQULimIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindTurbineType3or4IEC; + + /* + QP and QU limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.10. + */ + class WindContQPQULimIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContQPQULimIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindContRotorRIEC.cpp b/CGMES_3.0.0/WindContRotorRIEC.cpp new file mode 100644 index 000000000..9f794ca19 --- /dev/null +++ b/CGMES_3.0.0/WindContRotorRIEC.cpp @@ -0,0 +1,215 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindContRotorRIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindContRotorRIEC_kirr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kirr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_komegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->komegafilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_kpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_kprr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kprr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_rmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->rmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_tomegafiltrr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tomegafiltrr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_tpfiltrr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfiltrr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContRotorRIEC* 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_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContRotorRIEC* 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_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + + +const char WindContRotorRIEC::debugName[] = "WindContRotorRIEC"; +const char* WindContRotorRIEC::debugString() const +{ + return WindContRotorRIEC::debugName; +} + +void WindContRotorRIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindContRotorRIEC::declare() +{ + return BaseClassDefiner(WindContRotorRIEC::addConstructToMap, WindContRotorRIEC::addPrimitiveAssignFnsToMap, WindContRotorRIEC::addClassAssignFnsToMap, WindContRotorRIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindContRotorRIEC_factory() + { + return new WindContRotorRIEC; + } +} diff --git a/CGMES_3.0.0/WindContRotorRIEC.hpp b/CGMES_3.0.0/WindContRotorRIEC.hpp new file mode 100644 index 000000000..5e831b2cc --- /dev/null +++ b/CGMES_3.0.0/WindContRotorRIEC.hpp @@ -0,0 +1,54 @@ +#ifndef WindContRotorRIEC_H +#define WindContRotorRIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindGenTurbineType2IEC; + + /* + Rotor resistance control model. Reference: IEC 61400-27-1:2015, 5.6.5.3. + */ + class WindContRotorRIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindContRotorRIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindDynamicsLookupTable.cpp b/CGMES_3.0.0/WindDynamicsLookupTable.cpp new file mode 100644 index 000000000..a6bc32b88 --- /dev/null +++ b/CGMES_3.0.0/WindDynamicsLookupTable.cpp @@ -0,0 +1,291 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindDynamicsLookupTable.hpp" + +#include +#include + +#include "WindContCurrLimIEC.hpp" +#include "WindContPType3IEC.hpp" +#include "WindContQPQULimIEC.hpp" +#include "WindContRotorRIEC.hpp" +#include "WindGenType3bIEC.hpp" +#include "WindPitchContPowerIEC.hpp" +#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() {}; + + + + + + + + + + + +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) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContCurrLimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContCurrLimIEC != element2) + { + element->WindContCurrLimIEC = element2; + return assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContPType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType3IEC != element2) + { + element->WindContPType3IEC = element2; + return assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContQPQULimIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindContQPQULimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContQPQULimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContQPQULimIEC != element2) + { + element->WindContQPQULimIEC = element2; + return assign_WindContQPQULimIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindContRotorRIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContRotorRIEC != element2) + { + element->WindContRotorRIEC = element2; + return assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenType3bIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindGenType3bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenType3bIEC != element2) + { + element->WindGenType3bIEC = element2; + return assign_WindGenType3bIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindPitchContPowerIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPitchContPowerIEC != element2) + { + element->WindPitchContPowerIEC = element2; + return assign_WindPitchContPowerIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindPlantFreqPcontrolIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantFreqPcontrolIEC != element2) + { + element->WindPlantFreqPcontrolIEC = element2; + return assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindPlantReactiveControlIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantReactiveControlIEC != element2) + { + element->WindPlantReactiveControlIEC = element2; + return assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindProtectionIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); +bool assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + WindProtectionIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindProtectionIEC != element2) + { + element->WindProtectionIEC = element2; + return assign_WindProtectionIEC_WindDynamicsLookupTable(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindDynamicsLookupTable::debugName[] = "WindDynamicsLookupTable"; +const char* WindDynamicsLookupTable::debugString() const +{ + return WindDynamicsLookupTable::debugName; +} + +void WindDynamicsLookupTable::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindDynamicsLookupTable::declare() +{ + return BaseClassDefiner(WindDynamicsLookupTable::addConstructToMap, WindDynamicsLookupTable::addPrimitiveAssignFnsToMap, WindDynamicsLookupTable::addClassAssignFnsToMap, WindDynamicsLookupTable::debugName); +} + +namespace CIMPP +{ + BaseClass* WindDynamicsLookupTable_factory() + { + return new WindDynamicsLookupTable; + } +} diff --git a/CGMES_3.0.0/WindDynamicsLookupTable.hpp b/CGMES_3.0.0/WindDynamicsLookupTable.hpp new file mode 100644 index 000000000..a5fa51de7 --- /dev/null +++ b/CGMES_3.0.0/WindDynamicsLookupTable.hpp @@ -0,0 +1,64 @@ +#ifndef WindDynamicsLookupTable_H +#define WindDynamicsLookupTable_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Integer.hpp" +#include "WindLookupTableFunctionKind.hpp" + +namespace CIMPP +{ + class WindContCurrLimIEC; + class WindContPType3IEC; + class WindContQPQULimIEC; + class WindContRotorRIEC; + class WindGenType3bIEC; + class WindPitchContPowerIEC; + class WindPlantFreqPcontrolIEC; + class WindPlantReactiveControlIEC; + class WindProtectionIEC; + + /* + Look up table for the purpose of wind standard models. + */ + class WindDynamicsLookupTable : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindDynamicsLookupTable_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp b/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp new file mode 100644 index 000000000..f082b7a0f --- /dev/null +++ b/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType1aIEC.hpp" + +#include +#include + +#include "WindAeroConstIEC.hpp" + +using namespace CIMPP; + +WindGenTurbineType1aIEC::WindGenTurbineType1aIEC() : WindAeroConstIEC(nullptr) {}; +WindGenTurbineType1aIEC::~WindGenTurbineType1aIEC() {}; + + + + +bool assign_WindAeroConstIEC_WindGenTurbineType1aIEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType1aIEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType1aIEC* element = dynamic_cast(BaseClass_ptr1); + WindAeroConstIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindAeroConstIEC != element2) + { + element->WindAeroConstIEC = element2; + return assign_WindAeroConstIEC_WindGenTurbineType1aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindGenTurbineType1aIEC::debugName[] = "WindGenTurbineType1aIEC"; +const char* WindGenTurbineType1aIEC::debugString() const +{ + return WindGenTurbineType1aIEC::debugName; +} + +void WindGenTurbineType1aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1aIEC"), &WindGenTurbineType1aIEC_factory)); +} + +void WindGenTurbineType1aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindGenTurbineType1aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1aIEC.WindAeroConstIEC"), &assign_WindGenTurbineType1aIEC_WindAeroConstIEC)); +} + +const BaseClassDefiner WindGenTurbineType1aIEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType1aIEC::addConstructToMap, WindGenTurbineType1aIEC::addPrimitiveAssignFnsToMap, WindGenTurbineType1aIEC::addClassAssignFnsToMap, WindGenTurbineType1aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType1aIEC_factory() + { + return new WindGenTurbineType1aIEC; + } +} diff --git a/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp b/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp new file mode 100644 index 000000000..be735fbe4 --- /dev/null +++ b/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindGenTurbineType1aIEC_H +#define WindGenTurbineType1aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindAeroConstIEC; + + /* + Wind turbine IEC type 1A. Reference: IEC 61400-27-1:2015, 5.5.2.2. + */ + class WindGenTurbineType1aIEC : public WindTurbineType1or2IEC + { + public: + /* constructor initialising all attributes to null */ + WindGenTurbineType1aIEC(); + ~WindGenTurbineType1aIEC() override; + + CIMPP::WindAeroConstIEC* WindAeroConstIEC; /* Wind aerodynamic model associated with this wind turbine type 1A model. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType1aIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp b/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp new file mode 100644 index 000000000..70a389305 --- /dev/null +++ b/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType1bIEC.hpp" + +#include +#include + +#include "WindPitchContPowerIEC.hpp" + +using namespace CIMPP; + +WindGenTurbineType1bIEC::WindGenTurbineType1bIEC() : WindPitchContPowerIEC(nullptr) {}; +WindGenTurbineType1bIEC::~WindGenTurbineType1bIEC() {}; + + + + +bool assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType1bIEC* element = dynamic_cast(BaseClass_ptr1); + WindPitchContPowerIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPitchContPowerIEC != element2) + { + element->WindPitchContPowerIEC = element2; + return assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindGenTurbineType1bIEC::debugName[] = "WindGenTurbineType1bIEC"; +const char* WindGenTurbineType1bIEC::debugString() const +{ + return WindGenTurbineType1bIEC::debugName; +} + +void WindGenTurbineType1bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1bIEC"), &WindGenTurbineType1bIEC_factory)); +} + +void WindGenTurbineType1bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindGenTurbineType1bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1bIEC.WindPitchContPowerIEC"), &assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC)); +} + +const BaseClassDefiner WindGenTurbineType1bIEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType1bIEC::addConstructToMap, WindGenTurbineType1bIEC::addPrimitiveAssignFnsToMap, WindGenTurbineType1bIEC::addClassAssignFnsToMap, WindGenTurbineType1bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType1bIEC_factory() + { + return new WindGenTurbineType1bIEC; + } +} diff --git a/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp b/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp new file mode 100644 index 000000000..904528eb4 --- /dev/null +++ b/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindGenTurbineType1bIEC_H +#define WindGenTurbineType1bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindPitchContPowerIEC; + + /* + Wind turbine IEC type 1B. Reference: IEC 61400-27-1:2015, 5.5.2.3. + */ + class WindGenTurbineType1bIEC : public WindTurbineType1or2IEC + { + public: + /* constructor initialising all attributes to null */ + WindGenTurbineType1bIEC(); + ~WindGenTurbineType1bIEC() override; + + CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; /* Pitch control power model associated with this wind turbine type 1B model. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType1bIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenTurbineType2IEC.cpp b/CGMES_3.0.0/WindGenTurbineType2IEC.cpp new file mode 100644 index 000000000..4683bb4b6 --- /dev/null +++ b/CGMES_3.0.0/WindGenTurbineType2IEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenTurbineType2IEC.hpp" + +#include +#include + +#include "WindContRotorRIEC.hpp" +#include "WindPitchContPowerIEC.hpp" + +using namespace CIMPP; + +WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContPowerIEC(nullptr) {}; +WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {}; + + + + + +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + WindContRotorRIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContRotorRIEC != element2) + { + element->WindContRotorRIEC = element2; + return assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); +bool assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + WindPitchContPowerIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPitchContPowerIEC != element2) + { + element->WindPitchContPowerIEC = element2; + return assign_WindPitchContPowerIEC_WindGenTurbineType2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindGenTurbineType2IEC::debugName[] = "WindGenTurbineType2IEC"; +const char* WindGenTurbineType2IEC::debugString() const +{ + return WindGenTurbineType2IEC::debugName; +} + +void WindGenTurbineType2IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC"), &WindGenTurbineType2IEC_factory)); +} + +void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindGenTurbineType2IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindGenTurbineType2IEC::declare() +{ + return BaseClassDefiner(WindGenTurbineType2IEC::addConstructToMap, WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap, WindGenTurbineType2IEC::addClassAssignFnsToMap, WindGenTurbineType2IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenTurbineType2IEC_factory() + { + return new WindGenTurbineType2IEC; + } +} diff --git a/CGMES_3.0.0/WindGenTurbineType2IEC.hpp b/CGMES_3.0.0/WindGenTurbineType2IEC.hpp new file mode 100644 index 000000000..33f8227c4 --- /dev/null +++ b/CGMES_3.0.0/WindGenTurbineType2IEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindGenTurbineType2IEC_H +#define WindGenTurbineType2IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContRotorRIEC; + class WindPitchContPowerIEC; + + /* + Wind turbine IEC type 2. Reference: IEC 61400-27-1:2015, 5.5.3. + */ + class WindGenTurbineType2IEC : public WindTurbineType1or2IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenTurbineType2IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenType3IEC.cpp b/CGMES_3.0.0/WindGenType3IEC.cpp new file mode 100644 index 000000000..0a6697d59 --- /dev/null +++ b/CGMES_3.0.0/WindGenType3IEC.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenType3IEC.hpp" + +#include +#include + +#include "WindTurbineType3IEC.hpp" +#include "PU.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +WindGenType3IEC::WindGenType3IEC() : WindTurbineType3IEC(nullptr) {}; +WindGenType3IEC::~WindGenType3IEC() {}; + + + +bool assign_WindGenType3IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dipmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType3IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->diqmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType3IEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->xs; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass*, BaseClass*); +bool assign_WindGenType3IEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenType3IEC* 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_WindGenType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char WindGenType3IEC::debugName[] = "WindGenType3IEC"; +const char* WindGenType3IEC::debugString() const +{ + return WindGenType3IEC::debugName; +} + +void WindGenType3IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGenType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGenType3IEC.WindTurbineType3IEC"), &assign_WindGenType3IEC_WindTurbineType3IEC)); +} + +const BaseClassDefiner WindGenType3IEC::declare() +{ + return BaseClassDefiner(WindGenType3IEC::addConstructToMap, WindGenType3IEC::addPrimitiveAssignFnsToMap, WindGenType3IEC::addClassAssignFnsToMap, WindGenType3IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenType3IEC_factory() + { + return new WindGenType3IEC; + } +} diff --git a/CGMES_3.0.0/WindGenType3IEC.hpp b/CGMES_3.0.0/WindGenType3IEC.hpp new file mode 100644 index 000000000..aa614d83f --- /dev/null +++ b/CGMES_3.0.0/WindGenType3IEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindGenType3IEC_H +#define WindGenType3IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" + +namespace CIMPP +{ + class WindTurbineType3IEC; + + /* + Parent class supporting relationships to IEC wind turbines type 3 generator models of IEC type 3A and 3B. + */ + class WindGenType3IEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenType3IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenType3aIEC.cpp b/CGMES_3.0.0/WindGenType3aIEC.cpp new file mode 100644 index 000000000..d90514f39 --- /dev/null +++ b/CGMES_3.0.0/WindGenType3aIEC.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenType3aIEC.hpp" + +#include +#include + +#include "WindTurbineType4IEC.hpp" +#include "Float.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +WindGenType3aIEC::WindGenType3aIEC() : WindTurbineType4IEC(nullptr) {}; +WindGenType3aIEC::~WindGenType3aIEC() {}; + + + +bool assign_WindGenType3aIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType3aIEC_tic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tic; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass*, BaseClass*); +bool assign_WindGenType3aIEC_WindTurbineType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4IEC != element2) + { + element->WindTurbineType4IEC = element2; + return assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + +const char WindGenType3aIEC::debugName[] = "WindGenType3aIEC"; +const char* WindGenType3aIEC::debugString() const +{ + return WindGenType3aIEC::debugName; +} + +void WindGenType3aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGenType3aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGenType3aIEC.WindTurbineType4IEC"), &assign_WindGenType3aIEC_WindTurbineType4IEC)); +} + +const BaseClassDefiner WindGenType3aIEC::declare() +{ + return BaseClassDefiner(WindGenType3aIEC::addConstructToMap, WindGenType3aIEC::addPrimitiveAssignFnsToMap, WindGenType3aIEC::addClassAssignFnsToMap, WindGenType3aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenType3aIEC_factory() + { + return new WindGenType3aIEC; + } +} diff --git a/CGMES_3.0.0/WindGenType3aIEC.hpp b/CGMES_3.0.0/WindGenType3aIEC.hpp new file mode 100644 index 000000000..c82171280 --- /dev/null +++ b/CGMES_3.0.0/WindGenType3aIEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindGenType3aIEC_H +#define WindGenType3aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindGenType3IEC.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType4IEC; + + /* + IEC type 3A generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.2. + */ + class WindGenType3aIEC : public WindGenType3IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenType3aIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenType3bIEC.cpp b/CGMES_3.0.0/WindGenType3bIEC.cpp new file mode 100644 index 000000000..4be1f1dc6 --- /dev/null +++ b/CGMES_3.0.0/WindGenType3bIEC.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenType3bIEC.hpp" + +#include +#include + +#include "WindDynamicsLookupTable.hpp" +#include "Boolean.hpp" +#include "Seconds.hpp" +#include "Seconds.hpp" + +using namespace CIMPP; + +WindGenType3bIEC::WindGenType3bIEC() {}; +WindGenType3bIEC::~WindGenType3bIEC() {}; + + + +bool assign_WindGenType3bIEC_mwtcwp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mwtcwp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType3bIEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType3bIEC_two(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->two; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass*, BaseClass*); +bool assign_WindGenType3bIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenType3bIEC* 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_WindGenType3bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char WindGenType3bIEC::debugName[] = "WindGenType3bIEC"; +const char* WindGenType3bIEC::debugString() const +{ + return WindGenType3bIEC::debugName; +} + +void WindGenType3bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGenType3bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGenType3bIEC.WindDynamicsLookupTable"), &assign_WindGenType3bIEC_WindDynamicsLookupTable)); +} + +const BaseClassDefiner WindGenType3bIEC::declare() +{ + return BaseClassDefiner(WindGenType3bIEC::addConstructToMap, WindGenType3bIEC::addPrimitiveAssignFnsToMap, WindGenType3bIEC::addClassAssignFnsToMap, WindGenType3bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenType3bIEC_factory() + { + return new WindGenType3bIEC; + } +} diff --git a/CGMES_3.0.0/WindGenType3bIEC.hpp b/CGMES_3.0.0/WindGenType3bIEC.hpp new file mode 100644 index 000000000..7ea4c4c14 --- /dev/null +++ b/CGMES_3.0.0/WindGenType3bIEC.hpp @@ -0,0 +1,46 @@ +#ifndef WindGenType3bIEC_H +#define WindGenType3bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindGenType3IEC.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + + /* + IEC type 3B generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.3. + */ + class WindGenType3bIEC : public WindGenType3IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenType3bIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenType4IEC.cpp b/CGMES_3.0.0/WindGenType4IEC.cpp new file mode 100644 index 000000000..81b635802 --- /dev/null +++ b/CGMES_3.0.0/WindGenType4IEC.cpp @@ -0,0 +1,151 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenType4IEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindGenType4IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dipmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType4IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->diqmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType4IEC_diqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->diqmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindGenType4IEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tg; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass*, BaseClass*); +bool assign_WindGenType4IEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass*, BaseClass*); +bool assign_WindGenType4IEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindGenType4IEC::debugName[] = "WindGenType4IEC"; +const char* WindGenType4IEC::debugString() const +{ + return WindGenType4IEC::debugName; +} + +void WindGenType4IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindGenType4IEC::declare() +{ + return BaseClassDefiner(WindGenType4IEC::addConstructToMap, WindGenType4IEC::addPrimitiveAssignFnsToMap, WindGenType4IEC::addClassAssignFnsToMap, WindGenType4IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGenType4IEC_factory() + { + return new WindGenType4IEC; + } +} diff --git a/CGMES_3.0.0/WindGenType4IEC.hpp b/CGMES_3.0.0/WindGenType4IEC.hpp new file mode 100644 index 000000000..86f7c7da6 --- /dev/null +++ b/CGMES_3.0.0/WindGenType4IEC.hpp @@ -0,0 +1,49 @@ +#ifndef WindGenType4IEC_H +#define WindGenType4IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType4aIEC; + class WindTurbineType4bIEC; + + /* + IEC type 4 generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.4. + */ + class WindGenType4IEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGenType4IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindGenUnitKind.cpp b/CGMES_3.0.0/WindGenUnitKind.cpp new file mode 100644 index 000000000..f92814598 --- /dev/null +++ b/CGMES_3.0.0/WindGenUnitKind.cpp @@ -0,0 +1,90 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGenUnitKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindGenUnitKind& WindGenUnitKind::operator=(WindGenUnitKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindGenUnitKind::operator WindGenUnitKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindGenUnitKind::debugName[] = "WindGenUnitKind"; +const char* WindGenUnitKind::debugString() const +{ + return WindGenUnitKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindGenUnitKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindGenUnitKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "offshore") + { + rop = WindGenUnitKind::offshore; + return lop; + } + if(EnumSymbol == "onshore") + { + rop = WindGenUnitKind::onshore; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindGenUnitKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindGenUnitKind::offshore) + { + EnumSymbol = "offshore"; + } + if (obj.value == WindGenUnitKind::onshore) + { + EnumSymbol = "onshore"; + } + + if (!EnumSymbol.empty()) + { + os << "WindGenUnitKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/WindGenUnitKind.hpp b/CGMES_3.0.0/WindGenUnitKind.hpp new file mode 100644 index 000000000..4aa57c46c --- /dev/null +++ b/CGMES_3.0.0/WindGenUnitKind.hpp @@ -0,0 +1,46 @@ +#ifndef WindGenUnitKind_H +#define WindGenUnitKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Kind of wind generating unit. + */ + class WindGenUnitKind + { + public: + enum WindGenUnitKind_ENUM + { + /** + * The wind generating unit is located offshore. + */ + offshore, + /** + * The wind generating unit is located onshore. + */ + onshore, + }; + + WindGenUnitKind() : value(), initialized(false) {} + WindGenUnitKind(WindGenUnitKind_ENUM value) : value(value), initialized(true) {} + + WindGenUnitKind& operator=(WindGenUnitKind_ENUM rop); + operator WindGenUnitKind_ENUM() const; + + WindGenUnitKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindGenUnitKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindGenUnitKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WindGeneratingUnit.cpp b/CGMES_3.0.0/WindGeneratingUnit.cpp new file mode 100644 index 000000000..908efbf89 --- /dev/null +++ b/CGMES_3.0.0/WindGeneratingUnit.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindGeneratingUnit.hpp" + +#include +#include + +#include "WindPowerPlant.hpp" +#include "WindGenUnitKind.hpp" + +using namespace CIMPP; + +WindGeneratingUnit::WindGeneratingUnit() : WindPowerPlant(nullptr) {}; +WindGeneratingUnit::~WindGeneratingUnit() {}; + + + +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) +{ + WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + WindPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPowerPlant != element2) + { + element->WindPowerPlant = element2; + return assign_WindPowerPlant_WindGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindGeneratingUnit::debugName[] = "WindGeneratingUnit"; +const char* WindGeneratingUnit::debugString() const +{ + return WindGeneratingUnit::debugName; +} + +void WindGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit.WindPowerPlant"), &assign_WindGeneratingUnit_WindPowerPlant)); +} + +const BaseClassDefiner WindGeneratingUnit::declare() +{ + return BaseClassDefiner(WindGeneratingUnit::addConstructToMap, WindGeneratingUnit::addPrimitiveAssignFnsToMap, WindGeneratingUnit::addClassAssignFnsToMap, WindGeneratingUnit::debugName); +} + +namespace CIMPP +{ + BaseClass* WindGeneratingUnit_factory() + { + return new WindGeneratingUnit; + } +} diff --git a/CGMES_3.0.0/WindGeneratingUnit.hpp b/CGMES_3.0.0/WindGeneratingUnit.hpp new file mode 100644 index 000000000..3a78e09a2 --- /dev/null +++ b/CGMES_3.0.0/WindGeneratingUnit.hpp @@ -0,0 +1,43 @@ +#ifndef WindGeneratingUnit_H +#define WindGeneratingUnit_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "GeneratingUnit.hpp" +#include "BaseClassDefiner.hpp" +#include "WindGenUnitKind.hpp" + +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. + */ + class WindGeneratingUnit : public GeneratingUnit + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindGeneratingUnit_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindLookupTableFunctionKind.cpp b/CGMES_3.0.0/WindLookupTableFunctionKind.cpp new file mode 100644 index 000000000..de8925127 --- /dev/null +++ b/CGMES_3.0.0/WindLookupTableFunctionKind.cpp @@ -0,0 +1,216 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindLookupTableFunctionKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindLookupTableFunctionKind& WindLookupTableFunctionKind::operator=(WindLookupTableFunctionKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindLookupTableFunctionKind::operator WindLookupTableFunctionKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindLookupTableFunctionKind::debugName[] = "WindLookupTableFunctionKind"; +const char* WindLookupTableFunctionKind::debugString() const +{ + return WindLookupTableFunctionKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindLookupTableFunctionKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "prr") + { + rop = WindLookupTableFunctionKind::prr; + return lop; + } + if(EnumSymbol == "omegap") + { + rop = WindLookupTableFunctionKind::omegap; + return lop; + } + if(EnumSymbol == "ipmax") + { + rop = WindLookupTableFunctionKind::ipmax; + return lop; + } + if(EnumSymbol == "iqmax") + { + rop = WindLookupTableFunctionKind::iqmax; + return lop; + } + if(EnumSymbol == "pwp") + { + rop = WindLookupTableFunctionKind::pwp; + return lop; + } + if(EnumSymbol == "tcwdu") + { + rop = WindLookupTableFunctionKind::tcwdu; + return lop; + } + if(EnumSymbol == "tduwt") + { + rop = WindLookupTableFunctionKind::tduwt; + return lop; + } + if(EnumSymbol == "qmaxp") + { + rop = WindLookupTableFunctionKind::qmaxp; + return lop; + } + if(EnumSymbol == "qminp") + { + rop = WindLookupTableFunctionKind::qminp; + return lop; + } + if(EnumSymbol == "qmaxu") + { + rop = WindLookupTableFunctionKind::qmaxu; + return lop; + } + if(EnumSymbol == "qminu") + { + rop = WindLookupTableFunctionKind::qminu; + return lop; + } + if(EnumSymbol == "tuover") + { + rop = WindLookupTableFunctionKind::tuover; + return lop; + } + if(EnumSymbol == "tuunder") + { + rop = WindLookupTableFunctionKind::tuunder; + return lop; + } + if(EnumSymbol == "tfover") + { + rop = WindLookupTableFunctionKind::tfover; + return lop; + } + if(EnumSymbol == "tfunder") + { + rop = WindLookupTableFunctionKind::tfunder; + return lop; + } + if(EnumSymbol == "qwp") + { + rop = WindLookupTableFunctionKind::qwp; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindLookupTableFunctionKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindLookupTableFunctionKind::prr) + { + EnumSymbol = "prr"; + } + if (obj.value == WindLookupTableFunctionKind::omegap) + { + EnumSymbol = "omegap"; + } + if (obj.value == WindLookupTableFunctionKind::ipmax) + { + EnumSymbol = "ipmax"; + } + if (obj.value == WindLookupTableFunctionKind::iqmax) + { + EnumSymbol = "iqmax"; + } + if (obj.value == WindLookupTableFunctionKind::pwp) + { + EnumSymbol = "pwp"; + } + if (obj.value == WindLookupTableFunctionKind::tcwdu) + { + EnumSymbol = "tcwdu"; + } + if (obj.value == WindLookupTableFunctionKind::tduwt) + { + EnumSymbol = "tduwt"; + } + if (obj.value == WindLookupTableFunctionKind::qmaxp) + { + EnumSymbol = "qmaxp"; + } + if (obj.value == WindLookupTableFunctionKind::qminp) + { + EnumSymbol = "qminp"; + } + if (obj.value == WindLookupTableFunctionKind::qmaxu) + { + EnumSymbol = "qmaxu"; + } + if (obj.value == WindLookupTableFunctionKind::qminu) + { + EnumSymbol = "qminu"; + } + if (obj.value == WindLookupTableFunctionKind::tuover) + { + EnumSymbol = "tuover"; + } + if (obj.value == WindLookupTableFunctionKind::tuunder) + { + EnumSymbol = "tuunder"; + } + if (obj.value == WindLookupTableFunctionKind::tfover) + { + EnumSymbol = "tfover"; + } + if (obj.value == WindLookupTableFunctionKind::tfunder) + { + EnumSymbol = "tfunder"; + } + if (obj.value == WindLookupTableFunctionKind::qwp) + { + EnumSymbol = "qwp"; + } + + if (!EnumSymbol.empty()) + { + os << "WindLookupTableFunctionKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/WindLookupTableFunctionKind.hpp b/CGMES_3.0.0/WindLookupTableFunctionKind.hpp new file mode 100644 index 000000000..ae550dd36 --- /dev/null +++ b/CGMES_3.0.0/WindLookupTableFunctionKind.hpp @@ -0,0 +1,102 @@ +#ifndef WindLookupTableFunctionKind_H +#define WindLookupTableFunctionKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + qwp, + }; + + WindLookupTableFunctionKind() : value(), initialized(false) {} + WindLookupTableFunctionKind(WindLookupTableFunctionKind_ENUM value) : value(value), initialized(true) {} + + WindLookupTableFunctionKind& operator=(WindLookupTableFunctionKind_ENUM rop); + operator WindLookupTableFunctionKind_ENUM() const; + + WindLookupTableFunctionKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindLookupTableFunctionKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindLookupTableFunctionKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WindMechIEC.cpp b/CGMES_3.0.0/WindMechIEC.cpp new file mode 100644 index 000000000..22331b849 --- /dev/null +++ b/CGMES_3.0.0/WindMechIEC.cpp @@ -0,0 +1,171 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindMechIEC.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_WindMechIEC_cdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->cdrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindMechIEC_hgen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hgen; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindMechIEC_hwtr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->hwtr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindMechIEC_kdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kdrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindMechIEC* 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_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + +const char WindMechIEC::debugName[] = "WindMechIEC"; +const char* WindMechIEC::debugString() const +{ + return WindMechIEC::debugName; +} + +void WindMechIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindMechIEC::declare() +{ + return BaseClassDefiner(WindMechIEC::addConstructToMap, WindMechIEC::addPrimitiveAssignFnsToMap, WindMechIEC::addClassAssignFnsToMap, WindMechIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindMechIEC_factory() + { + return new WindMechIEC; + } +} diff --git a/CGMES_3.0.0/WindMechIEC.hpp b/CGMES_3.0.0/WindMechIEC.hpp new file mode 100644 index 000000000..3a0f4c3e1 --- /dev/null +++ b/CGMES_3.0.0/WindMechIEC.hpp @@ -0,0 +1,51 @@ +#ifndef WindMechIEC_H +#define WindMechIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType1or2IEC; + class WindTurbineType3IEC; + class WindTurbineType4bIEC; + + /* + Two mass model. Reference: IEC 61400-27-1:2015, 5.6.2.1. + */ + class WindMechIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindMechIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPitchContPowerIEC.cpp b/CGMES_3.0.0/WindPitchContPowerIEC.cpp new file mode 100644 index 000000000..ef4127b8d --- /dev/null +++ b/CGMES_3.0.0/WindPitchContPowerIEC.cpp @@ -0,0 +1,219 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPitchContPowerIEC.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_WindPitchContPowerIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_dpmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_pset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->pset; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->t1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tr; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPitchContPowerIEC_uuvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uuvrt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContPowerIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPitchContPowerIEC* 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_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType1bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType1bIEC != element2) + { + element->WindGenTurbineType1bIEC = element2; + return assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContPowerIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPitchContPowerIEC* 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_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + +const char WindPitchContPowerIEC::debugName[] = "WindPitchContPowerIEC"; +const char* WindPitchContPowerIEC::debugString() const +{ + return WindPitchContPowerIEC::debugName; +} + +void WindPitchContPowerIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindPitchContPowerIEC::declare() +{ + return BaseClassDefiner(WindPitchContPowerIEC::addConstructToMap, WindPitchContPowerIEC::addPrimitiveAssignFnsToMap, WindPitchContPowerIEC::addClassAssignFnsToMap, WindPitchContPowerIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPitchContPowerIEC_factory() + { + return new WindPitchContPowerIEC; + } +} diff --git a/CGMES_3.0.0/WindPitchContPowerIEC.hpp b/CGMES_3.0.0/WindPitchContPowerIEC.hpp new file mode 100644 index 000000000..b82f292f7 --- /dev/null +++ b/CGMES_3.0.0/WindPitchContPowerIEC.hpp @@ -0,0 +1,54 @@ +#ifndef WindPitchContPowerIEC_H +#define WindPitchContPowerIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindGenTurbineType1bIEC; + class WindGenTurbineType2IEC; + + /* + Pitch control power model. Reference: IEC 61400-27-1:2015, 5.6.5.1. + */ + class WindPitchContPowerIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPitchContPowerIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPlantDynamics.cpp b/CGMES_3.0.0/WindPlantDynamics.cpp new file mode 100644 index 000000000..8234ab546 --- /dev/null +++ b/CGMES_3.0.0/WindPlantDynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantDynamics.hpp" + +#include +#include + +#include "RemoteInputSignal.hpp" +#include "WindTurbineType3or4Dynamics.hpp" + +using namespace CIMPP; + +WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {}; +WindPlantDynamics::~WindPlantDynamics() {}; + + + + + +bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass*, BaseClass*); +bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_WindPlantDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass*, BaseClass*); +bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindTurbineType3or4Dynamics.begin(), element->WindTurbineType3or4Dynamics.end(), element2) == element->WindTurbineType3or4Dynamics.end()) + { + element->WindTurbineType3or4Dynamics.push_back(element2); + return assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindPlantDynamics::debugName[] = "WindPlantDynamics"; +const char* WindPlantDynamics::debugString() const +{ + return WindPlantDynamics::debugName; +} + +void WindPlantDynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindPlantDynamics"), &WindPlantDynamics_factory)); +} + +void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindPlantDynamics::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindPlantDynamics::declare() +{ + return BaseClassDefiner(WindPlantDynamics::addConstructToMap, WindPlantDynamics::addPrimitiveAssignFnsToMap, WindPlantDynamics::addClassAssignFnsToMap, WindPlantDynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantDynamics_factory() + { + return new WindPlantDynamics; + } +} diff --git a/CGMES_3.0.0/WindPlantDynamics.hpp b/CGMES_3.0.0/WindPlantDynamics.hpp new file mode 100644 index 000000000..98912743c --- /dev/null +++ b/CGMES_3.0.0/WindPlantDynamics.hpp @@ -0,0 +1,43 @@ +#ifndef WindPlantDynamics_H +#define WindPlantDynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindPlantDynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantDynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp new file mode 100644 index 000000000..eb2b78a39 --- /dev/null +++ b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp @@ -0,0 +1,327 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantFreqPcontrolIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dprefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dprefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_dpwprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpwprefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_dpwprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dpwprefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kiwppmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwppmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kiwppmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwppmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpwpp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_kwppref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kwppref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->prefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpft; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpfv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_twpffiltp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twpffiltp; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantFreqPcontrolIEC_twppfiltp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twppfiltp; + if (buffer.fail()) + return false; + else + 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; +} + + + + + + + + + + + + + + + + +const char WindPlantFreqPcontrolIEC::debugName[] = "WindPlantFreqPcontrolIEC"; +const char* WindPlantFreqPcontrolIEC::debugString() const +{ + return WindPlantFreqPcontrolIEC::debugName; +} + +void WindPlantFreqPcontrolIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindPlantFreqPcontrolIEC::declare() +{ + return BaseClassDefiner(WindPlantFreqPcontrolIEC::addConstructToMap, WindPlantFreqPcontrolIEC::addPrimitiveAssignFnsToMap, WindPlantFreqPcontrolIEC::addClassAssignFnsToMap, WindPlantFreqPcontrolIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantFreqPcontrolIEC_factory() + { + return new WindPlantFreqPcontrolIEC; + } +} diff --git a/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp new file mode 100644 index 000000000..8cef6f137 --- /dev/null +++ b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp @@ -0,0 +1,61 @@ +#ifndef WindPlantFreqPcontrolIEC_H +#define WindPlantFreqPcontrolIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + class WindPlantIEC; + + /* + Frequency and active power controller model. Reference: IEC 61400-27-1:2015, Annex D. + */ + class WindPlantFreqPcontrolIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantFreqPcontrolIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPlantIEC.cpp b/CGMES_3.0.0/WindPlantIEC.cpp new file mode 100644 index 000000000..d05195c27 --- /dev/null +++ b/CGMES_3.0.0/WindPlantIEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantIEC.hpp" + +#include +#include + +#include "WindPlantFreqPcontrolIEC.hpp" +#include "WindPlantReactiveControlIEC.hpp" + +using namespace CIMPP; + +WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {}; +WindPlantIEC::~WindPlantIEC() {}; + + + + + +bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass*, BaseClass*); +bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantFreqPcontrolIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantFreqPcontrolIEC != element2) + { + element->WindPlantFreqPcontrolIEC = element2; + return assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass*, BaseClass*); +bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantReactiveControlIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantReactiveControlIEC != element2) + { + element->WindPlantReactiveControlIEC = element2; + return assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindPlantIEC::debugName[] = "WindPlantIEC"; +const char* WindPlantIEC::debugString() const +{ + return WindPlantIEC::debugName; +} + +void WindPlantIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindPlantIEC"), &WindPlantIEC_factory)); +} + +void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindPlantIEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindPlantIEC::declare() +{ + return BaseClassDefiner(WindPlantIEC::addConstructToMap, WindPlantIEC::addPrimitiveAssignFnsToMap, WindPlantIEC::addClassAssignFnsToMap, WindPlantIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantIEC_factory() + { + return new WindPlantIEC; + } +} diff --git a/CGMES_3.0.0/WindPlantIEC.hpp b/CGMES_3.0.0/WindPlantIEC.hpp new file mode 100644 index 000000000..a429a2df9 --- /dev/null +++ b/CGMES_3.0.0/WindPlantIEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindPlantIEC_H +#define WindPlantIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindPlantDynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindPlantFreqPcontrolIEC; + class WindPlantReactiveControlIEC; + + /* + Simplified IEC type plant level model. Reference: IEC 61400-27-1:2015, Annex D. + */ + class WindPlantIEC : public WindPlantDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp b/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp new file mode 100644 index 000000000..eef537e80 --- /dev/null +++ b/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp @@ -0,0 +1,108 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantQcontrolModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindPlantQcontrolModeKind& WindPlantQcontrolModeKind::operator=(WindPlantQcontrolModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindPlantQcontrolModeKind::operator WindPlantQcontrolModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindPlantQcontrolModeKind::debugName[] = "WindPlantQcontrolModeKind"; +const char* WindPlantQcontrolModeKind::debugString() const +{ + return WindPlantQcontrolModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindPlantQcontrolModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindPlantQcontrolModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "reactivePower") + { + rop = WindPlantQcontrolModeKind::reactivePower; + return lop; + } + if(EnumSymbol == "powerFactor") + { + rop = WindPlantQcontrolModeKind::powerFactor; + return lop; + } + if(EnumSymbol == "uqStatic") + { + rop = WindPlantQcontrolModeKind::uqStatic; + return lop; + } + if(EnumSymbol == "voltageControl") + { + rop = WindPlantQcontrolModeKind::voltageControl; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindPlantQcontrolModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindPlantQcontrolModeKind::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == WindPlantQcontrolModeKind::powerFactor) + { + EnumSymbol = "powerFactor"; + } + if (obj.value == WindPlantQcontrolModeKind::uqStatic) + { + EnumSymbol = "uqStatic"; + } + if (obj.value == WindPlantQcontrolModeKind::voltageControl) + { + EnumSymbol = "voltageControl"; + } + + if (!EnumSymbol.empty()) + { + os << "WindPlantQcontrolModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp b/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp new file mode 100644 index 000000000..638e1143b --- /dev/null +++ b/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp @@ -0,0 +1,54 @@ +#ifndef WindPlantQcontrolModeKind_H +#define WindPlantQcontrolModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Reactive power/voltage controller mode. + */ + class WindPlantQcontrolModeKind + { + public: + enum WindPlantQcontrolModeKind_ENUM + { + /** + * Reactive power reference. + */ + reactivePower, + /** + * Power factor reference. + */ + powerFactor, + /** + * UQ static. + */ + uqStatic, + /** + * Voltage control. + */ + voltageControl, + }; + + WindPlantQcontrolModeKind() : value(), initialized(false) {} + WindPlantQcontrolModeKind(WindPlantQcontrolModeKind_ENUM value) : value(value), initialized(true) {} + + WindPlantQcontrolModeKind& operator=(WindPlantQcontrolModeKind_ENUM rop); + operator WindPlantQcontrolModeKind_ENUM() const; + + WindPlantQcontrolModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindPlantQcontrolModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindPlantQcontrolModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp b/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp new file mode 100644 index 000000000..13a831e78 --- /dev/null +++ b/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp @@ -0,0 +1,375 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantReactiveControlIEC.hpp" + +#include +#include + +#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() {}; + + + + +bool assign_WindPlantReactiveControlIEC_dxrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dxrefmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_dxrefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dxrefmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwpx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kiwpxmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwpxmax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kiwpxmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kiwpxmin; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kpwpx; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kwpqref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kwpqref; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->kwpqu; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_tuqfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tuqfilt; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_twppfiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twppfiltq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_twpqfiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twpqfiltq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_twpufiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->twpufiltq; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_txft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->txft; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->txfv; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uwpqdip; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_windPlantQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->windPlantQcontrolModesType; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + { + 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 + 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; +} + + + + + + + + + + + + + + + + + + + +const char WindPlantReactiveControlIEC::debugName[] = "WindPlantReactiveControlIEC"; +const char* WindPlantReactiveControlIEC::debugString() const +{ + return WindPlantReactiveControlIEC::debugName; +} + +void WindPlantReactiveControlIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindPlantReactiveControlIEC::declare() +{ + return BaseClassDefiner(WindPlantReactiveControlIEC::addConstructToMap, WindPlantReactiveControlIEC::addPrimitiveAssignFnsToMap, WindPlantReactiveControlIEC::addClassAssignFnsToMap, WindPlantReactiveControlIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantReactiveControlIEC_factory() + { + return new WindPlantReactiveControlIEC; + } +} diff --git a/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp b/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp new file mode 100644 index 000000000..abcd15c31 --- /dev/null +++ b/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp @@ -0,0 +1,65 @@ +#ifndef WindPlantReactiveControlIEC_H +#define WindPlantReactiveControlIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Float.hpp" +#include "PU.hpp" +#include "Seconds.hpp" +#include "WindPlantQcontrolModeKind.hpp" + +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. + */ + class WindPlantReactiveControlIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantReactiveControlIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPlantUserDefined.cpp b/CGMES_3.0.0/WindPlantUserDefined.cpp new file mode 100644 index 000000000..443180339 --- /dev/null +++ b/CGMES_3.0.0/WindPlantUserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPlantUserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +WindPlantUserDefined::WindPlantUserDefined() {}; +WindPlantUserDefined::~WindPlantUserDefined() {}; + + + +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) +{ + WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindPlantUserDefined::debugName[] = "WindPlantUserDefined"; +const char* WindPlantUserDefined::debugString() const +{ + return WindPlantUserDefined::debugName; +} + +void WindPlantUserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindPlantUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.ProprietaryParameterDynamics"), &assign_WindPlantUserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner WindPlantUserDefined::declare() +{ + return BaseClassDefiner(WindPlantUserDefined::addConstructToMap, WindPlantUserDefined::addPrimitiveAssignFnsToMap, WindPlantUserDefined::addClassAssignFnsToMap, WindPlantUserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPlantUserDefined_factory() + { + return new WindPlantUserDefined; + } +} diff --git a/CGMES_3.0.0/WindPlantUserDefined.hpp b/CGMES_3.0.0/WindPlantUserDefined.hpp new file mode 100644 index 000000000..7a216af91 --- /dev/null +++ b/CGMES_3.0.0/WindPlantUserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef WindPlantUserDefined_H +#define WindPlantUserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindPlantDynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Wind plant function block whose dynamic behaviour is described by a user-defined model. + */ + class WindPlantUserDefined : public WindPlantDynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPlantUserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindPowerPlant.cpp b/CGMES_3.0.0/WindPowerPlant.cpp new file mode 100644 index 000000000..e617795c0 --- /dev/null +++ b/CGMES_3.0.0/WindPowerPlant.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindPowerPlant.hpp" + +#include +#include + +#include "WindGeneratingUnit.hpp" + +using namespace CIMPP; + +WindPowerPlant::WindPowerPlant() {}; +WindPowerPlant::~WindPowerPlant() {}; + + + + +bool assign_WindGeneratingUnit_WindPowerPlant(BaseClass*, BaseClass*); +bool assign_WindPowerPlant_WindGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPowerPlant* element = dynamic_cast(BaseClass_ptr1); + WindGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindGeneratingUnits.begin(), element->WindGeneratingUnits.end(), element2) == element->WindGeneratingUnits.end()) + { + element->WindGeneratingUnits.push_back(element2); + return assign_WindGeneratingUnit_WindPowerPlant(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindPowerPlant::debugName[] = "WindPowerPlant"; +const char* WindPowerPlant::debugString() const +{ + return WindPowerPlant::debugName; +} + +void WindPowerPlant::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindPowerPlant"), &WindPowerPlant_factory)); +} + +void WindPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindPowerPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindPowerPlant.WindGeneratingUnits"), &assign_WindPowerPlant_WindGeneratingUnits)); +} + +const BaseClassDefiner WindPowerPlant::declare() +{ + return BaseClassDefiner(WindPowerPlant::addConstructToMap, WindPowerPlant::addPrimitiveAssignFnsToMap, WindPowerPlant::addClassAssignFnsToMap, WindPowerPlant::debugName); +} + +namespace CIMPP +{ + BaseClass* WindPowerPlant_factory() + { + return new WindPowerPlant; + } +} diff --git a/CGMES_3.0.0/WindPowerPlant.hpp b/CGMES_3.0.0/WindPowerPlant.hpp new file mode 100644 index 000000000..dcebaa981 --- /dev/null +++ b/CGMES_3.0.0/WindPowerPlant.hpp @@ -0,0 +1,41 @@ +#ifndef WindPowerPlant_H +#define WindPowerPlant_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "PowerSystemResource.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindGeneratingUnit; + + /* + Wind power plant. + */ + class WindPowerPlant : public PowerSystemResource + { + public: + /* constructor initialising all attributes to null */ + WindPowerPlant(); + ~WindPowerPlant() override; + + std::list WindGeneratingUnits; /* A wind generating unit or units may be a member of a wind power plant. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindPowerPlant_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindProtectionIEC.cpp b/CGMES_3.0.0/WindProtectionIEC.cpp new file mode 100644 index 000000000..2737377ef --- /dev/null +++ b/CGMES_3.0.0/WindProtectionIEC.cpp @@ -0,0 +1,219 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindProtectionIEC.hpp" + +#include +#include + +#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() {}; + + + + + +bool assign_WindProtectionIEC_dfimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->dfimax; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_fover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->fover; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_funder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->funder; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_mzc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->mzc; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_tfma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tfma; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_uover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uover; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindProtectionIEC_uunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->uunder; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindProtectionIEC* 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_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindProtectionIEC* 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_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + + + + + +const char WindProtectionIEC::debugName[] = "WindProtectionIEC"; +const char* WindProtectionIEC::debugString() const +{ + return WindProtectionIEC::debugName; +} + +void WindProtectionIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +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)); +} + +const BaseClassDefiner WindProtectionIEC::declare() +{ + return BaseClassDefiner(WindProtectionIEC::addConstructToMap, WindProtectionIEC::addPrimitiveAssignFnsToMap, WindProtectionIEC::addClassAssignFnsToMap, WindProtectionIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindProtectionIEC_factory() + { + return new WindProtectionIEC; + } +} diff --git a/CGMES_3.0.0/WindProtectionIEC.hpp b/CGMES_3.0.0/WindProtectionIEC.hpp new file mode 100644 index 000000000..cf1e98c34 --- /dev/null +++ b/CGMES_3.0.0/WindProtectionIEC.hpp @@ -0,0 +1,55 @@ +#ifndef WindProtectionIEC_H +#define WindProtectionIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindDynamicsLookupTable; + 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. + */ + class WindProtectionIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindProtectionIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindQcontrolModeKind.cpp b/CGMES_3.0.0/WindQcontrolModeKind.cpp new file mode 100644 index 000000000..6a621a99b --- /dev/null +++ b/CGMES_3.0.0/WindQcontrolModeKind.cpp @@ -0,0 +1,117 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindQcontrolModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindQcontrolModeKind& WindQcontrolModeKind::operator=(WindQcontrolModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindQcontrolModeKind::operator WindQcontrolModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindQcontrolModeKind::debugName[] = "WindQcontrolModeKind"; +const char* WindQcontrolModeKind::debugString() const +{ + return WindQcontrolModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindQcontrolModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindQcontrolModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "voltage") + { + rop = WindQcontrolModeKind::voltage; + return lop; + } + if(EnumSymbol == "reactivePower") + { + rop = WindQcontrolModeKind::reactivePower; + return lop; + } + if(EnumSymbol == "openLoopReactivePower") + { + rop = WindQcontrolModeKind::openLoopReactivePower; + return lop; + } + if(EnumSymbol == "powerFactor") + { + rop = WindQcontrolModeKind::powerFactor; + return lop; + } + if(EnumSymbol == "openLooppowerFactor") + { + rop = WindQcontrolModeKind::openLooppowerFactor; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindQcontrolModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindQcontrolModeKind::voltage) + { + EnumSymbol = "voltage"; + } + if (obj.value == WindQcontrolModeKind::reactivePower) + { + EnumSymbol = "reactivePower"; + } + if (obj.value == WindQcontrolModeKind::openLoopReactivePower) + { + EnumSymbol = "openLoopReactivePower"; + } + if (obj.value == WindQcontrolModeKind::powerFactor) + { + EnumSymbol = "powerFactor"; + } + if (obj.value == WindQcontrolModeKind::openLooppowerFactor) + { + EnumSymbol = "openLooppowerFactor"; + } + + if (!EnumSymbol.empty()) + { + os << "WindQcontrolModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/WindQcontrolModeKind.hpp b/CGMES_3.0.0/WindQcontrolModeKind.hpp new file mode 100644 index 000000000..fc6dd69b1 --- /dev/null +++ b/CGMES_3.0.0/WindQcontrolModeKind.hpp @@ -0,0 +1,58 @@ +#ifndef WindQcontrolModeKind_H +#define WindQcontrolModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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, + /** + * 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). + */ + openLoopReactivePower, + /** + * 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). + */ + openLooppowerFactor, + }; + + WindQcontrolModeKind() : value(), initialized(false) {} + WindQcontrolModeKind(WindQcontrolModeKind_ENUM value) : value(value), initialized(true) {} + + WindQcontrolModeKind& operator=(WindQcontrolModeKind_ENUM rop); + operator WindQcontrolModeKind_ENUM() const; + + WindQcontrolModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindQcontrolModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindQcontrolModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WindRefFrameRotIEC.cpp b/CGMES_3.0.0/WindRefFrameRotIEC.cpp new file mode 100644 index 000000000..ce0b65317 --- /dev/null +++ b/CGMES_3.0.0/WindRefFrameRotIEC.cpp @@ -0,0 +1,115 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindRefFrameRotIEC.hpp" + +#include +#include + +#include "WindTurbineType3or4IEC.hpp" +#include "Seconds.hpp" +#include "PU.hpp" +#include "PU.hpp" + +using namespace CIMPP; + +WindRefFrameRotIEC::WindRefFrameRotIEC() : WindTurbineType3or4IEC(nullptr) {}; +WindRefFrameRotIEC::~WindRefFrameRotIEC() {}; + + + +bool assign_WindRefFrameRotIEC_tpll(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->tpll; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindRefFrameRotIEC_upll1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upll1; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + +bool assign_WindRefFrameRotIEC_upll2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +{ + if (WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + { + buffer >> element->upll2; + if (buffer.fail()) + return false; + else + return true; + } + return false; +} + + +bool assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass*, BaseClass*); +bool assign_WindRefFrameRotIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindRefFrameRotIEC* 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_WindRefFrameRotIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + + + +const char WindRefFrameRotIEC::debugName[] = "WindRefFrameRotIEC"; +const char* WindRefFrameRotIEC::debugString() const +{ + return WindRefFrameRotIEC::debugName; +} + +void WindRefFrameRotIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindRefFrameRotIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindRefFrameRotIEC.WindTurbineType3or4IEC"), &assign_WindRefFrameRotIEC_WindTurbineType3or4IEC)); +} + +const BaseClassDefiner WindRefFrameRotIEC::declare() +{ + return BaseClassDefiner(WindRefFrameRotIEC::addConstructToMap, WindRefFrameRotIEC::addPrimitiveAssignFnsToMap, WindRefFrameRotIEC::addClassAssignFnsToMap, WindRefFrameRotIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindRefFrameRotIEC_factory() + { + return new WindRefFrameRotIEC; + } +} diff --git a/CGMES_3.0.0/WindRefFrameRotIEC.hpp b/CGMES_3.0.0/WindRefFrameRotIEC.hpp new file mode 100644 index 000000000..96431872d --- /dev/null +++ b/CGMES_3.0.0/WindRefFrameRotIEC.hpp @@ -0,0 +1,46 @@ +#ifndef WindRefFrameRotIEC_H +#define WindRefFrameRotIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "IdentifiedObject.hpp" +#include "BaseClassDefiner.hpp" +#include "PU.hpp" +#include "Seconds.hpp" + +namespace CIMPP +{ + class WindTurbineType3or4IEC; + + /* + Reference frame rotation model. Reference: IEC 61400-27-1:2015, 5.6.3.5. + */ + class WindRefFrameRotIEC : public IdentifiedObject + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindRefFrameRotIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp b/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp new file mode 100644 index 000000000..e406e4c7c --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType1or2Dynamics.hpp" + +#include +#include + +#include "AsynchronousMachineDynamics.hpp" +#include "RemoteInputSignal.hpp" + +using namespace CIMPP; + +WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {}; +WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {}; + + + + + +bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2Dynamics* 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_WindTurbineType1or2Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType1or2Dynamics::debugName[] = "WindTurbineType1or2Dynamics"; +const char* WindTurbineType1or2Dynamics::debugString() const +{ + return WindTurbineType1or2Dynamics::debugName; +} + +void WindTurbineType1or2Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics"), &WindTurbineType1or2Dynamics_factory)); +} + +void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner WindTurbineType1or2Dynamics::declare() +{ + return BaseClassDefiner(WindTurbineType1or2Dynamics::addConstructToMap, WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap, WindTurbineType1or2Dynamics::addClassAssignFnsToMap, WindTurbineType1or2Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType1or2Dynamics_factory() + { + return new WindTurbineType1or2Dynamics; + } +} diff --git a/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp b/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp new file mode 100644 index 000000000..2a66db0ea --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp @@ -0,0 +1,43 @@ +#ifndef WindTurbineType1or2Dynamics_H +#define WindTurbineType1or2Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindTurbineType1or2Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType1or2Dynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType1or2IEC.cpp b/CGMES_3.0.0/WindTurbineType1or2IEC.cpp new file mode 100644 index 000000000..5b28517df --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType1or2IEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType1or2IEC.hpp" + +#include +#include + +#include "WindMechIEC.hpp" +#include "WindProtectionIEC.hpp" + +using namespace CIMPP; + +WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {}; +WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {}; + + + + + +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + WindMechIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindMechIEC != element2) + { + element->WindMechIEC = element2; + return assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + WindProtectionIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindProtectionIEC != element2) + { + element->WindProtectionIEC = element2; + return assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType1or2IEC::debugName[] = "WindTurbineType1or2IEC"; +const char* WindTurbineType1or2IEC::debugString() const +{ + return WindTurbineType1or2IEC::debugName; +} + +void WindTurbineType1or2IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC"), &WindTurbineType1or2IEC_factory)); +} + +void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType1or2IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType1or2IEC::declare() +{ + return BaseClassDefiner(WindTurbineType1or2IEC::addConstructToMap, WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap, WindTurbineType1or2IEC::addClassAssignFnsToMap, WindTurbineType1or2IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType1or2IEC_factory() + { + return new WindTurbineType1or2IEC; + } +} diff --git a/CGMES_3.0.0/WindTurbineType1or2IEC.hpp b/CGMES_3.0.0/WindTurbineType1or2IEC.hpp new file mode 100644 index 000000000..b1e891bfd --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType1or2IEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindTurbineType1or2IEC_H +#define WindTurbineType1or2IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2Dynamics.hpp" +#include "BaseClassDefiner.hpp" + +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. + */ + class WindTurbineType1or2IEC : public WindTurbineType1or2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType1or2IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType3IEC.cpp b/CGMES_3.0.0/WindTurbineType3IEC.cpp new file mode 100644 index 000000000..f121e0320 --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType3IEC.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType3IEC.hpp" + +#include +#include + +#include "WindAeroOneDimIEC.hpp" +#include "WindAeroTwoDimIEC.hpp" +#include "WindContPType3IEC.hpp" +#include "WindContPitchAngleIEC.hpp" +#include "WindGenType3IEC.hpp" +#include "WindMechIEC.hpp" + +using namespace CIMPP; + +WindTurbineType3IEC::WindTurbineType3IEC() : WindAeroOneDimIEC(nullptr), WindAeroTwoDimIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindGenType3IEC(nullptr), WindMechIEC(nullptr) {}; +WindTurbineType3IEC::~WindTurbineType3IEC() {}; + + + + + + + + + +bool assign_WindAeroOneDimIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindAeroOneDimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindAeroOneDimIEC != element2) + { + element->WindAeroOneDimIEC = element2; + return assign_WindAeroOneDimIEC_WindTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindAeroTwoDimIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindAeroTwoDimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindAeroTwoDimIEC != element2) + { + element->WindAeroTwoDimIEC = element2; + return assign_WindAeroTwoDimIEC_WindTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_WindTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindContPType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType3IEC != element2) + { + element->WindContPType3IEC = element2; + return assign_WindContPType3IEC_WindTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPitchAngleIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindContPitchAngleIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPitchAngleIEC != element2) + { + element->WindContPitchAngleIEC = element2; + return assign_WindContPitchAngleIEC_WindTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenType3IEC_WindTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindGenType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenType3IEC != element2) + { + element->WindGenType3IEC = element2; + return assign_WindGenType3IEC_WindTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindMechIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindMechIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindMechIEC != element2) + { + element->WindMechIEC = element2; + return assign_WindMechIEC_WindTurbineType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType3IEC::debugName[] = "WindTurbineType3IEC"; +const char* WindTurbineType3IEC::debugString() const +{ + return WindTurbineType3IEC::debugName; +} + +void WindTurbineType3IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC"), &WindTurbineType3IEC_factory)); +} + +void WindTurbineType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType3IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType3IEC::declare() +{ + return BaseClassDefiner(WindTurbineType3IEC::addConstructToMap, WindTurbineType3IEC::addPrimitiveAssignFnsToMap, WindTurbineType3IEC::addClassAssignFnsToMap, WindTurbineType3IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType3IEC_factory() + { + return new WindTurbineType3IEC; + } +} diff --git a/CGMES_3.0.0/WindTurbineType3IEC.hpp b/CGMES_3.0.0/WindTurbineType3IEC.hpp new file mode 100644 index 000000000..d9588902b --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType3IEC.hpp @@ -0,0 +1,51 @@ +#ifndef WindTurbineType3IEC_H +#define WindTurbineType3IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindAeroOneDimIEC; + class WindAeroTwoDimIEC; + class WindContPType3IEC; + class WindContPitchAngleIEC; + class WindGenType3IEC; + class WindMechIEC; + + /* + Parent class supporting relationships to IEC wind turbines type 3 including their control models. + */ + class WindTurbineType3IEC : public WindTurbineType3or4IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType3IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp b/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp new file mode 100644 index 000000000..a2409a294 --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType3or4Dynamics.hpp" + +#include +#include + +#include "PowerElectronicsConnection.hpp" +#include "RemoteInputSignal.hpp" +#include "WindPlantDynamics.hpp" + +using namespace CIMPP; + +WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : PowerElectronicsConnection(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {}; +WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {}; + + + + + + +bool assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + PowerElectronicsConnection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerElectronicsConnection != element2) + { + element->PowerElectronicsConnection = element2; + return assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + RemoteInputSignal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->RemoteInputSignal != element2) + { + element->RemoteInputSignal = element2; + return assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + WindPlantDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantDynamics != element2) + { + element->WindPlantDynamics = element2; + return assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType3or4Dynamics::debugName[] = "WindTurbineType3or4Dynamics"; +const char* WindTurbineType3or4Dynamics::debugString() const +{ + return WindTurbineType3or4Dynamics::debugName; +} + +void WindTurbineType3or4Dynamics::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics"), &WindTurbineType3or4Dynamics_factory)); +} + +void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_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)); +} + +const BaseClassDefiner WindTurbineType3or4Dynamics::declare() +{ + return BaseClassDefiner(WindTurbineType3or4Dynamics::addConstructToMap, WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap, WindTurbineType3or4Dynamics::addClassAssignFnsToMap, WindTurbineType3or4Dynamics::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType3or4Dynamics_factory() + { + return new WindTurbineType3or4Dynamics; + } +} diff --git a/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp b/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp new file mode 100644 index 000000000..603637dd4 --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp @@ -0,0 +1,45 @@ +#ifndef WindTurbineType3or4Dynamics_H +#define WindTurbineType3or4Dynamics_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "DynamicsFunctionBlock.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class PowerElectronicsConnection; + class RemoteInputSignal; + class WindPlantDynamics; + + /* + Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant including their control models. + */ + class WindTurbineType3or4Dynamics : public DynamicsFunctionBlock + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType3or4Dynamics_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType3or4IEC.cpp b/CGMES_3.0.0/WindTurbineType3or4IEC.cpp new file mode 100644 index 000000000..52eeef18c --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType3or4IEC.cpp @@ -0,0 +1,167 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType3or4IEC.hpp" + +#include +#include + +#include "WindContQIEC.hpp" +#include "WindContCurrLimIEC.hpp" +#include "WindContQLimIEC.hpp" +#include "WindContQPQULimIEC.hpp" +#include "WindProtectionIEC.hpp" +#include "WindRefFrameRotIEC.hpp" + +using namespace CIMPP; + +WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindContQLimIEC(nullptr), WindContQPQULimIEC(nullptr), WindProtectionIEC(nullptr), WindRefFrameRotIEC(nullptr) {}; +WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {}; + + + + + + + + + +bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindContQIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WIndContQIEC != element2) + { + element->WIndContQIEC = element2; + return assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindContCurrLimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContCurrLimIEC != element2) + { + element->WindContCurrLimIEC = element2; + return assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContQLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindContQLimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContQLimIEC != element2) + { + element->WindContQLimIEC = element2; + return assign_WindContQLimIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContQPQULimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindContQPQULimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindContQPQULimIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContQPQULimIEC != element2) + { + element->WindContQPQULimIEC = element2; + return assign_WindContQPQULimIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindProtectionIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindProtectionIEC != element2) + { + element->WindProtectionIEC = element2; + return assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindRefFrameRotIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + WindRefFrameRotIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindRefFrameRotIEC != element2) + { + element->WindRefFrameRotIEC = element2; + return assign_WindRefFrameRotIEC_WindTurbineType3or4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType3or4IEC::debugName[] = "WindTurbineType3or4IEC"; +const char* WindTurbineType3or4IEC::debugString() const +{ + return WindTurbineType3or4IEC::debugName; +} + +void WindTurbineType3or4IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC"), &WindTurbineType3or4IEC_factory)); +} + +void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType3or4IEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType3or4IEC::declare() +{ + return BaseClassDefiner(WindTurbineType3or4IEC::addConstructToMap, WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap, WindTurbineType3or4IEC::addClassAssignFnsToMap, WindTurbineType3or4IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType3or4IEC_factory() + { + return new WindTurbineType3or4IEC; + } +} diff --git a/CGMES_3.0.0/WindTurbineType3or4IEC.hpp b/CGMES_3.0.0/WindTurbineType3or4IEC.hpp new file mode 100644 index 000000000..dd6bc650e --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType3or4IEC.hpp @@ -0,0 +1,51 @@ +#ifndef WindTurbineType3or4IEC_H +#define WindTurbineType3or4IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4Dynamics.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContCurrLimIEC; + class WindContQIEC; + class WindContQLimIEC; + class WindContQPQULimIEC; + class WindProtectionIEC; + class WindRefFrameRotIEC; + + /* + Parent class supporting relationships to IEC wind turbines type 3 and type 4 including their control models. + */ + class WindTurbineType3or4IEC : public WindTurbineType3or4Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType3or4IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType4IEC.cpp b/CGMES_3.0.0/WindTurbineType4IEC.cpp new file mode 100644 index 000000000..2e5e6996b --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType4IEC.cpp @@ -0,0 +1,67 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType4IEC.hpp" + +#include +#include + +#include "WindGenType3aIEC.hpp" + +using namespace CIMPP; + +WindTurbineType4IEC::WindTurbineType4IEC() : WindGenType3aIEC(nullptr) {}; +WindTurbineType4IEC::~WindTurbineType4IEC() {}; + + + + +bool assign_WindGenType3aIEC_WindTurbineType4IEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4IEC* element = dynamic_cast(BaseClass_ptr1); + WindGenType3aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenType3aIEC != element2) + { + element->WindGenType3aIEC = element2; + return assign_WindGenType3aIEC_WindTurbineType4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType4IEC::debugName[] = "WindTurbineType4IEC"; +const char* WindTurbineType4IEC::debugString() const +{ + return WindTurbineType4IEC::debugName; +} + +void WindTurbineType4IEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4IEC"), &WindTurbineType4IEC_factory)); +} + +void WindTurbineType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType4IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4IEC.WindGenType3aIEC"), &assign_WindTurbineType4IEC_WindGenType3aIEC)); +} + +const BaseClassDefiner WindTurbineType4IEC::declare() +{ + return BaseClassDefiner(WindTurbineType4IEC::addConstructToMap, WindTurbineType4IEC::addPrimitiveAssignFnsToMap, WindTurbineType4IEC::addClassAssignFnsToMap, WindTurbineType4IEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType4IEC_factory() + { + return new WindTurbineType4IEC; + } +} diff --git a/CGMES_3.0.0/WindTurbineType4IEC.hpp b/CGMES_3.0.0/WindTurbineType4IEC.hpp new file mode 100644 index 000000000..ef585660f --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType4IEC.hpp @@ -0,0 +1,41 @@ +#ifndef WindTurbineType4IEC_H +#define WindTurbineType4IEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindGenType3aIEC; + + /* + Parent class supporting relationships to IEC wind turbines type 4 including their control models. + */ + class WindTurbineType4IEC : public WindTurbineType3or4IEC + { + public: + /* constructor initialising all attributes to null */ + WindTurbineType4IEC(); + ~WindTurbineType4IEC() override; + + CIMPP::WindGenType3aIEC* WindGenType3aIEC; /* Wind generator type 3A model associated with this wind turbine type 4 model. Default: 0 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType4IEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType4aIEC.cpp b/CGMES_3.0.0/WindTurbineType4aIEC.cpp new file mode 100644 index 000000000..cb1a3e355 --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType4aIEC.cpp @@ -0,0 +1,87 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType4aIEC.hpp" + +#include +#include + +#include "WindContPType4aIEC.hpp" +#include "WindGenType4IEC.hpp" + +using namespace CIMPP; + +WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr), WindGenType4IEC(nullptr) {}; +WindTurbineType4aIEC::~WindTurbineType4aIEC() {}; + + + + + +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindContPType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType4aIEC != element2) + { + element->WindContPType4aIEC = element2; + return assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenType4IEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenType4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenType4IEC != element2) + { + element->WindGenType4IEC = element2; + return assign_WindGenType4IEC_WindTurbineType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType4aIEC::debugName[] = "WindTurbineType4aIEC"; +const char* WindTurbineType4aIEC::debugString() const +{ + return WindTurbineType4aIEC::debugName; +} + +void WindTurbineType4aIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC"), &WindTurbineType4aIEC_factory)); +} + +void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType4aIEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType4aIEC::declare() +{ + return BaseClassDefiner(WindTurbineType4aIEC::addConstructToMap, WindTurbineType4aIEC::addPrimitiveAssignFnsToMap, WindTurbineType4aIEC::addClassAssignFnsToMap, WindTurbineType4aIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType4aIEC_factory() + { + return new WindTurbineType4aIEC; + } +} diff --git a/CGMES_3.0.0/WindTurbineType4aIEC.hpp b/CGMES_3.0.0/WindTurbineType4aIEC.hpp new file mode 100644 index 000000000..99ad3257e --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType4aIEC.hpp @@ -0,0 +1,43 @@ +#ifndef WindTurbineType4aIEC_H +#define WindTurbineType4aIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType4IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContPType4aIEC; + class WindGenType4IEC; + + /* + Wind turbine IEC type 4A. Reference: IEC 61400-27-1:2015, 5.5.5.2. + */ + class WindTurbineType4aIEC : public WindTurbineType4IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType4aIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindTurbineType4bIEC.cpp b/CGMES_3.0.0/WindTurbineType4bIEC.cpp new file mode 100644 index 000000000..169ce0b75 --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType4bIEC.cpp @@ -0,0 +1,107 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindTurbineType4bIEC.hpp" + +#include +#include + +#include "WindContPType4bIEC.hpp" +#include "WindGenType4IEC.hpp" +#include "WindMechIEC.hpp" + +using namespace CIMPP; + +WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindGenType4IEC(nullptr), WindMechIEC(nullptr) {}; +WindTurbineType4bIEC::~WindTurbineType4bIEC() {}; + + + + + + +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindContPType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindContPType4bIEC != element2) + { + element->WindContPType4bIEC = element2; + return assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindGenType4IEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenType4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenType4IEC != element2) + { + element->WindGenType4IEC = element2; + return assign_WindGenType4IEC_WindTurbineType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindMechIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindMechIEC != element2) + { + element->WindMechIEC = element2; + return assign_WindMechIEC_WindTurbineType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +const char WindTurbineType4bIEC::debugName[] = "WindTurbineType4bIEC"; +const char* WindTurbineType4bIEC::debugString() const +{ + return WindTurbineType4bIEC::debugName; +} + +void WindTurbineType4bIEC::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC"), &WindTurbineType4bIEC_factory)); +} + +void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WindTurbineType4bIEC::addClassAssignFnsToMap(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)); +} + +const BaseClassDefiner WindTurbineType4bIEC::declare() +{ + return BaseClassDefiner(WindTurbineType4bIEC::addConstructToMap, WindTurbineType4bIEC::addPrimitiveAssignFnsToMap, WindTurbineType4bIEC::addClassAssignFnsToMap, WindTurbineType4bIEC::debugName); +} + +namespace CIMPP +{ + BaseClass* WindTurbineType4bIEC_factory() + { + return new WindTurbineType4bIEC; + } +} diff --git a/CGMES_3.0.0/WindTurbineType4bIEC.hpp b/CGMES_3.0.0/WindTurbineType4bIEC.hpp new file mode 100644 index 000000000..adc8a39f6 --- /dev/null +++ b/CGMES_3.0.0/WindTurbineType4bIEC.hpp @@ -0,0 +1,45 @@ +#ifndef WindTurbineType4bIEC_H +#define WindTurbineType4bIEC_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType4IEC.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + class WindContPType4bIEC; + class WindGenType4IEC; + class WindMechIEC; + + /* + Wind turbine IEC type 4B. Reference: IEC 61400-27-1:2015, 5.5.5.3. + */ + class WindTurbineType4bIEC : public WindTurbineType4IEC + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindTurbineType4bIEC_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindType1or2UserDefined.cpp b/CGMES_3.0.0/WindType1or2UserDefined.cpp new file mode 100644 index 000000000..d17ab6680 --- /dev/null +++ b/CGMES_3.0.0/WindType1or2UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindType1or2UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +WindType1or2UserDefined::WindType1or2UserDefined() {}; +WindType1or2UserDefined::~WindType1or2UserDefined() {}; + + + +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) +{ + WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindType1or2UserDefined::debugName[] = "WindType1or2UserDefined"; +const char* WindType1or2UserDefined::debugString() const +{ + return WindType1or2UserDefined::debugName; +} + +void WindType1or2UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindType1or2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.ProprietaryParameterDynamics"), &assign_WindType1or2UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner WindType1or2UserDefined::declare() +{ + return BaseClassDefiner(WindType1or2UserDefined::addConstructToMap, WindType1or2UserDefined::addPrimitiveAssignFnsToMap, WindType1or2UserDefined::addClassAssignFnsToMap, WindType1or2UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* WindType1or2UserDefined_factory() + { + return new WindType1or2UserDefined; + } +} diff --git a/CGMES_3.0.0/WindType1or2UserDefined.hpp b/CGMES_3.0.0/WindType1or2UserDefined.hpp new file mode 100644 index 000000000..ce20fdf37 --- /dev/null +++ b/CGMES_3.0.0/WindType1or2UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef WindType1or2UserDefined_H +#define WindType1or2UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType1or2Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Wind type 1 or type 2 function block whose dynamic behaviour is described by a user-defined model. + */ + class WindType1or2UserDefined : public WindTurbineType1or2Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindType1or2UserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindType3or4UserDefined.cpp b/CGMES_3.0.0/WindType3or4UserDefined.cpp new file mode 100644 index 000000000..1224d7233 --- /dev/null +++ b/CGMES_3.0.0/WindType3or4UserDefined.cpp @@ -0,0 +1,83 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindType3or4UserDefined.hpp" + +#include +#include + +#include "ProprietaryParameterDynamics.hpp" +#include "Boolean.hpp" + +using namespace CIMPP; + +WindType3or4UserDefined::WindType3or4UserDefined() {}; +WindType3or4UserDefined::~WindType3or4UserDefined() {}; + + + +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) +{ + WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + ProprietaryParameterDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ProprietaryParameterDynamics.begin(), element->ProprietaryParameterDynamics.end(), element2) == element->ProprietaryParameterDynamics.end()) + { + element->ProprietaryParameterDynamics.push_back(element2); + return assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + + +const char WindType3or4UserDefined::debugName[] = "WindType3or4UserDefined"; +const char* WindType3or4UserDefined::debugString() const +{ + return WindType3or4UserDefined::debugName; +} + +void WindType3or4UserDefined::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("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)); +} + +void WindType3or4UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ + assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.ProprietaryParameterDynamics"), &assign_WindType3or4UserDefined_ProprietaryParameterDynamics)); +} + +const BaseClassDefiner WindType3or4UserDefined::declare() +{ + return BaseClassDefiner(WindType3or4UserDefined::addConstructToMap, WindType3or4UserDefined::addPrimitiveAssignFnsToMap, WindType3or4UserDefined::addClassAssignFnsToMap, WindType3or4UserDefined::debugName); +} + +namespace CIMPP +{ + BaseClass* WindType3or4UserDefined_factory() + { + return new WindType3or4UserDefined; + } +} diff --git a/CGMES_3.0.0/WindType3or4UserDefined.hpp b/CGMES_3.0.0/WindType3or4UserDefined.hpp new file mode 100644 index 000000000..3951d0e28 --- /dev/null +++ b/CGMES_3.0.0/WindType3or4UserDefined.hpp @@ -0,0 +1,43 @@ +#ifndef WindType3or4UserDefined_H +#define WindType3or4UserDefined_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "WindTurbineType3or4Dynamics.hpp" +#include "BaseClassDefiner.hpp" +#include "Boolean.hpp" + +namespace CIMPP +{ + class ProprietaryParameterDynamics; + + /* + Wind type 3 or type 4 function block whose dynamic behaviour is described by a user-defined model. + */ + class WindType3or4UserDefined : public WindTurbineType3or4Dynamics + { + public: + /* constructor initialising all attributes to null */ + 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 */ + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WindType3or4UserDefined_factory(); +} +#endif diff --git a/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp b/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp new file mode 100644 index 000000000..ff0846d8f --- /dev/null +++ b/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp @@ -0,0 +1,99 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindUVRTQcontrolModeKind.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindUVRTQcontrolModeKind& WindUVRTQcontrolModeKind::operator=(WindUVRTQcontrolModeKind_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindUVRTQcontrolModeKind::operator WindUVRTQcontrolModeKind_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindUVRTQcontrolModeKind::debugName[] = "WindUVRTQcontrolModeKind"; +const char* WindUVRTQcontrolModeKind::debugString() const +{ + return WindUVRTQcontrolModeKind::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindUVRTQcontrolModeKind& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindUVRTQcontrolModeKind") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "mode0") + { + rop = WindUVRTQcontrolModeKind::mode0; + return lop; + } + if(EnumSymbol == "mode1") + { + rop = WindUVRTQcontrolModeKind::mode1; + return lop; + } + if(EnumSymbol == "mode2") + { + rop = WindUVRTQcontrolModeKind::mode2; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindUVRTQcontrolModeKind& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindUVRTQcontrolModeKind::mode0) + { + EnumSymbol = "mode0"; + } + if (obj.value == WindUVRTQcontrolModeKind::mode1) + { + EnumSymbol = "mode1"; + } + if (obj.value == WindUVRTQcontrolModeKind::mode2) + { + EnumSymbol = "mode2"; + } + + if (!EnumSymbol.empty()) + { + os << "WindUVRTQcontrolModeKind." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp b/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp new file mode 100644 index 000000000..4646437a2 --- /dev/null +++ b/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp @@ -0,0 +1,50 @@ +#ifndef WindUVRTQcontrolModeKind_H +#define WindUVRTQcontrolModeKind_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + 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). + */ + 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). + */ + 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). + */ + mode2, + }; + + WindUVRTQcontrolModeKind() : value(), initialized(false) {} + WindUVRTQcontrolModeKind(WindUVRTQcontrolModeKind_ENUM value) : value(value), initialized(true) {} + + WindUVRTQcontrolModeKind& operator=(WindUVRTQcontrolModeKind_ENUM rop); + operator WindUVRTQcontrolModeKind_ENUM() const; + + WindUVRTQcontrolModeKind_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindUVRTQcontrolModeKind& rop); + friend std::ostream& operator<<(std::ostream& os, const WindUVRTQcontrolModeKind& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WindingConnection.cpp b/CGMES_3.0.0/WindingConnection.cpp new file mode 100644 index 000000000..498dcbe94 --- /dev/null +++ b/CGMES_3.0.0/WindingConnection.cpp @@ -0,0 +1,135 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WindingConnection.hpp" + +#include +#include + +#include "../src/CIMExceptions.hpp" + +using namespace CIMPP; + +WindingConnection& WindingConnection::operator=(WindingConnection_ENUM rop) +{ + value = rop; + initialized = true; + return *this; +} + +WindingConnection::operator WindingConnection_ENUM() const +{ + if (!initialized) + { + throw new ReadingUninitializedField(); + } + return value; +} + +const char WindingConnection::debugName[] = "WindingConnection"; +const char* WindingConnection::debugString() const +{ + return WindingConnection::debugName; +} + +namespace CIMPP +{ + std::istream& operator>>(std::istream& lop, WindingConnection& rop) + { + rop.initialized = false; + + std::string EnumSymbol; + lop >> EnumSymbol; + + size_t pos = EnumSymbol.find_first_of('.'); + if(EnumSymbol.substr(0, pos) != "WindingConnection") + { + lop.setstate(std::ios::failbit); + return lop; + } + + EnumSymbol = EnumSymbol.substr(pos + 1); + + if(EnumSymbol == "D") + { + rop = WindingConnection::D; + return lop; + } + if(EnumSymbol == "Y") + { + rop = WindingConnection::Y; + return lop; + } + if(EnumSymbol == "Z") + { + rop = WindingConnection::Z; + return lop; + } + if(EnumSymbol == "Yn") + { + rop = WindingConnection::Yn; + return lop; + } + if(EnumSymbol == "Zn") + { + rop = WindingConnection::Zn; + return lop; + } + if(EnumSymbol == "A") + { + rop = WindingConnection::A; + return lop; + } + if(EnumSymbol == "I") + { + rop = WindingConnection::I; + return lop; + } + + lop.setstate(std::ios::failbit); + return lop; + } + + std::ostream& operator<<(std::ostream& os, const WindingConnection& obj) + { + if (obj.initialized) + { + std::string EnumSymbol; + + if (obj.value == WindingConnection::D) + { + EnumSymbol = "D"; + } + if (obj.value == WindingConnection::Y) + { + EnumSymbol = "Y"; + } + if (obj.value == WindingConnection::Z) + { + EnumSymbol = "Z"; + } + if (obj.value == WindingConnection::Yn) + { + EnumSymbol = "Yn"; + } + if (obj.value == WindingConnection::Zn) + { + EnumSymbol = "Zn"; + } + if (obj.value == WindingConnection::A) + { + EnumSymbol = "A"; + } + if (obj.value == WindingConnection::I) + { + EnumSymbol = "I"; + } + + if (!EnumSymbol.empty()) + { + os << "WindingConnection." << EnumSymbol; + } + } + return os; + } +} diff --git a/CGMES_3.0.0/WindingConnection.hpp b/CGMES_3.0.0/WindingConnection.hpp new file mode 100644 index 000000000..8e4cee0f7 --- /dev/null +++ b/CGMES_3.0.0/WindingConnection.hpp @@ -0,0 +1,66 @@ +#ifndef WindingConnection_H +#define WindingConnection_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +namespace CIMPP +{ + /* + Winding connection type. + */ + class WindingConnection + { + public: + enum WindingConnection_ENUM + { + /** + * Delta. + */ + D, + /** + * Wye. + */ + Y, + /** + * ZigZag. + */ + Z, + /** + * Wye, with neutral brought out for grounding. + */ + Yn, + /** + * ZigZag, with neutral brought out for grounding. + */ + Zn, + /** + * Autotransformer common winding. + */ + A, + /** + * Independent winding, for single-phase connections. + */ + I, + }; + + WindingConnection() : value(), initialized(false) {} + WindingConnection(WindingConnection_ENUM value) : value(value), initialized(true) {} + + WindingConnection& operator=(WindingConnection_ENUM rop); + operator WindingConnection_ENUM() const; + + WindingConnection_ENUM value; + bool initialized; + + static const char debugName[]; + const char* debugString() const; + + friend std::istream& operator>>(std::istream& lop, WindingConnection& rop); + friend std::ostream& operator<<(std::ostream& os, const WindingConnection& obj); + }; +} +#endif diff --git a/CGMES_3.0.0/WorkLocation.cpp b/CGMES_3.0.0/WorkLocation.cpp new file mode 100644 index 000000000..515f2edd8 --- /dev/null +++ b/CGMES_3.0.0/WorkLocation.cpp @@ -0,0 +1,47 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "WorkLocation.hpp" + +#include +#include + + +using namespace CIMPP; + +WorkLocation::WorkLocation() {}; +WorkLocation::~WorkLocation() {}; + + + +const char WorkLocation::debugName[] = "WorkLocation"; +const char* WorkLocation::debugString() const +{ + return WorkLocation::debugName; +} + +void WorkLocation::addConstructToMap(std::unordered_map& factory_map) +{ + factory_map.insert(std::make_pair(std::string("cim:WorkLocation"), &WorkLocation_factory)); +} + +void WorkLocation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +void WorkLocation::addClassAssignFnsToMap(std::unordered_map& assign_map) +{ +} + +const BaseClassDefiner WorkLocation::declare() +{ + return BaseClassDefiner(WorkLocation::addConstructToMap, WorkLocation::addPrimitiveAssignFnsToMap, WorkLocation::addClassAssignFnsToMap, WorkLocation::debugName); +} + +namespace CIMPP +{ + BaseClass* WorkLocation_factory() + { + return new WorkLocation; + } +} diff --git a/CGMES_3.0.0/WorkLocation.hpp b/CGMES_3.0.0/WorkLocation.hpp new file mode 100644 index 000000000..c3d65a5cc --- /dev/null +++ b/CGMES_3.0.0/WorkLocation.hpp @@ -0,0 +1,39 @@ +#ifndef WorkLocation_H +#define WorkLocation_H +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include +#include + +#include "Location.hpp" +#include "BaseClassDefiner.hpp" + +namespace CIMPP +{ + + /* + Information about a particular location for various forms of work. + */ + class WorkLocation : public Location + { + public: + /* constructor initialising all attributes to null */ + WorkLocation(); + ~WorkLocation() override; + + + static const char debugName[]; + const char* debugString() const override; + + static void addConstructToMap(std::unordered_map& factory_map); + static void addPrimitiveAssignFnsToMap(std::unordered_map& assign_map); + static void addClassAssignFnsToMap(std::unordered_map& assign_map); + static const BaseClassDefiner declare(); + }; + + BaseClass* WorkLocation_factory(); +} +#endif diff --git a/CMakeLists.txt b/CMakeLists.txt index 095d68c4e..431d1536d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,12 @@ if(USE_CIM_VERSION STREQUAL "CGMES_2.4.15_27JAN2020") elseif(USE_CIM_VERSION STREQUAL "CGMES_2.4.15_16FEB2016") set(CGMES_BUILD ON) set(CIM_NAME "CGMES 2_4_15 16_02_2016") +elseif(USE_CIM_VERSION STREQUAL "CGMES_2.4.13_18DEC2013") + set(CGMES_BUILD ON) + set(CIM_NAME "CGMES_2_4_13 18_12_2013") +elseif(USE_CIM_VERSION STREQUAL "CGMES_3.0.0") + set(CGMES_BUILD ON) + set(CIM_NAME "CGMES_3_0_0") else() message(FATAL_ERROR "${USE_CIM_VERSION} is an invalid value for USE_CIM_VERSION") endif() diff --git a/README.md b/README.md index cd2e5c77c..e75f373c0 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,24 @@ -libcimpp -======== +# libcimpp + libcimpp is a deserialiser library for C++ objects from XML/RDF documents based on the Common Information Model (CIM) standards (i.e. IEC61970/61968/62325) and CGMES for the energy sector. It is part of the CIM++ project. More on CIM++ can be found [here](http://rdcu.be/vOop). Supported CIM / CGMES versions: -- [CGMES_2.4.15_27JAN2020](https://sogno-platform.github.io/libcimpp/CGMES_2.4.15_27JAN2020/annotated.html) + ++ [CGMES_2.4.13_18DEC2013](https://sogno-platform.github.io/libcimpp/CGMES_2.4.13_18DEC2013/annotated.html) ++ [CGMES_2.4.15_16FEB2016](https://sogno-platform.github.io/libcimpp/CGMES_2.4.15_16FEB2016/annotated.html) ++ [CGMES_2.4.15_27JAN2020](https://sogno-platform.github.io/libcimpp/CGMES_2.4.15_27JAN2020/annotated.html) ++ [CGMES_3.0.0](https://sogno-platform.github.io/libcimpp/CGMES_3.0.0/annotated.html) ## General information + limcimpp uses [arabica](http://www.jezuk.co.uk/cgi-bin/view/arabica) as cross platform wrapper around one of the XML parsers listed in the dependencies (see below). It is recommended to use libcimpp as cmake module. ## Dependencies + You need following software packages for libcimpp: + + One of the following XML parsers: + [libxml2](http://www.xmlsoft.org/) (usually chosen under Linux and often can be installed as a package of the used distribution) + [Xerces](http://xerces.apache.org/xerces-c/) @@ -19,24 +26,26 @@ You need following software packages for libcimpp: + Build system: + [cmake](https://cmake.org/) - ## Build instructions ### UNIX / Linux / MacOS After getting the Git repository, create a build subdirectory and change into it: + ```bash mkdir build cd build ``` For building libcimpp with the default CIM version, type: + ```bash cmake .. make -j 4 ``` For building libcimpp with a certain CIM version (e.g. `CGMES_2.4.15_27JAN2020`), type: + ```bash cmake .. -DUSE_CIM_VERSION=CGMES_2.4.15_27JAN2020 make -j 4 @@ -45,11 +54,12 @@ make -j 4 All available CIM versions are listed in the [CMakeLists.txt](CMakeLists.txt) ### Windows with MS Visual Studio + 1. After getting the Git repository, create a `build` subdirectory. 2. Run the Windows CMake (GUI) 3. Set the -* source code directory, e.g.: `C:/git/libcimpp` -* build directory, e.g.: `C:/git/libcimpp/build` + + source code directory, e.g.: `C:/git/libcimpp` + + build directory, e.g.: `C:/git/libcimpp/build` 4. Click on `Configure` and choose the Visual Studio project version, e.g.: `Visual Studio 15 2017` 5. Click on `Finish` and wait while CMake is configuring the project. 6. Click on `Generate` to generate the Visual Studio project files. @@ -57,10 +67,17 @@ All available CIM versions are listed in the [CMakeLists.txt](CMakeLists.txt) 8. In Visual Studio's main menu choose `Build -> Build Solution`. This will build the `libcimpp` library. ## Usage of the libcimpp library + For information on how to use the library please see the cmake based example in examples/cmake. Building the example is just like building the library itself using cmake. + +```bash +cmake .. -DCIMPP_BUILD_EXAMPLES=ON +make -j 4 +``` + The make example is currently not supported due to the lack of an install target for arabica. ## License -This project is released under the terms of the [Apache License 2.0](./LICENSE). \ No newline at end of file +This project is released under the terms of the [Apache License 2.0](./LICENSE).