DPsim
Public Types | Public Member Functions | Public Attributes | List of all members
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. More...
 
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.
 
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.

Constructor & Destructor Documentation

◆ SystemTopology() [1/2]

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() [2/2]

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.

Member Function Documentation

◆ reset()

void SystemTopology::reset ( )

Reset state of components.

DEPRECATED: Unused.

Definition at line 240 of file SystemTopology.cpp.

Member Data Documentation

◆ 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: