diff --git a/docs/hugo/content/en/docs/Development/Guidelines.md b/docs/hugo/content/en/docs/Development/Guidelines.md index d74ff8cba1..7c9d8afeeb 100644 --- a/docs/hugo/content/en/docs/Development/Guidelines.md +++ b/docs/hugo/content/en/docs/Development/Guidelines.md @@ -7,7 +7,7 @@ This is a summary of general guidelines for the development of DPsim. ## Logging -There are two ways to log information in DPsim: The `CPS::Logger` (called the **Text Logger**), which can write to `.log` files and to the CLI, as well as the `DPsim::DataLogger` (called the **Data Logger**), which can write to `.csv` files. +There are two ways to log information in DPsim: The `CPS::Logger` (called the **Text Logger**), which can write to `.log` files and to the CLI, as well as the `CPS::DataLogger` (called the **Data Logger**), which can write to `.csv` files. ### Log Levels The log levels that can be used with the Text Logger are as follows: diff --git a/docs/hugo/content/en/docs/Overview/Attributes/index.md b/docs/hugo/content/en/docs/Overview/Attributes/index.md index cf36222e54..794f144f97 100644 --- a/docs/hugo/content/en/docs/Overview/Attributes/index.md +++ b/docs/hugo/content/en/docs/Overview/Attributes/index.md @@ -12,11 +12,11 @@ In general, attributes are instances of the `Attribute` class, but they are u Through the template parameter `T` of the `Attribute` class, attributes can have different value types, most commonly `Real`, `Complex`, `Matrix`, or `MatrixComp`. Additionally, attributes can fall into one of two categories: **Static** attributes have a fixed value which can only be changed explicitly through the attribute's `set`-method or through a mutable reference obtained through `get`. -**Dynamic** attributes on the other hand can dynamically re-compute their value from other attributes every time they are read. This can for example be used to create a scalar attribute of type `Real` whose value always contains the magnitude of another, different attribute of type `Complex`. +**Dynamic** attributes on the other hand can dynamically re-compute their value from other attributes every time they are read. This can for example be used to create a scalar attribute of type `Real` whose value always contains the magnitude of another, different attribute of type `Complex`. Any simulation component or class which inherits from `IdentifiedObject` contains an instance of an `AttributeList`. This list can be used to store all the attributes present in this component and later access them via a `String` instead of having to use the member variable directly. -For reasons of code clarity and runtime safety, the member variables should still be used whenever possible. +For reasons of code clarity and runtime safety, the member variables should still be used whenever possible. ## Creating and Storing Attributes Normally, a new attribute is created by using the `create` or `createDynamic` method of an `AttributeList` object. @@ -24,7 +24,7 @@ These two methods will create a new attribute of the given type and insert it in Afterwards, a pointer to the attribute is returned which can then be stored in a component's member variable. Usually this is done in the component's constructor in an initialization list: -```cpp +```cpp /// Component class Base::Ph1::PiLine public: @@ -53,7 +53,7 @@ Simulation::Simulation(String name, Logger::Level logLevel) : mTimeStep(AttributeStatic::make(0.001)), mSplitSubnets(AttributeStatic::make(true)), mSteadyStateInit(AttributeStatic::make(false)), - //... + //... { // ... } @@ -83,7 +83,7 @@ Real read3 = **attr; //read3 = 0.003 ``` ## Working with Dynamic Attributes -In general, dynamic attributes can be accessed via the same `get` and `set`-methods described above for static attributes. However, +In general, dynamic attributes can be accessed via the same `get` and `set`-methods described above for static attributes. However, dynamic attributes can additionally have **dependencies** on other attributes which affect the behavior of these methods. Usually, this is used to dynamically compute the attribute's value from the value of another attribute. In the simplest case, a dynamic attribute can be set to **reference** another (static or dynamic) attribute using the `setReference`-method. After this method has been called, @@ -150,7 +150,7 @@ required attribute pointer, one can either directly access the public member var auto r1 = DP::Ph1::Resistor::make("r_1"); r1->setParameters(5); -auto logger = DataLogger::make("simName"); +auto logger = CPS::DataLogger::make("simName"); // Access the attribute through the member variable logger->logAttribute("i12", r1->mIntfCurrent); @@ -187,4 +187,4 @@ void DP::Ph1::Inductor::mnaAddPostStepDependencies( } ``` Here, the MNA post step depends on the solution vector of the system, `leftVector`, and modifies `mIntfVoltage` and `mIntfCurrent`. -Therefore, this task needs to be scheduled after the system solution that computes `leftVector` and before tasks that require the voltage and current interface vectors of the inductance, e.g. the task logging these values. \ No newline at end of file +Therefore, this task needs to be scheduled after the system solution that computes `leftVector` and before tasks that require the voltage and current interface vectors of the inductance, e.g. the task logging these values. diff --git a/dpsim/include/dpsim/DataLogger.h b/dpsim-models/include/dpsim-models/DataLogger.h similarity index 92% rename from dpsim/include/dpsim/DataLogger.h rename to dpsim-models/include/dpsim-models/DataLogger.h index e8c7d82de9..5f03ed458c 100644 --- a/dpsim/include/dpsim/DataLogger.h +++ b/dpsim-models/include/dpsim-models/DataLogger.h @@ -12,15 +12,13 @@ #include #include -#include -#include #include #include #include #include #include -namespace DPsim { +namespace CPS { class DataLogger : public SharedFactory { @@ -35,10 +33,6 @@ namespace DPsim { std::map mAttributes; - void logDataLine(Real time, Real data); - void logDataLine(Real time, const Matrix& data); - void logDataLine(Real time, const MatrixComp& data); - public: typedef std::shared_ptr Ptr; typedef std::vector List; @@ -46,6 +40,11 @@ namespace DPsim { DataLogger(Bool enabled = true); DataLogger(String name, Bool enabled = true, UInt downsampling = 1); + void logDataLine(Real time, Real data); + void logDataLine(Real time, std::vector data); + void logDataLine(Real time, const Matrix& data); + void logDataLine(Real time, const MatrixComp& data); + void open(); void close(); void reopen() { @@ -78,7 +77,7 @@ namespace DPsim { for (auto attr : logger.mAttributes) { mAttributeDependencies.push_back(attr.second); } - mModifiedAttributes.push_back(Scheduler::external); + mModifiedAttributes.push_back(nullptr); //nullptr = Scheduler::external, but this cannot be used because the scheduler is not linked yet. } void execute(Real time, Int timeStepCount); diff --git a/dpsim-models/include/dpsim-models/MNASimPowerComp.h b/dpsim-models/include/dpsim-models/MNASimPowerComp.h index 00b9618548..7131f24edb 100644 --- a/dpsim-models/include/dpsim-models/MNASimPowerComp.h +++ b/dpsim-models/include/dpsim-models/MNASimPowerComp.h @@ -15,6 +15,9 @@ namespace CPS { Bool mHasPreStep; Bool mHasPostStep; + protected: + Real mSimulationTime; + public: using Type = VarType; using Ptr = std::shared_ptr>; diff --git a/dpsim-models/include/dpsim-models/TopologicalPowerComp.h b/dpsim-models/include/dpsim-models/TopologicalPowerComp.h index dc0de5bb4f..eda8231776 100644 --- a/dpsim-models/include/dpsim-models/TopologicalPowerComp.h +++ b/dpsim-models/include/dpsim-models/TopologicalPowerComp.h @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -33,6 +34,9 @@ namespace CPS { Logger::Log mSLog; /// Component logger control for internal variables Logger::Level mLogLevel; + // Data logger + DataLogger::Ptr mDataLogger; + /// Determine state of the simulation, e.g. to implement /// special behavior for components during initialization Behaviour mBehaviour = Behaviour::MNASimulation; @@ -50,13 +54,19 @@ namespace CPS { * std::max(Logger::Level::info, logLevel). But because of excessive * logging to Level::info that is currently infeasible. */ mSLog(Logger::get(Logger::LoggerType::COMPONENT, name, logLevel, std::max(Logger::Level::warn, logLevel))), - mLogLevel(logLevel) { } + mLogLevel(logLevel) { + mDataLogger = DataLogger::make(name + "_trace", logLevel == Logger::Level::trace); + } /// Basic constructor that takes name and log level and sets the UID to name as well TopologicalPowerComp(String name, Logger::Level logLevel = Logger::Level::off) : TopologicalPowerComp(name, name, logLevel) { } - /// Destructor - does not do anything - virtual ~TopologicalPowerComp() { } + /// Destructor + virtual ~TopologicalPowerComp() { + if (mDataLogger) { + mDataLogger->close(); + } + } /// Returns nodes connected to this component virtual TopologicalNode::List topologicalNodes() = 0; diff --git a/dpsim-models/src/CMakeLists.txt b/dpsim-models/src/CMakeLists.txt index 79334c602c..efea638215 100644 --- a/dpsim-models/src/CMakeLists.txt +++ b/dpsim-models/src/CMakeLists.txt @@ -1,5 +1,6 @@ add_library(dpsim-models STATIC Logger.cpp + DataLogger.cpp MathUtils.cpp Attribute.cpp TopologicalNode.cpp diff --git a/dpsim-models/src/DP/DP_Ph1_Capacitor.cpp b/dpsim-models/src/DP/DP_Ph1_Capacitor.cpp index 3ed716a2c2..460bbd7519 100644 --- a/dpsim-models/src/DP/DP_Ph1_Capacitor.cpp +++ b/dpsim-models/src/DP/DP_Ph1_Capacitor.cpp @@ -73,6 +73,18 @@ void DP::Ph1::Capacitor::mnaCompInitialize(Real omega, Real timeStep, Attribute< (**mIntfCurrent)(0, freq) = mEquivCond(freq,0) * (**mIntfVoltage)(0,freq) + mEquivCurrent(freq,0); } + #if defined(DEBUG_BUILD) + std::vector columns; + + for (UInt freq = 0; freq < mNumFreqs; freq++) { + columns.push_back("voltage_abs_" + freq); + columns.push_back("voltage_angle_" + freq); + } + + mDataLogger->open(); + mDataLogger->setColumnNames(columns); + #endif + SPDLOG_LOGGER_DEBUG(mSLog, "\n--- MNA initialization ---" "\nInitial voltage {:s}" @@ -240,6 +252,10 @@ void DP::Ph1::Capacitor::MnaPostStepHarm::execute(Real time, Int timeStepCount) void DP::Ph1::Capacitor::mnaCompUpdateVoltage(const Matrix& leftVector) { // v1 - v0 + #if defined(DEBUG_BUILD) + std::vector logData; + #endif + for (UInt freq = 0; freq < mNumFreqs; freq++) { (**mIntfVoltage)(0,freq) = 0; if (terminalNotGrounded(1)) @@ -247,8 +263,16 @@ void DP::Ph1::Capacitor::mnaCompUpdateVoltage(const Matrix& leftVector) { if (terminalNotGrounded(0)) (**mIntfVoltage)(0,freq) = (**mIntfVoltage)(0,freq) - Math::complexFromVectorElement(leftVector, matrixNodeIndex(0), mNumFreqs, freq); - SPDLOG_LOGGER_TRACE(mSLog, "Voltage {:e}<{:e}", std::abs((**mIntfVoltage)(0,freq)), std::arg((**mIntfVoltage)(0,freq))); + #if defined(DEBUG_BUILD) + logData.push_back(std::abs((**mIntfVoltage)(0,freq))); + logData.push_back(std::arg((**mIntfVoltage)(0,freq))); + #endif } + + #if defined(DEBUG_BUILD) + mDataLogger->logDataLine(mSimulationTime, logData); + #endif + } void DP::Ph1::Capacitor::mnaCompUpdateVoltageHarm(const Matrix& leftVector, Int freqIdx) { diff --git a/dpsim/src/DataLogger.cpp b/dpsim-models/src/DataLogger.cpp similarity index 95% rename from dpsim/src/DataLogger.cpp rename to dpsim-models/src/DataLogger.cpp index 618f13aca5..6286d3aa5d 100644 --- a/dpsim/src/DataLogger.cpp +++ b/dpsim-models/src/DataLogger.cpp @@ -8,10 +8,10 @@ #include -#include +#include #include -using namespace DPsim; +using namespace CPS; DataLogger::DataLogger(Bool enabled) : mLogFile(), @@ -34,6 +34,9 @@ DataLogger::DataLogger(String name, Bool enabled, UInt downsampling) : } void DataLogger::open() { + if (!mEnabled) { + return; + } mLogFile = std::ofstream(mFilename, std::ios_base::out|std::ios_base::trunc); if (!mLogFile.is_open()) { // TODO: replace by exception @@ -43,7 +46,9 @@ void DataLogger::open() { } void DataLogger::close() { - mLogFile.close(); + if (mLogFile) { + mLogFile.close(); + } } void DataLogger::setColumnNames(std::vector names) { @@ -65,6 +70,16 @@ void DataLogger::logDataLine(Real time, Real data) { mLogFile << '\n'; } +void DataLogger::logDataLine(Real time, std::vector data) { + if (!mEnabled) + return; + + mLogFile << std::scientific << std::right << std::setw(14) << time; + for (const auto& it : data) + mLogFile << ", " << std::right << std::setw(13) << it; + mLogFile << '\n'; +} + void DataLogger::logDataLine(Real time, const Matrix& data) { if (!mEnabled) return; diff --git a/dpsim-models/src/MNASimPowerComp.cpp b/dpsim-models/src/MNASimPowerComp.cpp index 680cb66e5a..de11fb3e7a 100644 --- a/dpsim-models/src/MNASimPowerComp.cpp +++ b/dpsim-models/src/MNASimPowerComp.cpp @@ -63,6 +63,7 @@ void MNASimPowerComp::mnaUpdateCurrent(const Matrix& leftVector) { template void MNASimPowerComp::mnaPreStep(Real time, Int timeStepCount) { + mSimulationTime = time; this->mnaCompPreStep(time, timeStepCount); }; diff --git a/dpsim-villas/examples/cxx/FileExample.cpp b/dpsim-villas/examples/cxx/FileExample.cpp index 51376ec5d8..35e6f75f53 100644 --- a/dpsim-villas/examples/cxx/FileExample.cpp +++ b/dpsim-villas/examples/cxx/FileExample.cpp @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) { sim.setSystem(sys); sim.setTimeStep(timeStep); sim.setFinalTime(10.0); - + std::string fileConfig = R"STRING({ "type": "file", "uri": "logs/output.csv", @@ -67,7 +67,7 @@ int main(int argc, char* argv[]) { sim.addInterface(intf); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->mVoltage); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("v3", n3->mVoltage); diff --git a/dpsim-villas/examples/cxx/MqttExample.cpp b/dpsim-villas/examples/cxx/MqttExample.cpp index 1d259d483f..0c8be5ec79 100644 --- a/dpsim-villas/examples/cxx/MqttExample.cpp +++ b/dpsim-villas/examples/cxx/MqttExample.cpp @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) { sim.setSystem(sys); sim.setTimeStep(timeStep); sim.setFinalTime(10.0); - + std::string mqttConfig = R"STRING({ "type": "mqtt", "format": "json", @@ -71,7 +71,7 @@ int main(int argc, char* argv[]) { intf->exportAttribute(ll->mIntfCurrent->deriveCoeff(0, 0), 1, true, "v_load"); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->mVoltage); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("v3", n3->mVoltage); diff --git a/dpsim-villas/examples/cxx/SharedMemExample.cpp b/dpsim-villas/examples/cxx/SharedMemExample.cpp index c7330b4839..f23172ed39 100644 --- a/dpsim-villas/examples/cxx/SharedMemExample.cpp +++ b/dpsim-villas/examples/cxx/SharedMemExample.cpp @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) { sim.setSystem(sys); sim.setTimeStep(timeStep); sim.setFinalTime(2.0); - + std::string shmemConfig = R"STRING( { "type": "shmem", @@ -71,7 +71,7 @@ int main(int argc, char* argv[]) { sim.addInterface(intf); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->mVoltage); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("v3", n3->mVoltage); diff --git a/dpsim-villas/examples/cxx/ShmemDistributedDirect.cpp b/dpsim-villas/examples/cxx/ShmemDistributedDirect.cpp index 1bbf58441d..4be7d708af 100644 --- a/dpsim-villas/examples/cxx/ShmemDistributedDirect.cpp +++ b/dpsim-villas/examples/cxx/ShmemDistributedDirect.cpp @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) { sim.setFinalTime(finalTime); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->mVoltage); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("r12", r12->mIntfCurrent); @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) { sim.setFinalTime(finalTime); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("r02", r02->mIntfCurrent); logger->logAttribute("vecs", ecs->mIntfVoltage); diff --git a/dpsim-villas/examples/cxx/ShmemDistributedReference.cpp b/dpsim-villas/examples/cxx/ShmemDistributedReference.cpp index 284dcb82cd..329b3e0490 100644 --- a/dpsim-villas/examples/cxx/ShmemDistributedReference.cpp +++ b/dpsim-villas/examples/cxx/ShmemDistributedReference.cpp @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) { SystemComponentList{ vs1, r12, r02 }); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->mVoltage); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("r12", r12->mIntfCurrent); diff --git a/dpsim-villas/examples/cxx/ShmemExample.cpp b/dpsim-villas/examples/cxx/ShmemExample.cpp index c26affb4c3..90c1b9e8cb 100644 --- a/dpsim-villas/examples/cxx/ShmemExample.cpp +++ b/dpsim-villas/examples/cxx/ShmemExample.cpp @@ -65,7 +65,7 @@ int main(int argc, char* argv[]) { sim.addInterface(std::shared_ptr(&intf)); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->mVoltage); logger->logAttribute("v2", n2->mVoltage); logger->logAttribute("v3", n3->mVoltage); diff --git a/dpsim-villas/examples/cxx/Shmem_WSCC-9bus_Ctrl.cpp b/dpsim-villas/examples/cxx/Shmem_WSCC-9bus_Ctrl.cpp index ff961e7ecf..b6b35331be 100644 --- a/dpsim-villas/examples/cxx/Shmem_WSCC-9bus_Ctrl.cpp +++ b/dpsim-villas/examples/cxx/Shmem_WSCC-9bus_Ctrl.cpp @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) { InterfaceShmem intf("/dpsim1-villas", "/villas-dpsim1", nullptr, false); - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // Register exportable node voltages UInt o = 0; diff --git a/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest.cpp b/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest.cpp index 93f77d7609..88f394f4e3 100644 --- a/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest.cpp +++ b/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::info, Logger::Level::off, Logger::Level::info); SystemTopology system = reader.loadCIM(system_freq, filenames, CPS::Domain::SP); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest_LoadProfiles.cpp b/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest_LoadProfiles.cpp index 9e1f395bc3..6c35e27ea6 100644 --- a/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest_LoadProfiles.cpp +++ b/dpsim/examples/cxx/CIM/CIGRE_MV_PowerFlowTest_LoadProfiles.cpp @@ -76,7 +76,7 @@ int main(int argc, char** argv){ CSVReader csvreader(loadProfilePath, assignList, Logger::Level::info); csvreader.assignLoadProfile(system, time_begin, time_step, time_end, CSVReader::Mode::MANUAL); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { logger->logAttribute(node->name(), node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG.cpp b/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG.cpp index d67b426781..26092523cc 100644 --- a/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG.cpp +++ b/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG.cpp @@ -54,7 +54,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemPF, scenario, Domain::SP); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -80,7 +80,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemDP, scenario, Domain::DP); systemDP.initWithPowerflow(systemPF); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // log node voltages for (auto node : systemDP.mNodes) diff --git a/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG_withLoadStep.cpp b/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG_withLoadStep.cpp index 1d330f1c6c..356ff7d105 100644 --- a/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG_withLoadStep.cpp +++ b/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withDG_withLoadStep.cpp @@ -51,7 +51,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemPF, scenario, Domain::SP); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); } @@ -76,7 +76,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemDP, scenario, Domain::DP); systemDP.initWithPowerflow(systemPF); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // log node voltages for (auto node : systemDP.mNodes) diff --git a/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withoutDG.cpp b/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withoutDG.cpp index 21b8a948fd..a1c6807e91 100644 --- a/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withoutDG.cpp +++ b/dpsim/examples/cxx/CIM/DP_CIGRE_MV_withoutDG.cpp @@ -50,7 +50,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::debug, Logger::Level::off, Logger::Level::debug); SystemTopology systemPF = reader.loadCIM(systemFrequency, filenames, CPS::Domain::SP); - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -72,7 +72,7 @@ int main(int argc, char** argv){ SystemTopology systemDP = reader2.loadCIM(systemFrequency, filenames, CPS::Domain::DP); systemDP.initWithPowerflow(systemPF); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // log node voltages for (auto node : systemDP.mNodes) diff --git a/dpsim/examples/cxx/CIM/DP_WSCC-9bus_IdealVS.cpp b/dpsim/examples/cxx/CIM/DP_WSCC-9bus_IdealVS.cpp index 1e4ad5e525..bf053c1e02 100644 --- a/dpsim/examples/cxx/CIM/DP_WSCC-9bus_IdealVS.cpp +++ b/dpsim/examples/cxx/CIM/DP_WSCC-9bus_IdealVS.cpp @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) { sys.initWithPowerflow(systemPF); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderIter.cpp b/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderIter.cpp index 25326c661b..fac623392f 100644 --- a/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderIter.cpp +++ b/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderIter.cpp @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : sys.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderVBR.cpp b/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderVBR.cpp index 34fdc24be4..45fd56994b 100644 --- a/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderVBR.cpp +++ b/dpsim/examples/cxx/CIM/DP_WSCC9bus_SGReducedOrderVBR.cpp @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : sys.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG.cpp b/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG.cpp index d1cd584b5d..c371de2b7c 100644 --- a/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG.cpp +++ b/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG.cpp @@ -51,7 +51,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemPF, scenario, Domain::SP); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -77,7 +77,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemEMT, scenario, Domain::EMT); systemEMT.initWithPowerflow(systemPF); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // log node voltages for (auto node : systemEMT.mNodes) diff --git a/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG_withLoadStep.cpp b/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG_withLoadStep.cpp index 971856ec10..3d7b91c136 100644 --- a/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG_withLoadStep.cpp +++ b/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withDG_withLoadStep.cpp @@ -51,7 +51,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemPF, scenario, Domain::SP); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -77,7 +77,7 @@ int main(int argc, char** argv){ Examples::Grids::CIGREMV::addInvertersToCIGREMV(systemEMT, scenario, Domain::EMT); systemEMT.initWithPowerflow(systemPF); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // log node voltages for (auto node : systemEMT.mNodes) diff --git a/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withoutDG.cpp b/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withoutDG.cpp index 8d1e3d5cb0..b3c142a49a 100644 --- a/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withoutDG.cpp +++ b/dpsim/examples/cxx/CIM/EMT_CIGRE_MV_withoutDG.cpp @@ -47,7 +47,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::debug, Logger::Level::off, Logger::Level::debug); SystemTopology systemPF = reader.loadCIM(systemFrequency, filenames, CPS::Domain::SP); - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -70,7 +70,7 @@ int main(int argc, char** argv){ SystemTopology systemEMT = reader2.loadCIM(systemFrequency, filenames, CPS::Domain::EMT, PhaseType::ABC); systemEMT.initWithPowerflow(systemPF); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // log node voltages for (auto node : systemEMT.mNodes) diff --git a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_FullOrderSG.cpp b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_FullOrderSG.cpp index 45b12f3543..c71d16ea9e 100644 --- a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_FullOrderSG.cpp +++ b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_FullOrderSG.cpp @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) { } // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealCS.cpp b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealCS.cpp index 91ec37dd4f..6802213821 100644 --- a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealCS.cpp +++ b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealCS.cpp @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) { } // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealVS.cpp b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealVS.cpp index e508657ec8..cfab96b017 100644 --- a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealVS.cpp +++ b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_IdealVS.cpp @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) { sys.initWithPowerflow(systemPF); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_VBR.cpp b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_VBR.cpp index 90e1a5a1ed..33b51cc75a 100644 --- a/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_VBR.cpp +++ b/dpsim/examples/cxx/CIM/EMT_WSCC-9bus_VBR.cpp @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) { } // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/EMT_WSCC9bus_SGReducedOrderVBR.cpp b/dpsim/examples/cxx/CIM/EMT_WSCC9bus_SGReducedOrderVBR.cpp index 490ea50bcf..20d46d12c5 100644 --- a/dpsim/examples/cxx/CIM/EMT_WSCC9bus_SGReducedOrderVBR.cpp +++ b/dpsim/examples/cxx/CIM/EMT_WSCC9bus_SGReducedOrderVBR.cpp @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : sys.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/IEEE_LV_PowerFlowTest.cpp b/dpsim/examples/cxx/CIM/IEEE_LV_PowerFlowTest.cpp index 922ca05d23..22f1bcfd4b 100644 --- a/dpsim/examples/cxx/CIM/IEEE_LV_PowerFlowTest.cpp +++ b/dpsim/examples/cxx/CIM/IEEE_LV_PowerFlowTest.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::info, Logger::Level::off, Logger::Level::off); SystemTopology system = reader.loadCIM(system_freq, filenames, CPS::Domain::SP); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/PF_CIGRE_MV_withDG.cpp b/dpsim/examples/cxx/CIM/PF_CIGRE_MV_withDG.cpp index a9071a7a6c..095a4aad61 100644 --- a/dpsim/examples/cxx/CIM/PF_CIGRE_MV_withDG.cpp +++ b/dpsim/examples/cxx/CIM/PF_CIGRE_MV_withDG.cpp @@ -43,7 +43,7 @@ int main(int argc, char** argv){ SystemTopology system = reader.loadCIM(scenario.systemFrequency, filenames, Domain::SP); Examples::Grids::CIGREMV::addInvertersToCIGREMV(system, scenario, Domain::SP); - auto loggerPF = DPsim::DataLogger::make(simName); + auto loggerPF = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/SP_WSCC-9bus_CIM_Dyn_Switch.cpp b/dpsim/examples/cxx/CIM/SP_WSCC-9bus_CIM_Dyn_Switch.cpp index 78565c2e0c..553fb8cb03 100644 --- a/dpsim/examples/cxx/CIM/SP_WSCC-9bus_CIM_Dyn_Switch.cpp +++ b/dpsim/examples/cxx/CIM/SP_WSCC-9bus_CIM_Dyn_Switch.cpp @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { sys.component("GEN3")->setModelFlags(false); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/SP_WSCC9bus_SGReducedOrderVBR.cpp b/dpsim/examples/cxx/CIM/SP_WSCC9bus_SGReducedOrderVBR.cpp index 25ab577cff..b5bb0ff3f1 100644 --- a/dpsim/examples/cxx/CIM/SP_WSCC9bus_SGReducedOrderVBR.cpp +++ b/dpsim/examples/cxx/CIM/SP_WSCC9bus_SGReducedOrderVBR.cpp @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : sys.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/Slack_TrafoTapChanger_Load.cpp b/dpsim/examples/cxx/CIM/Slack_TrafoTapChanger_Load.cpp index 4a818f2e3f..9357307f4f 100644 --- a/dpsim/examples/cxx/CIM/Slack_TrafoTapChanger_Load.cpp +++ b/dpsim/examples/cxx/CIM/Slack_TrafoTapChanger_Load.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::info, Logger::Level::off, Logger::Level::debug); SystemTopology system = reader.loadCIM(system_freq, filenames, CPS::Domain::SP); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/Slack_Trafo_Load.cpp b/dpsim/examples/cxx/CIM/Slack_Trafo_Load.cpp index e1fb67fc93..b023b0890c 100644 --- a/dpsim/examples/cxx/CIM/Slack_Trafo_Load.cpp +++ b/dpsim/examples/cxx/CIM/Slack_Trafo_Load.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::info, Logger::Level::off, Logger::Level::debug); SystemTopology system = reader.loadCIM(system_freq, filenames, CPS::Domain::SP); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/WSCC-9bus_CIM.cpp b/dpsim/examples/cxx/CIM/WSCC-9bus_CIM.cpp index cf988d3f73..23268edb11 100644 --- a/dpsim/examples/cxx/CIM/WSCC-9bus_CIM.cpp +++ b/dpsim/examples/cxx/CIM/WSCC-9bus_CIM.cpp @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { systemPF.component("GEN1")->modifyPowerFlowBusType(CPS::PowerflowBusType::VD); // define logging - auto loggerPF = DPsim::DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); for (auto node : systemPF.mNodes) { loggerPF->logAttribute(node->name() + ".V", node->attribute("v")); @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) { sys.initWithPowerflow(systemPF); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn.cpp b/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn.cpp index e9792441c1..777399f64c 100644 --- a/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn.cpp +++ b/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn.cpp @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { SystemTopology sys = reader.loadCIM(60, filenames, Domain::DP, PhaseType::Single, CPS::GeneratorType::TransientStability); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn_Switch.cpp b/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn_Switch.cpp index e544c804e0..5da2201145 100644 --- a/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn_Switch.cpp +++ b/dpsim/examples/cxx/CIM/WSCC-9bus_CIM_Dyn_Switch.cpp @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) { sys.addComponent(sw); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", sys.node("BUS1")->attribute("v")); logger->logAttribute("v2", sys.node("BUS2")->attribute("v")); logger->logAttribute("v3", sys.node("BUS3")->attribute("v")); diff --git a/dpsim/examples/cxx/CIM/WSCC_9bus_mult_coupled.cpp b/dpsim/examples/cxx/CIM/WSCC_9bus_mult_coupled.cpp index 8697cc118b..d9533fd484 100644 --- a/dpsim/examples/cxx/CIM/WSCC_9bus_mult_coupled.cpp +++ b/dpsim/examples/cxx/CIM/WSCC_9bus_mult_coupled.cpp @@ -82,7 +82,7 @@ void simulateCoupled(std::list filenames, CommandLineArgs& args, Int c sim.setScheduler(std::make_shared(threads)); // Logging - //auto logger = DataLogger::make(simName); + //auto logger = CPS::DataLogger::make(simName); //for (Int cop = 1; cop <= copies; cop++) { // for (Int bus = 1; bus <= 9; bus++) { // String attrName = "v" + std::to_string(bus) + "_" + std::to_string(cop); diff --git a/dpsim/examples/cxx/CIM/WSCC_9bus_mult_decoupled.cpp b/dpsim/examples/cxx/CIM/WSCC_9bus_mult_decoupled.cpp index c1a4053852..4da1987e08 100644 --- a/dpsim/examples/cxx/CIM/WSCC_9bus_mult_decoupled.cpp +++ b/dpsim/examples/cxx/CIM/WSCC_9bus_mult_decoupled.cpp @@ -66,7 +66,7 @@ void simulateDecoupled(std::list filenames, Int copies, Int threads, I sim.setScheduler(std::make_shared(threads)); // Logging - //auto logger = DataLogger::make(simName); + //auto logger = CPS::DataLogger::make(simName); //for (Int cop = 1; cop <= copies; cop++) { // for (Int bus = 1; bus <= 9; bus++) { // String attrName = "v" + std::to_string(bus) + "_" + std::to_string(cop); diff --git a/dpsim/examples/cxx/CIM/WSCC_9bus_mult_diakoptics.cpp b/dpsim/examples/cxx/CIM/WSCC_9bus_mult_diakoptics.cpp index af6da12d0b..3880f8d4a6 100644 --- a/dpsim/examples/cxx/CIM/WSCC_9bus_mult_diakoptics.cpp +++ b/dpsim/examples/cxx/CIM/WSCC_9bus_mult_diakoptics.cpp @@ -84,7 +84,7 @@ void simulateDiakoptics(std::list filenames, sim.setTearingComponents(sys.mTearComponents); // Logging - //auto logger = DataLogger::make(simName); + //auto logger = CPS::DataLogger::make(simName); //for (Int cop = 1; cop <= copies; cop++) { // for (Int bus = 1; bus <= 9; bus++) { // String attrName = "v" + std::to_string(bus) + "_" + std::to_string(cop); diff --git a/dpsim/examples/cxx/Circuits/DP_Basics_DP_Sims.cpp b/dpsim/examples/cxx/Circuits/DP_Basics_DP_Sims.cpp index 0a1c06058b..4ac58690d2 100644 --- a/dpsim/examples/cxx/Circuits/DP_Basics_DP_Sims.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Basics_DP_Sims.cpp @@ -61,7 +61,7 @@ void DP_VS_RL_f60_largeTs() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -111,7 +111,7 @@ void DP_VS_RL_f60_vlargeTs() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -161,7 +161,7 @@ void DP_VS_RL_f60() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -211,7 +211,7 @@ void DP_VS_RL_f500_largeTs() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -261,7 +261,7 @@ void DP_VS_RL_f500_ph500() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -311,7 +311,7 @@ void DP_VS_RL_f500() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_Basics_EMT_Sims.cpp b/dpsim/examples/cxx/Circuits/DP_Basics_EMT_Sims.cpp index bed049f5fc..0763602d8c 100644 --- a/dpsim/examples/cxx/Circuits/DP_Basics_EMT_Sims.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Basics_EMT_Sims.cpp @@ -55,7 +55,7 @@ void EMT_VS_RL_f60_largeTs() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -106,7 +106,7 @@ void EMT_VS_RL_f60() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -157,7 +157,7 @@ void EMT_VS_RL_f500() { SystemComponentList{vs, rline, lline, rload}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_Circuits.cpp b/dpsim/examples/cxx/Circuits/DP_Circuits.cpp index d19bf9bc4f..f6ce3d5682 100644 --- a/dpsim/examples/cxx/Circuits/DP_Circuits.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Circuits.cpp @@ -32,7 +32,7 @@ void DP_CS_R1(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{cs, r1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i10", r1->attribute("i_intf")); @@ -63,7 +63,7 @@ void DP_VS_R1(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{vs, r}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); Simulation sim(simName, args); @@ -103,7 +103,7 @@ void DP_CS_R2CL(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{cs, r1, c1, l1, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", cs->attribute("i_intf")); @@ -151,7 +151,7 @@ void DP_VS_CS_R4(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3}, SystemComponentList{vs, r1, r2, r3, r4, cs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -200,7 +200,7 @@ void DP_VS_R2L3(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3, n4}, SystemComponentList{vs, r1, l1, l2, l3, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -239,7 +239,7 @@ void DP_VS_RC1(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{vs, r1, c1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); @@ -280,7 +280,7 @@ void DP_VS_RL2(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3}, SystemComponentList{vs, rl, ll, rL}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", rL->attribute("i_intf")); @@ -338,7 +338,7 @@ void DP_Ph3_VS_R2L3(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3, n4}, SystemComponentList{vs, r1, l1, l2, l3, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -388,7 +388,7 @@ void DP_Ph3_VS_RC1(CommandLineArgs& args) { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{vs, r1, c1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/DP_DecouplingLine.cpp b/dpsim/examples/cxx/Circuits/DP_DecouplingLine.cpp index 617ed7573a..f1d3d217bb 100644 --- a/dpsim/examples/cxx/Circuits/DP_DecouplingLine.cpp +++ b/dpsim/examples/cxx/Circuits/DP_DecouplingLine.cpp @@ -55,7 +55,7 @@ void simElements() { //SystemComponentList{vs, res, ind, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); @@ -101,7 +101,7 @@ void simDecoupling() { sys.addComponents(dline->getLineComponents()); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i1", vs->attribute("i_intf")); @@ -151,7 +151,7 @@ void simDecouplingEMT() { sys.addComponents(dline->getLineComponents()); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i1", vs->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/DP_Diakoptics.cpp b/dpsim/examples/cxx/Circuits/DP_Diakoptics.cpp index 452655cc10..c979688aed 100644 --- a/dpsim/examples/cxx/Circuits/DP_Diakoptics.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Diakoptics.cpp @@ -51,7 +51,7 @@ void DP_VS_CS_R4() { SystemComponentList{vs, r1, r2, r3, r4, cs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -108,7 +108,7 @@ void DP_VS_CS_R4_Diakoptics() { sys.addTearComponent(r3); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -164,7 +164,7 @@ void DP_VS_R2L3() { SystemComponentList{vs, r1, l1, l2, l3, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -221,7 +221,7 @@ void DP_VS_R2L3_Diakoptics() { sys.addTearComponent(l1); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_EMT_RL_SourceStep.cpp b/dpsim/examples/cxx/Circuits/DP_EMT_RL_SourceStep.cpp index 34214dd333..3a57ae5b0f 100644 --- a/dpsim/examples/cxx/Circuits/DP_EMT_RL_SourceStep.cpp +++ b/dpsim/examples/cxx/Circuits/DP_EMT_RL_SourceStep.cpp @@ -38,7 +38,7 @@ static void DP_RL_SourceStep(Real timeStep, Real finalTime, SystemNodeList{ n1, n2, n3 }, SystemComponentList{ vs, r, l, sw }); - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -80,7 +80,7 @@ static void EMT_RL_SourceStep(Real timeStep, Real finalTime, SystemNodeList{ n1, n2, n3 }, SystemComponentList{ vs, r, l, sw }); - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_PiLine.cpp b/dpsim/examples/cxx/Circuits/DP_PiLine.cpp index 1231a6598e..5029641b40 100644 --- a/dpsim/examples/cxx/Circuits/DP_PiLine.cpp +++ b/dpsim/examples/cxx/Circuits/DP_PiLine.cpp @@ -65,7 +65,7 @@ void simElements() { //SystemComponentList{vs, res, ind, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iline", ind->attribute("i_intf")); @@ -115,7 +115,7 @@ void simPiLine() { SystemComponentList{vs, line, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iline", line->attribute("i_intf")); @@ -161,7 +161,7 @@ void simPiLineDiakoptics() { sys.addTearComponent(line); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_SMIB_Fault.cpp index 93188b502a..3c5e7df804 100644 --- a/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_SMIB_Fault.cpp @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -155,7 +155,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genDP, lineDP, extnetDP, fault}); // Logging - auto loggerDP = DataLogger::make(simNameDP, true, logDownSampling); + auto loggerDP = CPS::DataLogger::make(simNameDP, true, logDownSampling); loggerDP->logAttribute("v_gen", genDP->attribute("v_intf")); loggerDP->logAttribute("i_gen", genDP->attribute("i_intf")); loggerDP->logAttribute("Te", genDP->attribute("Te")); diff --git a/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_VBR_Load_Fault.cpp b/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_VBR_Load_Fault.cpp index 47fa7d7cd3..daed16ea5d 100644 --- a/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_VBR_Load_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/DP_ReducedOrderSG_VBR_Load_Fault.cpp @@ -126,7 +126,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genDP, load, fault}); // Logging - auto loggerDP = DataLogger::make(simNameDP, true, logDownSampling); + auto loggerDP = CPS::DataLogger::make(simNameDP, true, logDownSampling); loggerDP->logAttribute("v_gen", genDP->attribute("v_intf")); loggerDP->logAttribute("i_gen", genDP->attribute("i_intf")); loggerDP->logAttribute("Te", genDP->attribute("Te")); diff --git a/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSGIterative_LoadStep.cpp b/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSGIterative_LoadStep.cpp index b969105100..944c3a0a75 100644 --- a/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSGIterative_LoadStep.cpp +++ b/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSGIterative_LoadStep.cpp @@ -106,7 +106,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -172,7 +172,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genDP, lineDP, extnetDP}); // Logging - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); // log node voltage for (auto node : systemDP.mNodes) diff --git a/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSG_LoadStep.cpp b/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSG_LoadStep.cpp index 94f604c0d3..03c1ce814a 100644 --- a/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSG_LoadStep.cpp +++ b/dpsim/examples/cxx/Circuits/DP_SMIB_ReducedOrderSG_LoadStep.cpp @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -157,7 +157,7 @@ int main(int argc, char* argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : systemDP.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_PQLoad_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_PQLoad_with_PF_Init.cpp index 9a13838376..de402d7af8 100644 --- a/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_PQLoad_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_PQLoad_with_PF_Init.cpp @@ -67,7 +67,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -114,7 +114,7 @@ int main(int argc, char* argv[]) { systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("isrc", extnetDP->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp index ba4a886269..bbb7b6d6f2 100644 --- a/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -135,7 +135,7 @@ int main(int argc, char* argv[]) { systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simName); + auto loggerDP = CPS::DataLogger::make(simName); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("i12", lineDP->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_with_PF_Init.cpp index dd3ff4d82e..a1754e725c 100644 --- a/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/DP_Slack_PiLine_VSI_with_PF_Init.cpp @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -123,7 +123,7 @@ int main(int argc, char* argv[]) { systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("i12", lineDP->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_Fault.cpp b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_Fault.cpp index 0cb3fcbc10..b702b7f970 100644 --- a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_Fault.cpp @@ -80,7 +80,7 @@ void DP_SynGenTrStab_3Bus_Fault(String simName, Real timeStep, Real finalTime, b SystemComponentList{gen1PF, gen2PF, loadPF, line12PF, line13PF, line23PF, faultPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v_bus1", n1PF->attribute("v")); loggerPF->logAttribute("v_bus2", n2PF->attribute("v")); loggerPF->logAttribute("v_bus3", n3PF->attribute("v")); @@ -169,7 +169,7 @@ void DP_SynGenTrStab_3Bus_Fault(String simName, Real timeStep, Real finalTime, b systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("v3", n3DP->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_SteadyState.cpp b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_SteadyState.cpp index eb68eb086c..ab04eb4354 100644 --- a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_SteadyState.cpp +++ b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_3Bus_SteadyState.cpp @@ -69,7 +69,7 @@ void DP_SynGenTrStab_3Bus_SteadyState(String simName, Real timeStep, Real finalT SystemComponentList{gen1PF, gen2PF, loadPF, line12PF, line13PF, line23PF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v_bus1", n1PF->attribute("v")); loggerPF->logAttribute("v_bus2", n2PF->attribute("v")); loggerPF->logAttribute("v_bus3", n3PF->attribute("v")); @@ -141,7 +141,7 @@ void DP_SynGenTrStab_3Bus_SteadyState(String simName, Real timeStep, Real finalT systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("v3", n3DP->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_Fault.cpp index 1e140642ed..5904885575 100644 --- a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_Fault.cpp @@ -63,7 +63,7 @@ void DP_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, bo SystemComponentList{genPF, linePF, extnetPF, faultPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -127,7 +127,7 @@ void DP_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, bo // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); //gen diff --git a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_SteadyState.cpp b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_SteadyState.cpp index d432c908fc..489944e85d 100644 --- a/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_SteadyState.cpp +++ b/dpsim/examples/cxx/Circuits/DP_SynGenTrStab_SMIB_SteadyState.cpp @@ -53,7 +53,7 @@ void DP_1ph_SynGenTrStab_SteadyState(String simName, Real timeStep, Real finalTi SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -105,7 +105,7 @@ void DP_1ph_SynGenTrStab_SteadyState(String simName, Real timeStep, Real finalTi // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); //gen diff --git a/dpsim/examples/cxx/Circuits/DP_VSI.cpp b/dpsim/examples/cxx/Circuits/DP_VSI.cpp index 7b62e36049..53d3ced77d 100644 --- a/dpsim/examples/cxx/Circuits/DP_VSI.cpp +++ b/dpsim/examples/cxx/Circuits/DP_VSI.cpp @@ -108,7 +108,7 @@ void DP_Ph1_VSI2_4bus_SampleGrid() { node->setInitialVoltage(Complex(Vnom, 0)); } // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); // currents /*logger->logAttribute("i_vs", vs->attribute("i_intf")); logger->logAttribute("i_vsi", vsi->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/DP_VS_RL1.cpp b/dpsim/examples/cxx/Circuits/DP_VS_RL1.cpp index c6dee917b8..c3911b3c4f 100644 --- a/dpsim/examples/cxx/Circuits/DP_VS_RL1.cpp +++ b/dpsim/examples/cxx/Circuits/DP_VS_RL1.cpp @@ -41,7 +41,7 @@ int main(int argc, char* argv[]) { SystemComponentList{vs, r1, l1}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_CS_RL1.cpp b/dpsim/examples/cxx/Circuits/EMT_CS_RL1.cpp index a83fc348bf..3273ef8c69 100644 --- a/dpsim/examples/cxx/Circuits/EMT_CS_RL1.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_CS_RL1.cpp @@ -39,7 +39,7 @@ int main(int argc, char* argv[]) { auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{cs, r1, l1}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("iR1", r1->attribute("i_intf")); logger->logAttribute("iL1", l1->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_Circuits.cpp b/dpsim/examples/cxx/Circuits/EMT_Circuits.cpp index 5035e3c14d..4221ca58bf 100644 --- a/dpsim/examples/cxx/Circuits/EMT_Circuits.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_Circuits.cpp @@ -31,7 +31,7 @@ void EMT_CS_R1() { auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{cs, r1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); Simulation sim(simName); @@ -66,7 +66,7 @@ void EMT_VS_R1() { auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{vs, r}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); Simulation sim(simName); @@ -109,7 +109,7 @@ void EMT_CS_R2CL() { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{cs, r1, c1, l1, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", cs->attribute("i_intf")); @@ -161,7 +161,7 @@ void EMT_VS_CS_R4_AC() { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3}, SystemComponentList{vs, r1, r2, r3, r4, cs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -214,7 +214,7 @@ void EMT_VS_CS_R4_DC() { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3}, SystemComponentList{vs, r1, r2, r3, r4, cs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -266,7 +266,7 @@ void EMT_VS_R2L3() { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3, n4}, SystemComponentList{vs, r1, l1, l2, l3, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -310,7 +310,7 @@ void EMT_VS_RC1() { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{vs, r1, c1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); @@ -379,7 +379,7 @@ void EMT_Ph3_VS_R2L3() { auto sys = SystemTopology(50, SystemNodeList{n1, n2, n3, n4}, SystemComponentList{vs, r1, l1, l2, l3, r2}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -436,7 +436,7 @@ void EMT_Ph3_VS_RC1() { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{vs, r1, c1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack.cpp b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack.cpp index ea43659880..31426a2adc 100644 --- a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack.cpp @@ -36,7 +36,7 @@ void simElementsSP1ph() { SystemComponentList{vs, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i1", vs->attribute("i_intf")); @@ -74,7 +74,7 @@ void simComponentSP1ph() { SystemComponentList{sl, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i1", sl->attribute("i_intf")); @@ -112,7 +112,7 @@ void simElementsDP1ph() { SystemComponentList{vs, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i1", vs->attribute("i_intf")); @@ -150,7 +150,7 @@ void simComponentDP1ph() { SystemComponentList{sl, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i1", sl->attribute("i_intf")); @@ -188,7 +188,7 @@ void simElementsEMT3ph() { SystemComponentList{vs, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i1", vs->attribute("i_intf")); @@ -227,7 +227,7 @@ void simComponentEMT3ph() { SystemComponentList{vs, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i1", vs->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FM.cpp b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FM.cpp index d8280e0fe1..61991c8cc6 100644 --- a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FM.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FM.cpp @@ -59,7 +59,7 @@ void powerFlow(SystemTopology& systemPF) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -111,7 +111,7 @@ void simulateDP(SystemTopology& systemPF, String waveform) { systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("isrc", extnetDP->attribute("i_intf")); @@ -166,7 +166,7 @@ void simulateSP(SystemTopology& systemPF, String waveform) { systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("i12", lineSP->attribute("i_intf")); @@ -220,7 +220,7 @@ void simulateEMT(SystemTopology& systemPF, String waveform) { systemEMT.initWithPowerflow(systemPF); // Logging - auto loggerEMT = DataLogger::make(simNameEMT); + auto loggerEMT = CPS::DataLogger::make(simNameEMT); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); loggerEMT->logAttribute("i12", lineEMT->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FrequencyRamp_CosineFM.cpp b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FrequencyRamp_CosineFM.cpp index 6fa561ad6a..573b1404e1 100644 --- a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FrequencyRamp_CosineFM.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Slack_PiLine_PQLoad_FrequencyRamp_CosineFM.cpp @@ -59,7 +59,7 @@ void powerFlow(SystemTopology& systemPF) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -111,7 +111,7 @@ void simulateDP(SystemTopology& systemPF, String waveform) { systemDP.initWithPowerflow(systemPF); // Logging - auto loggerDP = DataLogger::make(simNameDP); + auto loggerDP = CPS::DataLogger::make(simNameDP); loggerDP->logAttribute("v1", n1DP->attribute("v")); loggerDP->logAttribute("v2", n2DP->attribute("v")); loggerDP->logAttribute("isrc", extnetDP->attribute("i_intf")); @@ -166,7 +166,7 @@ void simulateSP(SystemTopology& systemPF, String waveform) { systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("i12", lineSP->attribute("i_intf")); @@ -219,7 +219,7 @@ void simulateEMT(SystemTopology& systemPF, String waveform) { systemEMT.initWithPowerflow(systemPF); // Logging - auto loggerEMT = DataLogger::make(simNameEMT); + auto loggerEMT = CPS::DataLogger::make(simNameEMT); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); loggerEMT->logAttribute("i12", lineEMT->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Trafo.cpp b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Trafo.cpp index 14808c9d38..46aafe3968 100644 --- a/dpsim/examples/cxx/Circuits/EMT_DP_SP_Trafo.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_DP_SP_Trafo.cpp @@ -69,7 +69,7 @@ void simTrafoElementsSP1ph() { SystemTopology sys(frequency, SystemNodeList{n1, n2, vn1 }, SystemComponentList{vs, trafoRes, trafoInd, trafoSnubberResHVSide, trafoSnubberResMVSide, trafoSnubberCapMVSide, loadRes}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("itrafo", trafoInd->attribute("i_intf")); @@ -122,7 +122,7 @@ void simTrafoSP1ph() { SystemTopology sys(50, SystemNodeList{n1, n2 }, SystemComponentList{vs, trafo, loadRes}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("itrafo", trafo->attribute("i_intf")); @@ -194,7 +194,7 @@ void simTrafoElementsDP1ph() { SystemTopology sys(frequency, SystemNodeList{n1, n2, vn1 }, SystemComponentList{vs, trafoRes, trafoInd, trafoSnubberResHVSide, trafoSnubberResMVSide, trafoSnubberCapMVSide, loadRes}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("itrafo", trafoInd->attribute("i_intf")); @@ -247,7 +247,7 @@ void simTrafoDP1ph() { SystemTopology sys(50, SystemNodeList{n1, n2 }, SystemComponentList{vs, trafo, loadRes}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("itrafo", trafo->attribute("i_intf")); @@ -319,7 +319,7 @@ void simTrafoElementsEMT3ph() { SystemTopology sys(frequency, SystemNodeList{n1, n2, vn1 }, SystemComponentList{vs, trafoRes, trafoInd, trafoSnubberResHVSide, trafoSnubberResMVSide, trafoSnubberCapMVSide, loadRes}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("itrafo", trafoInd->attribute("i_intf")); @@ -372,7 +372,7 @@ void simTrafoEMT3ph() { SystemTopology sys(50, SystemNodeList{n1, n2 }, SystemComponentList{vs, trafo, loadRes}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("itrafo", trafo->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_Init.cpp b/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_Init.cpp index 54b97b057c..70ead85340 100644 --- a/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_Init.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_Init.cpp @@ -32,7 +32,7 @@ void vsSetParamsDP1ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -66,7 +66,7 @@ void vsSetParamsSP1ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -100,7 +100,7 @@ void vsSetParamsEMT3ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -136,7 +136,7 @@ void vsSetAttrDP1ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -172,7 +172,7 @@ void vsSetAttrSP1ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -208,7 +208,7 @@ void vsSetAttrEMT3ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -244,7 +244,7 @@ void vsSetFromNodeDP1ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -280,7 +280,7 @@ void vsSetFromNodeSP1ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation @@ -316,7 +316,7 @@ void vsSetFromNodeEMT3ph() { SystemComponentList{vs}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); // Simulation diff --git a/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_RLC.cpp b/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_RLC.cpp index 4a2993b3b9..1547b402f8 100644 --- a/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_RLC.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_DP_SP_VS_RLC.cpp @@ -36,7 +36,7 @@ void voltageSourceResistorEMT3ph() { SystemComponentList{vs, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -75,7 +75,7 @@ void voltageSourceResistorDP1ph() { SystemComponentList{vs, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -114,7 +114,7 @@ void voltageSourceResistorSP1ph() { SystemComponentList{vs, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -158,7 +158,7 @@ void voltageSourceInductorEMT3ph() { SystemComponentList{vs, res, ind}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -204,7 +204,7 @@ void voltageSourceInductorDP1ph() { SystemComponentList{vs, res, ind}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -250,7 +250,7 @@ void voltageSourceInductorSP1ph() { SystemComponentList{vs, res, ind}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -296,7 +296,7 @@ void voltageSourceCapacitorEMT3ph() { SystemComponentList{vs, res, cap}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -342,7 +342,7 @@ void voltageSourceCapacitorDP1ph() { SystemComponentList{vs, res, cap}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); @@ -388,7 +388,7 @@ void voltageSourceCapacitorSP1ph() { SystemComponentList{vs, res, cap}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iR", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_PiLine.cpp b/dpsim/examples/cxx/Circuits/EMT_PiLine.cpp index 43d76fb2c5..b63973de86 100644 --- a/dpsim/examples/cxx/Circuits/EMT_PiLine.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_PiLine.cpp @@ -66,7 +66,7 @@ void simElements() { //SystemComponentList{vs, res, ind, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iline", ind->attribute("i_intf")); @@ -118,7 +118,7 @@ void simPiLine() { SystemComponentList{vs, line, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iline", line->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_SMIB_Fault.cpp index 697fd0914d..b93391cd50 100644 --- a/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_SMIB_Fault.cpp @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -166,7 +166,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genEMT, lineEMT, fault, extnetEMT}); // Logging - auto loggerEMT = DataLogger::make(simNameEMT, true, logDownSampling); + auto loggerEMT = CPS::DataLogger::make(simNameEMT, true, logDownSampling); loggerEMT->logAttribute("v_gen", genEMT->attribute("v_intf")); loggerEMT->logAttribute("i_gen", genEMT->attribute("i_intf")); loggerEMT->logAttribute("Te", genEMT->attribute("Te")); diff --git a/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_VBR_Load_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_VBR_Load_Fault.cpp index c6e90b5af6..4546e574ea 100644 --- a/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_VBR_Load_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_ReducedOrderSG_VBR_Load_Fault.cpp @@ -129,7 +129,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genEMT, load, fault}); // Logging - auto loggerEMT = DataLogger::make(simNameEMT, true, logDownSampling); + auto loggerEMT = CPS::DataLogger::make(simNameEMT, true, logDownSampling); loggerEMT->logAttribute("v_gen", genEMT->attribute("v_intf")); loggerEMT->logAttribute("i_gen", genEMT->attribute("i_intf")); loggerEMT->logAttribute("Te", genEMT->attribute("Te")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSGIterative_LoadStep.cpp b/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSGIterative_LoadStep.cpp index d1f97617b9..ad19a18cf9 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSGIterative_LoadStep.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSGIterative_LoadStep.cpp @@ -102,7 +102,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -172,7 +172,7 @@ int main(int argc, char* argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : systemEMT.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSG_LoadStep.cpp b/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSG_LoadStep.cpp index 57f86ab872..a70778a2ab 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSG_LoadStep.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SMIB_ReducedOrderSG_LoadStep.cpp @@ -90,7 +90,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -160,7 +160,7 @@ int main(int argc, char* argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : systemEMT.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_PQLoad_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_PQLoad_with_PF_Init.cpp index 649cdfb0a4..41bf138857 100644 --- a/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_PQLoad_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_PQLoad_with_PF_Init.cpp @@ -67,7 +67,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("i12", linePF->attribute("i_intf")); @@ -115,7 +115,7 @@ int main(int argc, char* argv[]) { systemEMT.initWithPowerflow(systemPF); // Logging - auto loggerEMT = DataLogger::make(simNameEMT); + auto loggerEMT = CPS::DataLogger::make(simNameEMT); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); loggerEMT->logAttribute("isrc", extnetEMT->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp index f3d674a35f..a3f23ae279 100644 --- a/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -134,7 +134,7 @@ int main(int argc, char* argv[]) { systemEMT.initWithPowerflow(systemPF); // Logging - auto loggerEMT = DataLogger::make(simName); + auto loggerEMT = CPS::DataLogger::make(simName); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); loggerEMT->logAttribute("i12", lineEMT->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_with_PF_Init.cpp index b70927eb5b..328d2a230f 100644 --- a/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_Slack_PiLine_VSI_with_PF_Init.cpp @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -121,7 +121,7 @@ int main(int argc, char* argv[]) { systemEMT.initWithPowerflow(systemPF); // Logging - auto loggerEMT = DataLogger::make(simNameEMT); + auto loggerEMT = CPS::DataLogger::make(simNameEMT); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); loggerEMT->logAttribute("i12", lineEMT->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGen4OrderIter_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGen4OrderIter_SMIB_Fault.cpp index 609741218e..ab3df0c5f3 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGen4OrderIter_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGen4OrderIter_SMIB_Fault.cpp @@ -65,7 +65,7 @@ void EMT_3ph_4OrderSynGenIter(String simName, Real timeStep, Real finalTime, Rea SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -143,7 +143,7 @@ void EMT_3ph_4OrderSynGenIter(String simName, Real timeStep, Real finalTime, Rea SystemComponentList{genEMT, lineEMT, fault, extnetEMT}); // Logging - auto loggerEMT = DataLogger::make(simNameEMT, true, logDownSampling); + auto loggerEMT = CPS::DataLogger::make(simNameEMT, true, logDownSampling); //loggerEMT->logAttribute("v2", n2EMT->attribute("v")); //loggerEMT->logAttribute("v_gen", genEMT->attribute("v_intf")); //loggerEMT->logAttribute("i_gen", genEMT->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_DP_SynGenTrStab_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_DP_SynGenTrStab_SMIB_Fault.cpp index 718836a460..0128776ff0 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_DP_SynGenTrStab_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_DP_SynGenTrStab_SMIB_Fault.cpp @@ -86,7 +86,7 @@ void EMT_3ph_SynGenDQ7odTrapez_ThreePhFault(Real timeStep, Real finalTime, bool SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -159,7 +159,7 @@ void EMT_3ph_SynGenDQ7odTrapez_ThreePhFault(Real timeStep, Real finalTime, bool system.initWithPowerflow(systemPF); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); @@ -229,7 +229,7 @@ void DP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -299,7 +299,7 @@ void DP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); @@ -371,7 +371,7 @@ void SP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -441,7 +441,7 @@ void SP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault.cpp index 066ee67328..5fbd753c2b 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault.cpp @@ -135,7 +135,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -200,7 +200,7 @@ int main(int argc, char* argv[]) { gen->terminal(0)->setPower(-genPF->getApparentPower()); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault_JsonSyngenParams.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault_JsonSyngenParams.cpp index 368b2e0ce9..021ba4b094 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault_JsonSyngenParams.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_OperationalParams_SMIB_Fault_JsonSyngenParams.cpp @@ -99,7 +99,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -172,7 +172,7 @@ int main(int argc, char* argv[]) { system.initWithPowerflow(systemPF); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_SMIB_Fault.cpp index 18b1c52454..5d7b73a758 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenDQ7odTrapez_SMIB_Fault.cpp @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -161,7 +161,7 @@ int main(int argc, char* argv[]) { system.initWithPowerflow(systemPF); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_Fault.cpp index 228bdee887..a95feb03bd 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_Fault.cpp @@ -85,7 +85,7 @@ void EMT_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, b SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -148,7 +148,7 @@ void EMT_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, b // Logging - auto loggerEMT = DataLogger::make(simNameEMT); + auto loggerEMT = CPS::DataLogger::make(simNameEMT); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); //gen diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_SteadyState.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_SteadyState.cpp index 2f5714e8b7..ef48ea3874 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_SteadyState.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenTrStab_SMIB_SteadyState.cpp @@ -81,7 +81,7 @@ void EMT_1ph_SynGenTrStab_SteadyState(String simName, Real timeStep, Real finalT SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -137,7 +137,7 @@ void EMT_1ph_SynGenTrStab_SteadyState(String simName, Real timeStep, Real finalT // Logging - auto loggerEMT = DataLogger::make(simNameEMT); + auto loggerEMT = CPS::DataLogger::make(simNameEMT); loggerEMT->logAttribute("v1", n1EMT->attribute("v")); loggerEMT->logAttribute("v2", n2EMT->attribute("v")); //gen diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_OperationalParams_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_OperationalParams_SMIB_Fault.cpp index 500de213e7..ed7b35b49e 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_OperationalParams_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_OperationalParams_SMIB_Fault.cpp @@ -38,7 +38,7 @@ Real finalTime = 1.0; Real timeStep = 10e-6; Real startTimeFault=0.2; -int main(int argc, char* argv[]) { +int main(int argc, char* argv[]) { if (argc > 1) { CommandLineArgs args(argc, argv); @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) { extnetPF->setParameters(VnomMV); extnetPF->setBaseVoltage(VnomMV); extnetPF->modifyPowerFlowBusType(PowerflowBusType::VD); - + //Line auto linePF = SP::Ph1::PiLine::make("PiLine", Logger::Level::debug); linePF->setParameters(lineResistance, lineInductance, lineCapacitance, lineConductance); @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -117,7 +117,7 @@ int main(int argc, char* argv[]) { syngenKundur.nomPower, syngenKundur.nomVoltage, syngenKundur.nomFreq, syngenKundur.poleNum, syngenKundur.nomFieldCurr, syngenKundur.Rs, syngenKundur.Ld, syngenKundur.Lq, syngenKundur.Ld_t, syngenKundur.Lq_t, syngenKundur.Ld_s, syngenKundur.Lq_s, syngenKundur.Ll, syngenKundur.Td0_t, syngenKundur.Tq0_t, syngenKundur.Td0_s, syngenKundur.Tq0_s, syngenKundur.H); - + //Grid bus as Slack auto extnet = EMT::Ph3::NetworkInjection::make("Slack", Logger::Level::debug); @@ -148,7 +148,7 @@ int main(int argc, char* argv[]) { gen->terminal(0)->setPower(-genPF->getApparentPower()); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_SMIB_Fault.cpp index b293db6bcb..2ebadfb506 100644 --- a/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_SynGenVBR_SMIB_Fault.cpp @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -148,7 +148,7 @@ int main(int argc, char* argv[]) { gen->terminal(0)->setPower(-genPF->getApparentPower()); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_VSI.cpp b/dpsim/examples/cxx/Circuits/EMT_VSI.cpp index 0c39ee48a5..33f06c38b0 100644 --- a/dpsim/examples/cxx/Circuits/EMT_VSI.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_VSI.cpp @@ -156,9 +156,9 @@ void EMT_Ph3_VSI2_4bus_SampleGrid() { //nrpSolver.writePFResultsToDynamicTopology(sysPF, sys); // Logging - //auto logger = DataLogger::make(simName); - auto logger_vsi = DataLogger::make(simName+"_pv1"); - auto logger_vsi2 = DataLogger::make(simName + "_pv2"); + //auto logger = CPS::DataLogger::make(simName); + auto logger_vsi = CPS::DataLogger::make(simName+"_pv1"); + auto logger_vsi2 = CPS::DataLogger::make(simName + "_pv2"); //// currents //logger->logAttribute("i_vs", vs->attribute("i_intf")); //logger->logAttribute("i_vsi", vsi->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/EMT_VS_RL1.cpp b/dpsim/examples/cxx/Circuits/EMT_VS_RL1.cpp index 7c4574dbd2..85a95b4c8f 100644 --- a/dpsim/examples/cxx/Circuits/EMT_VS_RL1.cpp +++ b/dpsim/examples/cxx/Circuits/EMT_VS_RL1.cpp @@ -40,7 +40,7 @@ int main(int argc, char* argv[]) { auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{vs, r1, l1}); // Logger - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/PF_Slack_PiLine_PQLoad.cpp b/dpsim/examples/cxx/Circuits/PF_Slack_PiLine_PQLoad.cpp index 9f4d8615d4..eb81a041d5 100644 --- a/dpsim/examples/cxx/Circuits/PF_Slack_PiLine_PQLoad.cpp +++ b/dpsim/examples/cxx/Circuits/PF_Slack_PiLine_PQLoad.cpp @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/SP_Circuits.cpp b/dpsim/examples/cxx/Circuits/SP_Circuits.cpp index fe8547d081..c41aaab7c8 100644 --- a/dpsim/examples/cxx/Circuits/SP_Circuits.cpp +++ b/dpsim/examples/cxx/Circuits/SP_Circuits.cpp @@ -60,7 +60,7 @@ void SP_Ph3_VS_R2L3() { auto sys = SystemTopology(50, SystemNodeList{ n1, n2, n3, n4 }, SystemComponentList{ vs, r1, l1, l2, l3, r2 }); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v3", n3->attribute("v")); @@ -115,7 +115,7 @@ void SP_Ph3_VS_RC1() { auto sys = SystemTopology(50, SystemNodeList{ n1, n2 }, SystemComponentList{ vs, r1, c1 }); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("i12", r1->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/SP_PiLine.cpp b/dpsim/examples/cxx/Circuits/SP_PiLine.cpp index 7671db1993..13a9ce3e28 100644 --- a/dpsim/examples/cxx/Circuits/SP_PiLine.cpp +++ b/dpsim/examples/cxx/Circuits/SP_PiLine.cpp @@ -67,7 +67,7 @@ void simElements() { // SystemComponentList{vs, res, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iline", ind->attribute("i_intf")); @@ -119,7 +119,7 @@ void simPiLine() { SystemComponentList{vs, line, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("iline", line->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_SMIB_Fault.cpp index 966675f796..4178267a30 100644 --- a/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_SMIB_Fault.cpp @@ -105,7 +105,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -194,7 +194,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genSP, lineSP, extnetSP, fault}); // Logging - auto loggerSP = DataLogger::make(simNameSP, true, logDownSampling); + auto loggerSP = CPS::DataLogger::make(simNameSP, true, logDownSampling); loggerSP->logAttribute("v_gen", genSP->attribute("v_intf")); loggerSP->logAttribute("i_gen", genSP->attribute("i_intf")); loggerSP->logAttribute("Te", genSP->attribute("Te")); diff --git a/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_VBR_Load_Fault.cpp b/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_VBR_Load_Fault.cpp index fbbdb3751c..2d460aea7d 100644 --- a/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_VBR_Load_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/SP_ReducedOrderSG_VBR_Load_Fault.cpp @@ -125,7 +125,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genSP, load, fault}); // Logging - auto loggerSP = DataLogger::make(simNameSP, true, logDownSampling); + auto loggerSP = CPS::DataLogger::make(simNameSP, true, logDownSampling); loggerSP->logAttribute("v_gen", genSP->attribute("v_intf")); loggerSP->logAttribute("i_gen", genSP->attribute("i_intf")); loggerSP->logAttribute("Te", genSP->attribute("Te")); diff --git a/dpsim/examples/cxx/Circuits/SP_SMIB_ReducedOrderSG_LoadStep.cpp b/dpsim/examples/cxx/Circuits/SP_SMIB_ReducedOrderSG_LoadStep.cpp index f0647d65ab..697d35c444 100644 --- a/dpsim/examples/cxx/Circuits/SP_SMIB_ReducedOrderSG_LoadStep.cpp +++ b/dpsim/examples/cxx/Circuits/SP_SMIB_ReducedOrderSG_LoadStep.cpp @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) { SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) { // Logging // log node voltage - auto logger = DataLogger::make(simName, true, logDownSampling); + auto logger = CPS::DataLogger::make(simName, true, logDownSampling); for (auto node : systemSP.mNodes) logger->logAttribute(node->name() + ".V", node->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_PQLoad_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_PQLoad_with_PF_Init.cpp index d49a10b5f2..a1314f20a1 100644 --- a/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_PQLoad_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_PQLoad_with_PF_Init.cpp @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) { systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("i12", lineSP->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp index b78827c072..6fdb42855d 100644 --- a/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_Ramp_with_PF_Init.cpp @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -134,7 +134,7 @@ int main(int argc, char* argv[]) { systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simName); + auto loggerSP = CPS::DataLogger::make(simName); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("i12", lineSP->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_with_PF_Init.cpp b/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_with_PF_Init.cpp index e3b47c855e..1bc1b8b413 100644 --- a/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_with_PF_Init.cpp +++ b/dpsim/examples/cxx/Circuits/SP_Slack_PiLine_VSI_with_PF_Init.cpp @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) { SystemComponentList{extnetPF, linePF, loadPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -123,7 +123,7 @@ int main(int argc, char* argv[]) { systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("i12", lineSP->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_Fault.cpp b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_Fault.cpp index b16c3611aa..a6eca28f22 100644 --- a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_Fault.cpp @@ -80,7 +80,7 @@ void SP_SynGenTrStab_3Bus_Fault(String simName, Real timeStep, Real finalTime, b SystemComponentList{gen1PF, gen2PF, loadPF, line12PF, line13PF, line23PF, faultPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v_bus1", n1PF->attribute("v")); loggerPF->logAttribute("v_bus2", n2PF->attribute("v")); loggerPF->logAttribute("v_bus3", n3PF->attribute("v")); @@ -169,7 +169,7 @@ void SP_SynGenTrStab_3Bus_Fault(String simName, Real timeStep, Real finalTime, b systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("v3", n3SP->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_SteadyState.cpp b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_SteadyState.cpp index 941f7337ac..fdfc91eaaf 100644 --- a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_SteadyState.cpp +++ b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_3Bus_SteadyState.cpp @@ -69,7 +69,7 @@ void SP_SynGenTrStab_3Bus_SteadyState(String simName, Real timeStep, Real finalT SystemComponentList{gen1PF, gen2PF, loadPF, line12PF, line13PF, line23PF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v_bus1", n1PF->attribute("v")); loggerPF->logAttribute("v_bus2", n2PF->attribute("v")); loggerPF->logAttribute("v_bus3", n3PF->attribute("v")); @@ -141,7 +141,7 @@ void SP_SynGenTrStab_3Bus_SteadyState(String simName, Real timeStep, Real finalT systemSP.initWithPowerflow(systemPF); // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("v3", n3SP->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault.cpp b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault.cpp index 22a5e40f5f..1544648996 100644 --- a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault.cpp +++ b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault.cpp @@ -63,7 +63,7 @@ void SP_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, bo SystemComponentList{genPF, linePF, extnetPF, faultPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -127,7 +127,7 @@ void SP_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, bo // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); //gen diff --git a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault_KundurExample1.cpp b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault_KundurExample1.cpp index 4cb7f1a3b3..28b13e3989 100644 --- a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault_KundurExample1.cpp +++ b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_Fault_KundurExample1.cpp @@ -110,7 +110,7 @@ void SP_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, Re SystemComponentList{genPF, trafoPF, linePF, extnetPF, faultPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v3", n3PF->attribute("v")); @@ -180,7 +180,7 @@ void SP_1ph_SynGenTrStab_Fault(String simName, Real timeStep, Real finalTime, Re // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); loggerSP->logAttribute("v3", n3SP->attribute("v")); diff --git a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_SteadyState.cpp b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_SteadyState.cpp index 738af2d60c..301c6e4282 100644 --- a/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_SteadyState.cpp +++ b/dpsim/examples/cxx/Circuits/SP_SynGenTrStab_SMIB_SteadyState.cpp @@ -53,7 +53,7 @@ void SP_1ph_SynGenTrStab_SteadyState(String simName, Real timeStep, Real finalTi SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); @@ -105,7 +105,7 @@ void SP_1ph_SynGenTrStab_SteadyState(String simName, Real timeStep, Real finalTi // Logging - auto loggerSP = DataLogger::make(simNameSP); + auto loggerSP = CPS::DataLogger::make(simNameSP); loggerSP->logAttribute("v1", n1SP->attribute("v")); loggerSP->logAttribute("v2", n2SP->attribute("v")); //gen diff --git a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_LoadStep.cpp b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_LoadStep.cpp index cb45219851..5f355309ae 100644 --- a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_LoadStep.cpp +++ b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_LoadStep.cpp @@ -81,7 +81,7 @@ void DP_SynGenDq7odODE_LoadStep(Real timeStep, Real finalTime, Real breakerClose auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); @@ -134,7 +134,7 @@ void EMT_SynGenDq7odODE_LoadStep(Real timeStep, Real finalTime, Real breakerClos auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); diff --git a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_SteadyState.cpp b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_SteadyState.cpp index 65fdee8fe0..2157620a14 100644 --- a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_SteadyState.cpp +++ b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_SteadyState.cpp @@ -75,7 +75,7 @@ void DP_SynGenDq7odODE_SteadyState(Real timeStep, Real finalTime) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_load", res->attribute("i_intf")); @@ -114,7 +114,7 @@ void EMT_SynGenDq7odODE_SteadyState(Real timeStep, Real finalTime) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_load", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_ThreePhFault.cpp b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_ThreePhFault.cpp index 8e403a9978..59d64d5d87 100644 --- a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_ThreePhFault.cpp +++ b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odODE_ThreePhFault.cpp @@ -81,7 +81,7 @@ void DP_SynGenDq7odODE_ThreePhFault(Real timeStep, Real finalTime, String extens auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); @@ -132,7 +132,7 @@ void EMT_SynGenDq7odODE_ThreePhFault(Real timeStep, Real finalTime, String exten auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); diff --git a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_LoadStep.cpp b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_LoadStep.cpp index 144eb109c2..1539fd54fe 100644 --- a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_LoadStep.cpp +++ b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_LoadStep.cpp @@ -82,7 +82,7 @@ void DP_SynGenDq7odTrapez_LoadStep(Real timeStep, Real finalTime, Real breakerCl auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); @@ -134,7 +134,7 @@ void EMT_SynGenDq7odTrapez_LoadStep(Real timeStep, Real finalTime, Real breakerC auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); diff --git a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_SteadyState.cpp b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_SteadyState.cpp index fba608b702..51128b4b74 100644 --- a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_SteadyState.cpp +++ b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_SteadyState.cpp @@ -72,7 +72,7 @@ void DP_SynGenDq7odTrapez_SteadyState(Real timeStep, Real finalTime) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_load", res->attribute("i_intf")); @@ -109,7 +109,7 @@ void EMT_SynGenDq7odTrapez_SteadyState(Real timeStep, Real finalTime) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_load", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_ThreePhFault.cpp b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_ThreePhFault.cpp index 31ea4c508a..6bf811cfd3 100644 --- a/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_ThreePhFault.cpp +++ b/dpsim/examples/cxx/Components/DP_EMT_SynGenDq7odTrapez_ThreePhFault.cpp @@ -81,7 +81,7 @@ void DP_SynGenDq7odTrapez_ThreePhFault(Real timeStep, Real finalTime) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); @@ -131,7 +131,7 @@ void EMT_SynGenDq7odTrapez_ThreePhFault(Real timeStep, Real finalTime) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); diff --git a/dpsim/examples/cxx/Components/DP_Inverter_Grid.cpp b/dpsim/examples/cxx/Components/DP_Inverter_Grid.cpp index 25bc40a055..11e4ea8aaf 100644 --- a/dpsim/examples/cxx/Components/DP_Inverter_Grid.cpp +++ b/dpsim/examples/cxx/Components/DP_Inverter_Grid.cpp @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) { sim.doFrequencyParallelization(false); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v"), 1, 9); logger->logAttribute("v2", n2->attribute("v"), 1, 1); logger->logAttribute("v3", n3->attribute("v"), 1, 9); diff --git a/dpsim/examples/cxx/Components/DP_Multimachine_DQ_Parallel.cpp b/dpsim/examples/cxx/Components/DP_Multimachine_DQ_Parallel.cpp index a5d7e65c3f..7420fcac5e 100644 --- a/dpsim/examples/cxx/Components/DP_Multimachine_DQ_Parallel.cpp +++ b/dpsim/examples/cxx/Components/DP_Multimachine_DQ_Parallel.cpp @@ -101,7 +101,7 @@ void doSim(int threads, int generators, int repNumber) { auto sys = SystemTopology(60, nodes, components); // Logging - //auto logger = DataLogger::make(name); + //auto logger = CPS::DataLogger::make(name); //logger->logAttribute("v1", n1->attribute("v")); //logger->logAttribute("i_load", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels.cpp b/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels.cpp index 7efbdec358..30c4b8cb57 100644 --- a/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels.cpp +++ b/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels.cpp @@ -109,7 +109,7 @@ void SP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -168,7 +168,7 @@ void SP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); @@ -238,7 +238,7 @@ void DP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve SystemComponentList{genPF, linePF, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line", linePF->attribute("v_intf")); @@ -297,7 +297,7 @@ void DP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line", line->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels_doubleLine.cpp b/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels_doubleLine.cpp index bad77ce355..0c7685f080 100644 --- a/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels_doubleLine.cpp +++ b/dpsim/examples/cxx/Components/DP_SP_SynGenTrStab_testModels_doubleLine.cpp @@ -117,7 +117,7 @@ void SP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve SystemComponentList{genPF, linePF1, linePF21, linePF22, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line1", linePF1->attribute("v_intf")); @@ -195,7 +195,7 @@ void SP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line1", line1->attribute("v_intf")); @@ -280,7 +280,7 @@ void DP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve SystemComponentList{genPF, linePF1, linePF21, linePF22, extnetPF}); // Logging - auto loggerPF = DataLogger::make(simNamePF); + auto loggerPF = CPS::DataLogger::make(simNamePF); loggerPF->logAttribute("v1", n1PF->attribute("v")); loggerPF->logAttribute("v2", n2PF->attribute("v")); loggerPF->logAttribute("v_line1", linePF1->attribute("v_intf")); @@ -352,7 +352,7 @@ void DP_1ph_SynGenTrStab_Fault(Real timeStep, Real finalTime, bool startFaultEve // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("v2", n2->attribute("v")); logger->logAttribute("v_line1", line1->attribute("v_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_SteadyState.cpp b/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_SteadyState.cpp index 8f6f5189ed..592c5c63e8 100644 --- a/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_SteadyState.cpp +++ b/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_SteadyState.cpp @@ -72,7 +72,7 @@ int main(int argc, char* argv[]) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, res}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_load", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_ThreePhFault.cpp b/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_ThreePhFault.cpp index 2f7e6bc97c..886f2d495f 100644 --- a/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_ThreePhFault.cpp +++ b/dpsim/examples/cxx/Components/DP_SynGenDq7odODE_ThreePhFault.cpp @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) { fault->connect({SimNode::GND, n1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("i_load", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SynGenDq7odTrapez_ThreePhFault.cpp b/dpsim/examples/cxx/Components/DP_SynGenDq7odTrapez_ThreePhFault.cpp index 8cec3376d6..970b8e8431 100644 --- a/dpsim/examples/cxx/Components/DP_SynGenDq7odTrapez_ThreePhFault.cpp +++ b/dpsim/examples/cxx/Components/DP_SynGenDq7odTrapez_ThreePhFault.cpp @@ -75,7 +75,7 @@ int main(int argc, char* argv[]) { fault->connect({SimNode::GND, n1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SynGenTrStab_LoadStep.cpp b/dpsim/examples/cxx/Components/DP_SynGenTrStab_LoadStep.cpp index 16b4d2d4b9..d7e9892c27 100644 --- a/dpsim/examples/cxx/Components/DP_SynGenTrStab_LoadStep.cpp +++ b/dpsim/examples/cxx/Components/DP_SynGenTrStab_LoadStep.cpp @@ -55,7 +55,7 @@ int main(int argc, char* argv[]) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, load}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("i_load", load->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/DP_SynGenTrStab_SteadyState.cpp b/dpsim/examples/cxx/Components/DP_SynGenTrStab_SteadyState.cpp index 820ea3adad..5724301a8c 100644 --- a/dpsim/examples/cxx/Components/DP_SynGenTrStab_SteadyState.cpp +++ b/dpsim/examples/cxx/Components/DP_SynGenTrStab_SteadyState.cpp @@ -50,7 +50,7 @@ int main(int argc, char* argv[]) { res->connect({SimNode::GND, n1}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("i_load", res->attribute("i_intf")); diff --git a/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderDCIM_LoadStep_TurbineGovernor_Exciter.cpp b/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderDCIM_LoadStep_TurbineGovernor_Exciter.cpp index 0c618c2c46..66b15fdb99 100644 --- a/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderDCIM_LoadStep_TurbineGovernor_Exciter.cpp +++ b/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderDCIM_LoadStep_TurbineGovernor_Exciter.cpp @@ -41,7 +41,7 @@ int main(int argc, char* argv[]) { Bool withExciter = false; Real timeStepEvent = 30.0; Real cmdLoadFactor = 1.5; - + CommandLineArgs args(argc, argv); if (argc > 1) { @@ -78,14 +78,14 @@ int main(int argc, char* argv[]) { initActivePower, initReactivePower, initTerminalVoltageMagnitude, initTerminalVoltageAngle, initMechPower); - if (withGovernor) + if (withGovernor) gen->addGovernor(govKundur.Ta_t, govKundur.Tb, govKundur.Tc, govKundur.Fa, govKundur.Fb, govKundur.Fc, govKundur.Kg, govKundur.Tsr, govKundur.Tsm, initActivePower / syngenKundur.nomPower, initMechPower / syngenKundur.nomPower); - + if (withExciter) gen->addExciter(excEremia.Ta, excEremia.Ka, excEremia.Te, excEremia.Ke, excEremia.Tf, excEremia.Kf, excEremia.Tr); auto fault = CPS::EMT::Ph3::Switch::make("Br_fault", CPS::Logger::Level::info); - fault->setParameters(Math::singlePhaseParameterToThreePhase(RloadOriginal), + fault->setParameters(Math::singlePhaseParameterToThreePhase(RloadOriginal), Math::singlePhaseParameterToThreePhase(RloadNew)); fault->openSwitch(); @@ -97,7 +97,7 @@ int main(int argc, char* argv[]) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); diff --git a/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderVBR_LoadStep_TurbineGovernor_Exciter.cpp b/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderVBR_LoadStep_TurbineGovernor_Exciter.cpp index 4657a87644..f7a700b097 100644 --- a/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderVBR_LoadStep_TurbineGovernor_Exciter.cpp +++ b/dpsim/examples/cxx/Components/EMT_SynchronGenerator9OrderVBR_LoadStep_TurbineGovernor_Exciter.cpp @@ -41,7 +41,7 @@ int main(int argc, char* argv[]) { Bool withExciter = false; Real timeStepEvent = 30.0; Real cmdLoadFactor = 1.5; - + CommandLineArgs args(argc, argv); if (argc > 1) { @@ -79,14 +79,14 @@ int main(int argc, char* argv[]) { gen->setInitialValues(initActivePower, initReactivePower, initTerminalVoltageMagnitude, initTerminalVoltageAngle, initMechPower); - if (withGovernor) + if (withGovernor) gen->addGovernor(govKundur.Ta_t, govKundur.Tb, govKundur.Tc, govKundur.Fa, govKundur.Fb, govKundur.Fc, govKundur.Kg, govKundur.Tsr, govKundur.Tsm, initActivePower / syngenKundur.nomPower, initMechPower / syngenKundur.nomPower); if (withExciter) gen->addExciter(excEremia.Ta, excEremia.Ka, excEremia.Te, excEremia.Ke, excEremia.Tf, excEremia.Kf, excEremia.Tr); auto fault = CPS::EMT::Ph3::Switch::make("Br_fault", CPS::Logger::Level::info); - fault->setParameters(Math::singlePhaseParameterToThreePhase(RloadOriginal), + fault->setParameters(Math::singlePhaseParameterToThreePhase(RloadOriginal), Math::singlePhaseParameterToThreePhase(RloadNew)); fault->openSwitch(); @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) { auto sys = SystemTopology(60, SystemNodeList{n1}, SystemComponentList{gen, fault}); // Logging - auto logger = DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); logger->logAttribute("v1", n1->attribute("v")); logger->logAttribute("i_gen", gen->attribute("i_intf")); logger->logAttribute("wr_gen", gen->attribute("w_r")); diff --git a/dpsim/examples/cxx/Examples.h b/dpsim/examples/cxx/Examples.h index ed7af6ae35..49883b4af7 100644 --- a/dpsim/examples/cxx/Examples.h +++ b/dpsim/examples/cxx/Examples.h @@ -99,9 +99,9 @@ namespace ExcitationSystemEremia { namespace TurbineGovernor { struct TurbineGovernorPSAT1 { - // Turbine Governor type 1 - // Taken from from PSAT - example d_014_pss_l14 - + // Turbine Governor type 1 + // Taken from from PSAT - example d_014_pss_l14 + // Reference speed (p.u.) Real OmegaRef = 1.0; // Pilot valve droop (p.u.) @@ -123,9 +123,9 @@ namespace TurbineGovernor { }; struct TurbineGovernorPSAT2 { - // Turbine Governor type 1 + // Turbine Governor type 1 // Taken from PSAT - example d_anderson_farmer - + // Reference speed (p.u.) Real OmegaRef = 1.0; // Pilot valve droop (p.u.) @@ -279,7 +279,7 @@ namespace SMIB { Complex initComplexElectricalPower = Complex(initActivePower, initReactivePower); Complex initTerminalVolt = VnomMV * Complex(cos(initVoltAngle), sin(initVoltAngle)); - // + // Real SwitchClosed = 0.1; Real SwitchOpen = 1e6; }; @@ -368,7 +368,7 @@ namespace Scenario5 { } namespace Scenario6 { - // SMIB scenario with ideal trafo and load step as event + // SMIB scenario with ideal trafo and load step as event struct Config { // default configuration of scenario @@ -402,7 +402,7 @@ namespace Scenario6 { Real lineConductance = 0.0048; // Psnub 0.5% of 555MW // Load step - Real loadStepActivePower = 100e6; + Real loadStepActivePower = 100e6; }; } @@ -619,7 +619,7 @@ namespace CIGREMV { } } - void logPVAttributes(DPsim::DataLogger::Ptr logger, CPS::TopologicalPowerComp::Ptr pv) { + void logPVAttributes(CPS::DataLogger::Ptr logger, CPS::TopologicalPowerComp::Ptr pv) { // power controller std::vector inputNames = { pv->name() + "_powerctrl_input_pref", pv->name() + "_powerctrl_input_qref", @@ -647,7 +647,7 @@ namespace CIGREMV { } namespace Events { - std::shared_ptr createEventAddPowerConsumption(String nodeName, Real eventTime, Real additionalActivePower, SystemTopology& system, Domain domain, DPsim::DataLogger::Ptr logger) { + std::shared_ptr createEventAddPowerConsumption(String nodeName, Real eventTime, Real additionalActivePower, SystemTopology& system, Domain domain, CPS::DataLogger::Ptr logger) { // TODO: use base classes ph1 if (domain == CPS::Domain::DP) { @@ -675,7 +675,7 @@ namespace Events { } } - std::shared_ptr createEventAddPowerConsumption3Ph(String nodeName, Real eventTime, Real additionalActivePower, SystemTopology& system, Domain domain, DPsim::DataLogger::Ptr logger) { + std::shared_ptr createEventAddPowerConsumption3Ph(String nodeName, Real eventTime, Real additionalActivePower, SystemTopology& system, Domain domain, CPS::DataLogger::Ptr logger) { // TODO: use base classes ph3 if (domain == CPS::Domain::EMT) { diff --git a/dpsim/examples/cxx/RealTime/RT_CIGRE_MV_PowerFlowTest.cpp b/dpsim/examples/cxx/RealTime/RT_CIGRE_MV_PowerFlowTest.cpp index 07f4a1c8d3..7269752130 100644 --- a/dpsim/examples/cxx/RealTime/RT_CIGRE_MV_PowerFlowTest.cpp +++ b/dpsim/examples/cxx/RealTime/RT_CIGRE_MV_PowerFlowTest.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv){ CIM::Reader reader(Logger::Level::debug, Logger::Level::off, Logger::Level::off); SystemTopology system = reader.loadCIM(system_freq, filenames, CPS::Domain::SP); - auto logger = DPsim::DataLogger::make(simName); + auto logger = CPS::DataLogger::make(simName); for (auto node : system.mNodes) { logger->logAttribute(node->name(), node->attribute("v")); diff --git a/dpsim/include/dpsim/DiakopticsSolver.h b/dpsim/include/dpsim/DiakopticsSolver.h index a976c4c002..e3eb651722 100644 --- a/dpsim/include/dpsim/DiakopticsSolver.h +++ b/dpsim/include/dpsim/DiakopticsSolver.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -49,9 +49,9 @@ namespace DPsim { CPS::SystemTopology mSystem; /// Left side vector logger - std::shared_ptr mLeftVectorLog; + std::shared_ptr mLeftVectorLog; /// Right side vector logger - std::shared_ptr mRightVectorLog; + std::shared_ptr mRightVectorLog; std::vector mSubnets; std::unordered_map::Ptr, Subnet*> mNodeSubnetMap; diff --git a/dpsim/include/dpsim/MNASolver.h b/dpsim/include/dpsim/MNASolver.h index fa6d430944..af5b6874da 100644 --- a/dpsim/include/dpsim/MNASolver.h +++ b/dpsim/include/dpsim/MNASolver.h @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -109,9 +109,9 @@ namespace DPsim { /// Last simulation time step when log was updated Int mLastLogTimeStep = 0; /// Left side vector logger - std::shared_ptr mLeftVectorLog; + std::shared_ptr mLeftVectorLog; /// Right side vector logger - std::shared_ptr mRightVectorLog; + std::shared_ptr mRightVectorLog; /// LU factorization measurements std::vector mFactorizeTimes; diff --git a/dpsim/include/dpsim/MNASolverDirect.h b/dpsim/include/dpsim/MNASolverDirect.h index 4a3e93f0da..4262ee364a 100644 --- a/dpsim/include/dpsim/MNASolverDirect.h +++ b/dpsim/include/dpsim/MNASolverDirect.h @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/dpsim/include/dpsim/MNASolverFactory.h b/dpsim/include/dpsim/MNASolverFactory.h index 64875010ab..e24bafb92c 100644 --- a/dpsim/include/dpsim/MNASolverFactory.h +++ b/dpsim/include/dpsim/MNASolverFactory.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/dpsim/include/dpsim/Simulation.h b/dpsim/include/dpsim/Simulation.h index d8a78a2a27..6712dcc1bd 100644 --- a/dpsim/include/dpsim/Simulation.h +++ b/dpsim/include/dpsim/Simulation.h @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -80,7 +80,7 @@ namespace DPsim { /// (Real) time needed for the timesteps std::vector mStepTimes; /// Map of data loggers. mLoggers[**mName] corresponds to the default simulation logger - std::map> mDataLoggers; + std::map> mDataLoggers; // #### Solver Settings #### /// @@ -132,7 +132,7 @@ namespace DPsim { struct LoggerMapping { /// Simulation data logger - DataLogger::Ptr logger; + CPS::DataLogger::Ptr logger; /// Downsampling UInt downsampling; }; @@ -232,7 +232,7 @@ namespace DPsim { } /// Add a new data logger. /// When the name of the new logger matches the simulation name, the default simulation logger will be replaced! - void addLogger(DataLogger::Ptr logger) { + void addLogger(CPS::DataLogger::Ptr logger) { mDataLoggers[logger->name()] = logger; } @@ -258,7 +258,7 @@ namespace DPsim { Real finalTime() const { return **mFinalTime; } Int timeStepCount() const { return mTimeStepCount; } Real timeStep() const { return **mTimeStep; } - std::map> loggers() const { return mDataLoggers; } + std::map> loggers() const { return mDataLoggers; } std::shared_ptr scheduler() const { return mScheduler; } std::vector& stepTimes() { return mStepTimes; } diff --git a/dpsim/include/dpsim/Solver.h b/dpsim/include/dpsim/Solver.h index a1791a4356..c4c17c9f6a 100644 --- a/dpsim/include/dpsim/Solver.h +++ b/dpsim/include/dpsim/Solver.h @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/dpsim/src/CMakeLists.txt b/dpsim/src/CMakeLists.txt index 0f0460a280..e88a73e1a6 100644 --- a/dpsim/src/CMakeLists.txt +++ b/dpsim/src/CMakeLists.txt @@ -11,7 +11,6 @@ set(DPSIM_SOURCES Utils.cpp Timer.cpp Event.cpp - DataLogger.cpp Scheduler.cpp SequentialScheduler.cpp ThreadScheduler.cpp diff --git a/dpsim/src/MNASolver.cpp b/dpsim/src/MNASolver.cpp index e7a1cf60ce..e44b071b13 100644 --- a/dpsim/src/MNASolver.cpp +++ b/dpsim/src/MNASolver.cpp @@ -249,7 +249,7 @@ void MnaSolver::initializeSystemWithPrecomputedMatrices() { auto idObj = std::dynamic_pointer_cast(comp); SPDLOG_LOGGER_DEBUG(mSLog, "Stamping {:s} {:s} into source vector", idObj->type(), idObj->name()); - SPDLOG_LOGGER_TRACE(mSLog, "\n{:s}", Logger::matrixToString(mRightSideVector)); + SPDLOG_LOGGER_DEBUG(mSLog, "\n{:s}", Logger::matrixToString(mRightSideVector)); } } @@ -277,7 +277,7 @@ void MnaSolver::initializeSystemWithVariableMatrix() { auto idObj = std::dynamic_pointer_cast(comp); SPDLOG_LOGGER_DEBUG(mSLog, "Stamping {:s} {:s} into source vector", idObj->type(), idObj->name()); - SPDLOG_LOGGER_TRACE(mSLog, "\n{:s}", Logger::matrixToString(mRightSideVector)); + SPDLOG_LOGGER_DEBUG(mSLog, "\n{:s}", Logger::matrixToString(mRightSideVector)); } } diff --git a/dpsim/src/Simulation.cpp b/dpsim/src/Simulation.cpp index 0023b671d4..ea53fbb8ee 100644 --- a/dpsim/src/Simulation.cpp +++ b/dpsim/src/Simulation.cpp @@ -56,7 +56,7 @@ void Simulation::create() { mLog = Logger::get(Logger::LoggerType::SIMULATION, **mName, mLogLevel, mCliLevel); // Create default Data Logger - mDataLoggers[**mName] = DataLogger::make(**mName); + mDataLoggers[**mName] = CPS::DataLogger::make(**mName); Eigen::setNbThreads(1); diff --git a/dpsim/src/pybind/main.cpp b/dpsim/src/pybind/main.cpp index e42b7a4792..ce6655ccab 100644 --- a/dpsim/src/pybind/main.cpp +++ b/dpsim/src/pybind/main.cpp @@ -138,13 +138,13 @@ PYBIND11_MODULE(dpsimpy, m) { py::class_>(m, "Interface"); - py::class_>(m, "Logger") + py::class_>(m, "Logger") .def(py::init()) .def_static("set_log_dir", &CPS::Logger::setLogDir) .def_static("get_log_dir", &CPS::Logger::logDir) - .def("log_attribute", py::overload_cast(&DPsim::DataLogger::logAttribute), "name"_a, "attr"_a, "max_rows"_a = 0, "max_cols"_a = 0) + .def("log_attribute", py::overload_cast(&CPS::DataLogger::logAttribute), "name"_a, "attr"_a, "max_rows"_a = 0, "max_cols"_a = 0) /// Compatibility method. Might be removed later when the python examples have been fully adapted. - .def("log_attribute", py::overload_cast&, CPS::AttributeBase::Ptr>(&DPsim::DataLogger::logAttribute), "names"_a, "attr"_a); + .def("log_attribute", py::overload_cast&, CPS::AttributeBase::Ptr>(&CPS::DataLogger::logAttribute), "names"_a, "attr"_a); py::class_>(m, "IdentifiedObject") .def("name", &CPS::IdentifiedObject::name)