Commit 5ad5ba97 authored by Markus Mirz's avatar Markus Mirz
Browse files

support CGMES version of CIMPP

parent 3e8c80f6
......@@ -12,22 +12,34 @@ before_script:
stages:
- prepare
- build
- compile
- test
- generate
- deploy
docker:fedora:
.docker-fedora-template: &docker-fedora-template
stage: prepare
needs: []
script:
- docker build
--file Packaging/Docker/Dockerfile.dev
--tag ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}:latest .
${TAGS}
${BUILD_ARGS} .
tags:
- shell
- linux
docker:fedora:
<<: *docker-fedora-template
variables:
TAGS: --tag ${DOCKER_IMAGE_DEV}:${CI_COMMIT_REF_NAME} --tag ${DOCKER_IMAGE_DEV}:latest
docker:fedora-cgmes:
<<: *docker-fedora-template
variables:
TAGS: --tag ${DOCKER_IMAGE_DEV}:${CI_COMMIT_REF_NAME}-CGMES_2.4.15_16FEB2016
BUILD_ARGS: --build-arg CIM_VERSION=CGMES_2.4.15_16FEB2016
docker:centos:
stage: prepare
needs: []
......@@ -40,20 +52,6 @@ docker:centos:
- shell
- linux
#docker:jupyter:
# stage: prepare
# needs: []
# script:
# - docker build
# --file Packaging/Docker/Dockerfile.jupyter
# --build-arg DOCKER_IMAGE=${DOCKER_IMAGE_DEV}
# --build-arg DOCKER_TAG=${DOCKER_TAG}
# --tag ${DOCKER_IMAGE_DEV}-jupyter:${DOCKER_TAG}
# --tag ${DOCKER_IMAGE_DEV}-jupyter:latest .
# tags:
# - shell
# - linux
build:linux:
stage: build
needs: ["docker:fedora"]
......@@ -73,13 +71,32 @@ build:linux:
tags:
- docker
build:linux-cgmes:
stage: build
needs: ["docker:fedora-cgmes"]
script:
- mkdir -p build
- cd build
- cmake -DCIM_VERSION=CGMES_2.4.15_16FEB2016 ..
- make -j 32
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}-CGMES_2.4.15_16FEB2016
cache:
paths:
- build
key: build-linux-cgmes
artifacts:
paths:
- build
tags:
- docker
build:linux-profiling:
stage: build
needs: ["docker:centos"]
script:
- mkdir -p build
- cd build
- cmake -DWITH_PROFILING=ON -DWITH_ASAN=ON -DWITH_CUDA=OFF -DWITH_SPDLOG_SUBMODULE=ON ..
- cmake -DWITH_PROFILING=ON -DWITH_ASAN=ON -DWITH_CUDA=OFF -DWITH_SPDLOG_SUBMODULE=ON ..
- make -j 32
image: ${DOCKER_IMAGE_DEV}-centos:${DOCKER_TAG}
cache:
......@@ -128,6 +145,25 @@ build:windows:
- build
key: build-win10
build:docker:
stage: build
needs: []
script:
- docker build
--file Packaging/Docker/Dockerfile
--build-arg DOCKER_TAG=${DOCKER_TAG}
--build-arg CI=1
--build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA}
--build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
--build-arg CI_COMMIT_TAG=${CI_COMMIT_TAG}
--tag ${DOCKER_IMAGE}:${DOCKER_TAG}
--tag ${DOCKER_IMAGE}:latest .
tags:
- shell
- linux
only:
- tags
#build:macos:
# stage: build
# script:
......@@ -200,25 +236,6 @@ generate:packages:
- build/*.rpm
- build/*.tar.gz
build:docker:
stage: build
needs: []
script:
- docker build
--file Packaging/Docker/Dockerfile
--build-arg DOCKER_TAG=${DOCKER_TAG}
--build-arg CI=1
--build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA}
--build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
--build-arg CI_COMMIT_TAG=${CI_COMMIT_TAG}
--tag ${DOCKER_IMAGE}:${DOCKER_TAG}
--tag ${DOCKER_IMAGE}:latest .
tags:
- shell
- linux
only:
- tags
test:jupyter:
stage: test
needs: ["build:linux"]
......@@ -226,9 +243,25 @@ test:jupyter:
PYTHONPATH: "build/Source/Python:Source/Python"
script:
- pytest -v Examples/Notebooks
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
dependencies:
- build:linux
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
tags:
- docker
artifacts:
paths:
- outputs/Examples/Notebooks/
test:jupyter-cgmes:
stage: test
needs: ["build:linux-cgmes"]
variables:
PYTHONPATH: "build/Source/Python:Source/Python"
script:
- pytest -v Examples/Notebooks
dependencies:
- build:linux-cgmes
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}-CGMES_2.4.15_16FEB2016
tags:
- docker
artifacts:
......
......@@ -72,6 +72,7 @@ option(WITH_CIM_SUBMODULE "Build with CIMpp as submodule" OFF)
option(WITH_PROFILING "Add `-pg` profiling flag to compiliation" OFF)
option(WITH_ASAN "Adds compiler flags to use the address sanitizer" OFF)
option(WITH_TSAN "Adds compiler flags to use the thread sanitizer" OFF)
option(CGMES_BUILD "Build with CGMES instead of CIM" OFF)
find_package(Threads REQUIRED)
......
......@@ -65,8 +65,5 @@ int main(int argc, char *argv[]) {
sim.addLogger(logger);
sim.run();
sim.addLogger(logger);
sim.run();
return 0;
}
......@@ -25,6 +25,7 @@
#cmakedefine WITH_SUNDIALS
#cmakedefine WITH_OPENMP
#cmakedefine WITH_CUDA
#cmakedefine CGMES_BUILD
#cmakedefine HAVE_TIMERFD
#cmakedefine HAVE_PIPE
......
......@@ -5,6 +5,7 @@ ARG CI
ARG CI_COMMIT_SHA
ARG CI_COMMIT_REF_NAME
ARG CI_COMMIT_TAG
ARG CIM_VERSION
FROM ${BUILDER_IMAGE}:${DOCKER_TAG}
......@@ -29,4 +30,4 @@ LABEL \
org.label-schema.author.name = "Markus Mirz" \
org.label-schema.author.email = "mmirz@eonerc.rwth-aachen.de" \
org.label-schema.url = "http://fein-aachen.org/projects/dpsim/" \
org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"
\ No newline at end of file
org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"
FROM fedora:32
ARG VILLAS_VERSION=0.8.0
ARG CIM_VERSION=IEC61970_16v29a
LABEL \
org.label-schema.schema-version = "1.0" \
......@@ -82,11 +83,15 @@ RUN dnf -y install \
libconfig-devel \
libnl3-devel
# Python dependencies
ADD requirements.txt .
RUN pip3 install -r requirements.txt
# Install CIMpp from source
RUN cd /tmp && \
git clone --recursive https://github.com/CIM-IEC/libcimpp.git && \
mkdir -p libcimpp/build && cd libcimpp/build && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=IEC61970_16v29a -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=${CIM_VERSION} -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
rm -rf /tmp/libcimpp
# Install VILLAS from source
......@@ -96,10 +101,6 @@ RUN cd /tmp && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make -j$(nproc) install && \
rm -rf /tmp/villasnode
# Python dependencies
ADD requirements.txt .
RUN pip3 install -r requirements.txt
# Remove this part in the future and use dedicated jupyter Dockerfile
# Activate Jupyter extensions
ADD requirements-jupyter.txt .
......
set(CIM_VERSION "16v29a")
set(USE_CIM_VERSION "IEC61970_16v29a")
if(NOT CIM_VERSION)
set(CIM_VERSION "16v29a")
endif()
message(STATUS "CIM Version: ${CIM_VERSION}")
if(CIM_VERSION STREQUAL "16v29a")
set(USE_CIM_VERSION "IEC61970_16v29a")
endif()
if(CIM_VERSION STREQUAL "CGMES_2.4.15_16FEB2016")
set(USE_CIM_VERSION "CGMES_2.4.15_16FEB2016")
set(CGMES_BUILD ON)
endif()
find_path(CIMPP_INCLUDE_DIR
NAMES CIMModel.hpp
......
# Workaround for cimpp on Windows and as submodule
set(CIM_VERSION "16v29a")
set(USE_CIM_VERSION "IEC61970_16v29a")
if(NOT CIM_VERSION)
set(CIM_VERSION "16v29a")
endif()
message(STATUS "CIM Version: ${CIM_VERSION}")
if(CIM_VERSION STREQUAL "16v29a")
set(USE_CIM_VERSION "IEC61970_16v29a")
endif()
if(CIM_VERSION STREQUAL "CGMES_2.4.15_16FEB2016")
set(USE_CIM_VERSION "CGMES_2.4.15_16FEB2016")
set(CGMES_BUILD ON)
endif()
include(FetchContent)
FetchContent_Declare(
......
......@@ -11,6 +11,7 @@
#include <map>
#include <list>
#include <experimental/filesystem>
#include <cps/Definitions.h>
#include <cps/SimPowerComp.h>
#include <cps/Components.h>
......@@ -23,42 +24,34 @@
*
* DO NOT INCLUDE ANY CIM++ Headers here!
*
* CIM++ consists over 600 Headers files.
* CIM++ has more than 600 Headers files.
* Including them here will also include them in <DPsim.h>
* Which will have a huge impact on compile time!
*
* Use forward declarations instead!
*/
#include <IEC61970/Base/Domain/UnitMultiplier.h>
/* Forward declarations */
class CIMModel;
class BaseClass;
namespace IEC61970 {
namespace Base {
namespace StateVariables {
class SvVoltage;
class SvPowerFlow;
};
namespace Wires {
class ACLineSegment;
class SynchronousMachine;
class ExternalNetworkInjection;
class EnergyConsumer;
class PowerTransformer;
};
namespace Equivalents {
class EquivalentShunt;
}
namespace Topology {
class TopologicalNode;
};
namespace Core {
class ConductingEquipment;
};
};
#ifdef CGMES_BUILD
#include <UnitMultiplier.hpp>
namespace CIMPP {
class SvVoltage;
class SvPowerFlow;
class ACLineSegment;
class SynchronousMachine;
class ExternalNetworkInjection;
class EnergyConsumer;
class PowerTransformer;
class EquivalentShunt;
class TopologicalNode;
class ConductingEquipment;
};
#else
#include <CIMNamespaces.hpp>
#endif
namespace CPS {
namespace CIM {
......@@ -107,16 +100,16 @@ namespace CIM {
// #### General Functions ####
/// Resolves unit multipliers.
static Real unitValue(Real value, IEC61970::Base::Domain::UnitMultiplier mult);
static Real unitValue(Real value, CIMPP::UnitMultiplier mult);
///
Matrix singlePhaseParameterToThreePhase(Real parameter);
///
void processSvVoltage(IEC61970::Base::StateVariables::SvVoltage* volt);
void processSvVoltage(CIMPP::SvVoltage* volt);
///
void processSvPowerFlow(IEC61970::Base::StateVariables::SvPowerFlow* flow);
void processSvPowerFlow(CIMPP::SvPowerFlow* flow);
///
template<typename VarType>
void processTopologicalNode(IEC61970::Base::Topology::TopologicalNode* topNode);
void processTopologicalNode(CIMPP::TopologicalNode* topNode);
///
void addFiles(const std::experimental::filesystem::path &filename);
/// Adds CIM files to list of files to be parsed.
......@@ -136,26 +129,27 @@ namespace CIM {
/// Returns an RX-Line.
/// The voltage should be given in kV and the angle in degree.
/// TODO: Introduce different models such as PI and wave model.
TopologicalPowerComp::Ptr mapACLineSegment(IEC61970::Base::Wires::ACLineSegment* line);
TopologicalPowerComp::Ptr mapACLineSegment(CIMPP::ACLineSegment* line);
/// Returns a transformer, either ideal or with RL elements to model losses.
TopologicalPowerComp::Ptr mapPowerTransformer(IEC61970::Base::Wires::PowerTransformer *trans);
TopologicalPowerComp::Ptr mapPowerTransformer(CIMPP::PowerTransformer *trans);
/// Returns an IdealVoltageSource with voltage setting according to load flow data
/// at machine terminals. The voltage should be given in kV and the angle in degree.
/// TODO: Introduce real synchronous generator models here.
TopologicalPowerComp::Ptr mapSynchronousMachine(IEC61970::Base::Wires::SynchronousMachine* machine);
TopologicalPowerComp::Ptr mapSynchronousMachine(CIMPP::SynchronousMachine* machine);
/// Returns an PQload with voltage setting according to load flow data.
/// Currently the only option is to create an RL-load.
/// The voltage should be given in kV and the angle in degree.
/// TODO: Introduce real PQload model here.
TopologicalPowerComp::Ptr mapEnergyConsumer(IEC61970::Base::Wires::EnergyConsumer* consumer);
TopologicalPowerComp::Ptr mapEnergyConsumer(CIMPP::EnergyConsumer* consumer);
/// Returns an external grid injection.
TopologicalPowerComp::Ptr mapExternalNetworkInjection(IEC61970::Base::Wires::ExternalNetworkInjection* extnet);
TopologicalPowerComp::Ptr mapExternalNetworkInjection(CIMPP::ExternalNetworkInjection* extnet);
/// Returns a shunt
TopologicalPowerComp::Ptr mapEquivalentShunt(IEC61970::Base::Equivalents::EquivalentShunt *shunt);
TopologicalPowerComp::Ptr mapEquivalentShunt(CIMPP::EquivalentShunt *shunt);
// #### Helper Functions ####
/// Determine base voltage associated with object
Real determineBaseVoltageAssociatedWithEquipment(IEC61970::Base::Core::ConductingEquipment* equipment);
Real determineBaseVoltageAssociatedWithEquipment(CIMPP::ConductingEquipment* equipment);
public:
///
enum GeneratorType{Static, Transient};
......@@ -203,8 +197,6 @@ namespace CIM {
}
}
// Allow inclusion of CIMpp headers only from Reader.cpp
// For performance reasons
#if defined(BASECLASS_H) && !defined(READER_CPP)
#error "Do not include CIMpp headers into CPS/DPsim headers!"
#endif
......@@ -13,4 +13,5 @@
#cmakedefine WITH_PYTHON
#cmakedefine WITH_GRAPHVIZ
#cmakedefine WITH_SUNDIALS
#cmakedefine WITH_NUMPY
\ No newline at end of file
#cmakedefine WITH_NUMPY
#cmakedefine CGMES_BUILD
\ No newline at end of file
......@@ -8,19 +8,15 @@
#include <CIMModel.hpp>
#include <IEC61970.hpp>
#include <memory>
#include <CIMExceptions.hpp>
#include <memory>
#define READER_CPP
#include <cps/CIM/Reader.h>
using namespace CPS;
using namespace CPS::CIM;
using namespace IEC61970::Base::Core;
using namespace IEC61970::Base::Domain;
using namespace IEC61970::Base::Equivalents;
using namespace IEC61970::Base::Wires;
using namespace IEC61970::Base::StateVariables;
using CIMPP::UnitMultiplier;
namespace fs = std::experimental::filesystem;
......@@ -36,7 +32,7 @@ Reader::~Reader() {
delete mModel;
}
Real Reader::unitValue(Real value, UnitMultiplier mult) {
Real Reader::unitValue(Real value, CIMPP::UnitMultiplier mult) {
switch (mult) {
case UnitMultiplier::p:
value *= 1e-12;
......@@ -75,17 +71,17 @@ Real Reader::unitValue(Real value, UnitMultiplier mult) {
}
TopologicalPowerComp::Ptr Reader::mapComponent(BaseClass* obj) {
if (ACLineSegment *line = dynamic_cast<ACLineSegment*>(obj))
if (CIMPP::ACLineSegment *line = dynamic_cast<CIMPP::ACLineSegment*>(obj))
return mapACLineSegment(line);
if (EnergyConsumer *consumer = dynamic_cast<EnergyConsumer*>(obj))
if (CIMPP::EnergyConsumer *consumer = dynamic_cast<CIMPP::EnergyConsumer*>(obj))
return mapEnergyConsumer(consumer);
if (PowerTransformer *trans = dynamic_cast<PowerTransformer*>(obj))
if (CIMPP::PowerTransformer *trans = dynamic_cast<CIMPP::PowerTransformer*>(obj))
return mapPowerTransformer(trans);
if (SynchronousMachine *syncMachine = dynamic_cast<SynchronousMachine*>(obj))
if (CIMPP::SynchronousMachine *syncMachine = dynamic_cast<CIMPP::SynchronousMachine*>(obj))
return mapSynchronousMachine(syncMachine);
if (ExternalNetworkInjection *extnet = dynamic_cast<ExternalNetworkInjection*>(obj))
if (CIMPP::ExternalNetworkInjection *extnet = dynamic_cast<CIMPP::ExternalNetworkInjection*>(obj))
return mapExternalNetworkInjection(extnet);
if (EquivalentShunt *shunt = dynamic_cast<EquivalentShunt*>(obj))
if (CIMPP::EquivalentShunt *shunt = dynamic_cast<CIMPP::EquivalentShunt*>(obj))
return mapEquivalentShunt(shunt);
return nullptr;
}
......@@ -121,7 +117,7 @@ void Reader::parseFiles() {
mSLog->info("#### List of TopologicalNodes, associated Terminals and Equipment");
for (auto obj : mModel->Objects) {
if (IEC61970::Base::Topology::TopologicalNode* topNode = dynamic_cast<IEC61970::Base::Topology::TopologicalNode*>(obj)) {
if (CIMPP::TopologicalNode* topNode = dynamic_cast<CIMPP::TopologicalNode*>(obj)) {
if (mDomain == Domain::EMT)
processTopologicalNode<Real>(topNode);
else
......@@ -134,11 +130,11 @@ void Reader::parseFiles() {
mSLog->info("#### List of Node voltages and Terminal power flow data");
for (auto obj : mModel->Objects) {
// Check if object is of class SvVoltage
if (SvVoltage* volt = dynamic_cast<SvVoltage*>(obj)) {
if (CIMPP::SvVoltage* volt = dynamic_cast<CIMPP::SvVoltage*>(obj)) {
processSvVoltage(volt);
}
// Check if object is of class SvPowerFlow
else if (SvPowerFlow* flow = dynamic_cast<SvPowerFlow*>(obj)) {
else if (CIMPP::SvPowerFlow* flow = dynamic_cast<CIMPP::SvPowerFlow*>(obj)) {
processSvPowerFlow(flow);
}
}
......@@ -147,11 +143,11 @@ void Reader::parseFiles() {
for (auto obj : mModel->Objects) {
// Check if object is not TopologicalNode, SvVoltage or SvPowerFlow
if (!dynamic_cast<IEC61970::Base::Topology::TopologicalNode*>(obj)
&& !dynamic_cast<SvVoltage*>(obj)
&& !dynamic_cast<SvPowerFlow*>(obj)) {
if (!dynamic_cast<CIMPP::TopologicalNode*>(obj)
&& !dynamic_cast<CIMPP::SvVoltage*>(obj)
&& !dynamic_cast<CIMPP::SvPowerFlow*>(obj)) {
if (IEC61970::Base::Core::IdentifiedObject* idObj = dynamic_cast<IEC61970::Base::Core::IdentifiedObject*>(obj)) {
if (CIMPP::IdentifiedObject* idObj = dynamic_cast<CIMPP::IdentifiedObject*>(obj)) {
// Check if object is already in equipment list
if (mPowerflowEquipment.find(idObj->mRID) == mPowerflowEquipment.end()) {
......@@ -202,8 +198,8 @@ SystemTopology Reader::loadCIM(Real systemFrequency, const std::list<fs::path> &
return systemTopology();
}
void Reader::processSvVoltage(SvVoltage* volt) {
IEC61970::Base::Topology::TopologicalNode* node = volt->TopologicalNode;
void Reader::processSvVoltage(CIMPP::SvVoltage* volt) {
CIMPP::TopologicalNode* node = volt->TopologicalNode;
if (!node) {
mSLog->warn("SvVoltage references missing Topological Node, ignoring");
return;
......@@ -234,8 +230,8 @@ void Reader::processSvVoltage(SvVoltage* volt) {
);
}
void Reader::processSvPowerFlow(SvPowerFlow* flow) {
IEC61970::Base::Core::Terminal* term = flow->Terminal;
void Reader::processSvPowerFlow(CIMPP::SvPowerFlow* flow) {
CIMPP::Terminal* term = flow->Terminal;
mPowerflowTerminals[term->mRID]->setPower(
Complex(Reader::unitValue(flow->p.value, UnitMultiplier::M),
......@@ -288,7 +284,7 @@ Matrix::Index Reader::mapTopologicalNode(String mrid) {
return search->second->matrixNodeIndex();
}
TopologicalPowerComp::Ptr Reader::mapEnergyConsumer(EnergyConsumer* consumer) {
TopologicalPowerComp::Ptr Reader::mapEnergyConsumer(CIMPP::EnergyConsumer* consumer) {
mSLog->info(" Found EnergyConsumer {}", consumer->name);
if (mDomain == Domain::EMT) {
if (mPhase == PhaseType::ABC) {
......@@ -327,7 +323,7 @@ TopologicalPowerComp::Ptr Reader::mapEnergyConsumer(EnergyConsumer* consumer) {
}
}
TopologicalPowerComp::Ptr Reader::mapACLineSegment(ACLineSegment* line) {
TopologicalPowerComp::Ptr Reader::mapACLineSegment(CIMPP::ACLineSegment* line) {
mSLog->info(" Found ACLineSegment {} r={} x={} bch={} gch={}", line->name,
(float) line->r.value,
(float) line->x.value,
......@@ -382,7 +378,7 @@ TopologicalPowerComp::Ptr Reader::mapACLineSegment(ACLineSegment* line) {
}
TopologicalPowerComp::Ptr Reader::mapPowerTransformer(PowerTransformer* trans) {
TopologicalPowerComp::Ptr Reader::mapPowerTransformer(CIMPP::PowerTransformer* trans) {
if (trans->PowerTransformerEnd.size() != 2) {
mSLog->warn("PowerTransformer {} does not have exactly two windings, ignoring", trans->name);
return nullptr;
......@@ -390,7 +386,7 @@ TopologicalPowerComp::Ptr Reader::mapPowerTransformer(PowerTransformer* trans) {
mSLog->info("Found PowerTransformer {}", trans->name);
// assign transformer ends
PowerTransformerEnd* end1 = nullptr, *end2 = nullptr;
CIMPP::PowerTransformerEnd* end1 = nullptr, *end2 = nullptr;
for (auto end : trans->PowerTransformerEnd) {
if (end->Terminal->sequenceNumber == 1) end1 = end;
else if (end->Terminal->sequenceNumber == 2) end2 = end;
......@@ -445,7 +441,7 @@ TopologicalPowerComp::Ptr Reader::mapPowerTransformer(PowerTransformer* trans) {
// if corresponding SvTapStep available, use instead tap position from there
if (end1->RatioTapChanger) {
for (auto obj : mModel->Objects) {
auto tapStep = dynamic_cast<IEC61970::Base::StateVariables::SvTapStep*>(obj);
auto tapStep = dynamic_cast<CIMPP::SvTapStep*>(obj);
if (tapStep && tapStep->TapChanger == end1->RatioTapChanger) {
ratioAbs = voltageNode1 / voltageNode2 * (1 + (tapStep->position - end1->RatioTapChanger->neutralStep) * end1->RatioTapChanger->stepVoltageIncrement.value / 100);
}
......@@ -504,7 +500,7 @@ TopologicalPowerComp::Ptr Reader::mapPowerTransformer(PowerTransformer* trans) {
}
}
TopologicalPowerComp::Ptr Reader::mapSynchronousMachine(SynchronousMachine* machine) {
TopologicalPowerComp::Ptr Reader::mapSynchronousMachine(CIMPP::SynchronousMachine* machine) {
mSLog->info(" Found Synchronous machine {}", machine->name);
if (mGeneratorType == GeneratorType::Transient) {
......@@ -515,8 +511,8 @@ TopologicalPowerComp::Ptr Reader::mapSynchronousMachine(SynchronousMachine* mach
for (auto obj : mModel->Objects) {
// Check if object is not TopologicalNode, SvVoltage or SvPowerFlow
if (IEC61970::Dynamics::StandardModels::SynchronousMachineDynamics::SynchronousMachineTimeConstantReactance* genDyn =
dynamic_cast<IEC61970::Dynamics::StandardModels::SynchronousMachineDynamics::SynchronousMachineTimeConstantReactance*>(obj)) {
if (CIMPP::SynchronousMachineTimeConstantReactance* genDyn =
dynamic_cast<CIMPP::SynchronousMachineTimeConstantReactance*>(obj)) {
if (genDyn->SynchronousMachine->mRID == machine->mRID) {
directTransientReactance = genDyn->xDirectTrans.value;
inertiaCoefficient = genDyn->inertia.value;
......@@ -535,8 +531,8 @@ TopologicalPowerComp::Ptr Reader::mapSynchronousMachine(SynchronousMachine* mach
if (mDomain == Domain::SP) {
for (auto obj : mModel->Objects) {
if (IEC61970::Base::Generation::Production::GeneratingUnit* genUnit
= dynamic_cast<IEC61970::Base::Generation::Production::GeneratingUnit*>(obj))
if (CIMPP::GeneratingUnit* genUnit
= dynamic_cast<CIMPP::GeneratingUnit*>(obj))
{
for (auto syncGen : genUnit->RotatingMachine)
......@@ -589,7 +585,7 @@ TopologicalPowerComp::Ptr Reader::mapSynchronousMachine(SynchronousMachine* mach
}
}
TopologicalPowerComp::Ptr Reader::mapExternalNetworkInjection(ExternalNetworkInjection* extnet) {
TopologicalPowerComp::Ptr Reader::mapExternalNetworkInjection(CIMPP::ExternalNetworkInjection* extnet) {
mSLog->info("Found External Network Injection {}", extnet->name);
Real baseVoltage = determineBaseVoltageAssociatedWithEquipment(extnet);
......@@ -630,7 +626,7 @@ TopologicalPowerComp::Ptr Reader::mapExternalNetworkInjection(ExternalNetworkInj
}