1 #include <dpsim-models/Definitions.h>
2 #include <dpsim-models/Logger.h>
5 #include <dpsim-models/Base/Base_ReducedOrderSynchronGenerator.h>
6 #include <dpsim-models/DP/DP_Ph1_SynchronGenerator4OrderPCM.h>
7 #include <dpsim-models/DP/DP_Ph1_SynchronGenerator4OrderTPM.h>
8 #include <dpsim-models/DP/DP_Ph1_SynchronGenerator6OrderPCM.h>
12 template <
class BaseClass>
class Creator {
17 virtual std::shared_ptr<BaseClass>
18 Create(
const std::string &name,
19 CPS::Logger::Level logLevel = CPS::Logger::Level::debug) = 0;
22 template <
class DerivedClass,
class BaseClass>
26 std::shared_ptr<BaseClass>
27 Create(
const std::string &name,
28 CPS::Logger::Level logLevel = CPS::Logger::Level::debug) {
29 return std::shared_ptr<BaseClass>(
new DerivedClass(name, logLevel));
33 template <
class BaseClass>
class Factory {
40 std::vector<std::string> getItems() {
42 std::vector<std::string> items;
43 for (
auto g : functionMap) {
44 items.push_back(g.first);
50 std::shared_ptr<BaseClass>
51 create(std::string type,
const std::string &name,
52 CPS::Logger::Level logLevel = CPS::Logger::Level::debug) {
54 auto it = functionMap.find(type);
55 if (it != functionMap.end())
56 return it->second->Create(name, logLevel);
63 functionMap[type] = Fn;
70 auto i = functionMap.begin();
71 while (i != functionMap.end()) {
77 std::map<std::string, Creator<BaseClass> *> functionMap;
87 namespace SynchronGeneratorFactory {
90 void registerSynchronGenerators() {
116 void registerSynchronGenerators() {
4 Order Synchronous generator model for transient stability analysis
4 Order Synchronous generator model for transient stability analysis
6 Order Synchronous generator model for transient stability analysis
Base class for SP VBR synchronous generator model single phase.
Voltage-Behind-Reactance (VBR) implementation of 3rd order synchronous generator model.
Voltage-Behind-Reactance (VBR) implementation of 4th order synchronous generator model.
Voltage-Behind-Reactance (VBR) implementation of 5th type 2 order synchronous generator model Ref: Mi...
Voltage-Behind-Reactance (VBR) implementation of 6th order synchronous generator model Marconato's mo...
Voltage-Behind-Reactance (VBR) implementation of 6th order synchronous generator model Anderson-Fouad...