14 #include <dpsim-models/Components.h>
15 #include <dpsim-models/Definitions.h>
16 #include <dpsim-models/Filesystem.h>
17 #include <dpsim-models/Logger.h>
18 #include <dpsim-models/SimNode.h>
19 #include <dpsim-models/SimPowerComp.h>
20 #include <dpsim-models/SimTerminal.h>
21 #include <dpsim-models/SystemTopology.h>
38 #include <UnitMultiplier.hpp>
43 class SynchronousMachine;
44 class ExternalNetworkInjection;
46 class PowerTransformer;
47 class EquivalentShunt;
48 class TopologicalNode;
49 class ConductingEquipment;
52 #include <CIMNamespaces.hpp>
64 Logger::Level mComponentLogLevel;
68 IdentifiedObject::List mComponents;
77 GeneratorType mGeneratorType;
84 std::map<String, TopologicalNode::Ptr> mPowerflowNodes;
86 std::map<String, TopologicalPowerComp::Ptr> mPowerflowEquipment;
88 std::map<String, TopologicalTerminal::Ptr> mPowerflowTerminals;
90 Bool mUseProtectionSwitches =
false;
94 Bool mSetShuntCapacitor =
false;
96 Real mShuntCapacitorValue = -1;
98 Bool mSetShuntConductance =
false;
100 Real mShuntConductanceValue = 1e-6;
104 static Real unitValue(Real value, CIMPP::UnitMultiplier mult);
106 void processSvVoltage(CIMPP::SvVoltage *volt);
108 void processSvPowerFlow(CIMPP::SvPowerFlow *flow);
110 template <
typename VarType>
111 void processTopologicalNode(CIMPP::TopologicalNode *topNode);
113 void addFiles(
const fs::path &filename);
115 void addFiles(
const std::list<fs::path> &filenames);
125 Matrix::Index mapTopologicalNode(String mrid);
127 TopologicalPowerComp::Ptr mapComponent(BaseClass *obj);
131 TopologicalPowerComp::Ptr mapACLineSegment(CIMPP::ACLineSegment *line);
133 TopologicalPowerComp::Ptr mapPowerTransformer(CIMPP::PowerTransformer *trans);
137 TopologicalPowerComp::Ptr
138 mapSynchronousMachine(CIMPP::SynchronousMachine *machine);
143 TopologicalPowerComp::Ptr mapEnergyConsumer(CIMPP::EnergyConsumer *consumer);
145 TopologicalPowerComp::Ptr
146 mapExternalNetworkInjection(CIMPP::ExternalNetworkInjection *extnet);
148 TopologicalPowerComp::Ptr mapEquivalentShunt(CIMPP::EquivalentShunt *shunt);
152 Real determineBaseVoltageAssociatedWithEquipment(
153 CIMPP::ConductingEquipment *equipment);
158 Reader(String name, Logger::Level logLevel = Logger::Level::info,
159 Logger::Level componentLogLevel = Logger::Level::off);
165 Domain domain = Domain::DP,
166 PhaseType phase = PhaseType::Single,
167 GeneratorType genType = GeneratorType::None);
170 const std::list<fs::path> &filenames,
171 Domain domain = Domain::DP,
172 PhaseType phase = PhaseType::Single,
173 GeneratorType genType = GeneratorType::None);
176 const std::list<CPS::String> &filenamesString,
177 Domain domain = Domain::DP,
178 PhaseType phase = PhaseType::Single,
179 GeneratorType genType = GeneratorType::None);
192 #if defined(BASECLASS_H) && !defined(READER_CPP)
193 #error "Do not include CIMpp headers into CPS/DPsim headers!"
void setShuntConductance(Real v)
set shunt conductance value
SystemTopology loadCIM(Real systemFrequency, const fs::path &filename, Domain domain=Domain::DP, PhaseType phase=PhaseType::Single, GeneratorType genType=GeneratorType::None)
Parses data from CIM files into the CPS data structure.
void useProtectionSwitches(Bool value=true)
If set, some components like loads include protection switches.
Reader(String name, Logger::Level logLevel=Logger::Level::info, Logger::Level componentLogLevel=Logger::Level::off)
void setShuntCapacitor(Real v)
set shunt capacitor value