DPsim
Loading...
Searching...
No Matches
CPS::SystemTopology Class Reference

Public Types

using Ptr = std::shared_ptr<SystemTopology>
 

Public Member Functions

 SystemTopology ()
 Do not use this constructor.
 
 SystemTopology (Real frequency)
 
 SystemTopology (Real frequency, IdentifiedObject::List components)
 
 SystemTopology (Real frequency, TopologicalNode::List nodes, IdentifiedObject::List components)
 Standard constructor for single frequency simulations.
 
 SystemTopology (Real frequency, Matrix frequencies, TopologicalNode::List nodes, IdentifiedObject::List components)
 Standard constructor for multi frequency simulations.
 
Matrix initFrequency (Real frequency) const
 
void reset ()
 Reset state of components.
 
void addNode (TopologicalNode::Ptr topNode)
 Adds node and initializes frequencies.
 
void addNodeAt (TopologicalNode::Ptr topNode, UInt index)
 Adds node at specified position and initializes frequencies.
 
void addNodes (const TopologicalNode::List &topNodes)
 Add multiple nodes.
 
void addComponent (IdentifiedObject::Ptr component)
 Adds component and initializes frequencies.
 
template<typename VarType>
void connectComponentToNodes (typename SimPowerComp< VarType >::Ptr component, typename SimNode< VarType >::List simNodes)
 Connect component to simNodes.
 
void componentsAtNodeList ()
 
void addComponents (const IdentifiedObject::List &components)
 Add multiple components.
 
void initWithPowerflow (const SystemTopology &systemPF, CPS::Domain domain)
 Initialize nodes and SG power from PowerFlow.
 
void addTearComponent (IdentifiedObject::Ptr component)
 Adds component and initializes frequencies.
 
void addTearComponents (const IdentifiedObject::List &components)
 Add multiple components.
 
template<typename Type>
std::shared_ptr< Type > node (UInt index)
 Returns TopologicalNode by index in node list.
 
template<typename Type>
std::shared_ptr< Type > node (std::string_view name)
 Returns TopologicalNode by name.
 
template<typename Type>
std::shared_ptr< Type > component (const String &name)
 Returns Component by name.
 
std::map< String, String, std::less<> > listIdObjects () const
 
void multiply (Int numberCopies)
 Copy the whole topology the given number of times and add the resulting components and nodes to the topology.
 
void removeComponent (const String &name)
 Remove system component.
 
template<typename VarType>
int checkTopologySubnets (std::unordered_map< typename CPS::SimNode< VarType >::Ptr, int > &subnet)
 
template<typename VarType>
void splitSubnets (std::vector< CPS::SystemTopology > &splitSystems)
 
template<typename VarType>
void splitSubnets (std::vector< SystemTopology > &splitSystems)
 
template<typename VarType>
int checkTopologySubnets (std::unordered_map< typename SimNode< VarType >::Ptr, int > &subnet)
 

Public Attributes

Matrix mFrequencies
 List of considered network frequencies.
 
TopologicalNode::List mNodes
 List of network nodes.
 
IdentifiedObject::List mComponents
 List of network components.
 
IdentifiedObject::List mTearComponents
 
std::map< TopologicalNode::Ptr, TopologicalPowerComp::List > mComponentsAtNode
 Map of network components connected to network nodes.
 
Real mSystemFrequency
 System frequency.
 
Real mSystemOmega
 System angular frequency - omega.
 

Detailed Description

Definition at line 23 of file SystemTopology.h.

Member Typedef Documentation

◆ Ptr

using CPS::SystemTopology::Ptr = std::shared_ptr<SystemTopology>

Definition at line 25 of file SystemTopology.h.

Constructor & Destructor Documentation

◆ SystemTopology() [1/5]

CPS::SystemTopology::SystemTopology ( )
inline

Do not use this constructor.

Definition at line 47 of file SystemTopology.h.

◆ SystemTopology() [2/5]

CPS::SystemTopology::SystemTopology ( Real frequency)
inline

Constructor to be used if components and nodes are added one by one

Definition at line 51 of file SystemTopology.h.

◆ SystemTopology() [3/5]

CPS::SystemTopology::SystemTopology ( Real frequency,
IdentifiedObject::List components )
inline

This constructor requires a search for all nodes which is not implemented yet!

Definition at line 57 of file SystemTopology.h.

◆ SystemTopology() [4/5]

CPS::SystemTopology::SystemTopology ( Real frequency,
TopologicalNode::List nodes,
IdentifiedObject::List components )
inline

Standard constructor for single frequency simulations.

Definition at line 63 of file SystemTopology.h.

◆ SystemTopology() [5/5]

CPS::SystemTopology::SystemTopology ( Real frequency,
Matrix frequencies,
TopologicalNode::List nodes,
IdentifiedObject::List components )
inline

Standard constructor for multi frequency simulations.

Definition at line 72 of file SystemTopology.h.

Member Function Documentation

◆ addComponent()

void SystemTopology::addComponent ( IdentifiedObject::Ptr component)

Adds component and initializes frequencies.

Definition at line 51 of file SystemTopology.cpp.

◆ addComponents()

void SystemTopology::addComponents ( const IdentifiedObject::List & components)

Add multiple components.

Definition at line 80 of file SystemTopology.cpp.

◆ addNode()

void SystemTopology::addNode ( TopologicalNode::Ptr topNode)

Adds node and initializes frequencies.

Definition at line 25 of file SystemTopology.cpp.

◆ addNodeAt()

void SystemTopology::addNodeAt ( TopologicalNode::Ptr topNode,
UInt index )

Adds node at specified position and initializes frequencies.

Definition at line 34 of file SystemTopology.cpp.

◆ addNodes()

void SystemTopology::addNodes ( const TopologicalNode::List & topNodes)

Add multiple nodes.

Definition at line 46 of file SystemTopology.cpp.

◆ addTearComponent()

void SystemTopology::addTearComponent ( IdentifiedObject::Ptr component)

Adds component and initializes frequencies.

Definition at line 117 of file SystemTopology.cpp.

◆ addTearComponents()

void SystemTopology::addTearComponents ( const IdentifiedObject::List & components)

Add multiple components.

Definition at line 129 of file SystemTopology.cpp.

◆ checkTopologySubnets()

template<typename VarType>
int CPS::SystemTopology::checkTopologySubnets ( std::unordered_map< typename SimNode< VarType >::Ptr, int > & subnet)

Definition at line 303 of file SystemTopology.cpp.

◆ component()

template<typename Type>
std::shared_ptr< Type > CPS::SystemTopology::component ( const String & name)
inline

Returns Component by name.

Definition at line 130 of file SystemTopology.h.

◆ componentsAtNodeList()

void SystemTopology::componentsAtNodeList ( )

Definition at line 71 of file SystemTopology.cpp.

◆ connectComponentToNodes()

template<typename VarType>
template void SystemTopology::connectComponentToNodes< Complex > ( typename SimPowerComp< VarType >::Ptr component,
typename SimNode< VarType >::List simNodes )

Connect component to simNodes.

Definition at line 63 of file SystemTopology.cpp.

◆ initFrequency()

Matrix SystemTopology::initFrequency ( Real frequency) const

Definition at line 19 of file SystemTopology.cpp.

◆ initWithPowerflow()

void SystemTopology::initWithPowerflow ( const SystemTopology & systemPF,
CPS::Domain domain )

Initialize nodes and SG power from PowerFlow.

Definition at line 85 of file SystemTopology.cpp.

◆ listIdObjects()

std::map< String, String, std::less<> > SystemTopology::listIdObjects ( ) const

Definition at line 161 of file SystemTopology.cpp.

◆ multiply()

void SystemTopology::multiply ( Int numberCopies)

Copy the whole topology the given number of times and add the resulting components and nodes to the topology.

Definition at line 233 of file SystemTopology.cpp.

◆ node() [1/2]

template<typename Type>
template std::shared_ptr< SimNode< Complex > > SystemTopology::node< SimNode< Complex > > ( std::string_view name)

Returns TopologicalNode by name.

Definition at line 148 of file SystemTopology.cpp.

◆ node() [2/2]

template<typename Type>
template std::shared_ptr< SimNode< Complex > > SystemTopology::node< SimNode< Complex > > ( UInt index)

Returns TopologicalNode by index in node list.

Definition at line 136 of file SystemTopology.cpp.

◆ removeComponent()

void SystemTopology::removeComponent ( const String & name)

Remove system component.

Parameters
namename of the component

Definition at line 246 of file SystemTopology.cpp.

◆ reset()

void SystemTopology::reset ( )

Reset state of components.

DEPRECATED: Unused.

Definition at line 240 of file SystemTopology.cpp.

◆ splitSubnets()

template<typename VarType>
void CPS::SystemTopology::splitSubnets ( std::vector< SystemTopology > & splitSystems)

Definition at line 258 of file SystemTopology.cpp.

Member Data Documentation

◆ mComponents

IdentifiedObject::List CPS::SystemTopology::mComponents

List of network components.

Definition at line 32 of file SystemTopology.h.

◆ mComponentsAtNode

std::map<TopologicalNode::Ptr, TopologicalPowerComp::List> CPS::SystemTopology::mComponentsAtNode

Map of network components connected to network nodes.

Definition at line 37 of file SystemTopology.h.

◆ mFrequencies

Matrix CPS::SystemTopology::mFrequencies

List of considered network frequencies.

Definition at line 28 of file SystemTopology.h.

◆ mNodes

TopologicalNode::List CPS::SystemTopology::mNodes

List of network nodes.

Definition at line 30 of file SystemTopology.h.

◆ mSystemFrequency

Real CPS::SystemTopology::mSystemFrequency

System frequency.

Definition at line 42 of file SystemTopology.h.

◆ mSystemOmega

Real CPS::SystemTopology::mSystemOmega

System angular frequency - omega.

Definition at line 44 of file SystemTopology.h.

◆ mTearComponents

IdentifiedObject::List CPS::SystemTopology::mTearComponents

List of tearing components could be used by a solver to split the network into subnetworks

Definition at line 35 of file SystemTopology.h.


The documentation for this class was generated from the following files: