25 using Ptr = std::shared_ptr<SystemTopology>;
101 template <
typename VarType>
122 template <
typename Type>
typename std::shared_ptr<Type>
node(
UInt index);
125 template <
typename Type>
126 typename std::shared_ptr<Type>
node(std::string_view name);
129 template <
typename Type>
132 if (comp->name() == name) {
133 auto comp2 = std::dynamic_pointer_cast<Type>(comp);
157 template <
typename VarType>
162 template <
typename VarType>
168 void renderToFile(
String filename);
172 template <
typename VarType>
void multiplyPowerComps(
Int numberCopies);
std::shared_ptr< IdentifiedObject > Ptr
std::shared_ptr< SimNode< VarType > > Ptr
std::shared_ptr< SimPowerComp< VarType > > Ptr
void removeNode(const String &name)
Real mSystemOmega
System angular frequency - omega.
void addNodes(const TopologicalNode::List &topNodes)
Add multiple nodes.
Real mSystemFrequency
System frequency.
IdentifiedObject::List mComponents
List of network components.
std::shared_ptr< Type > node(UInt index)
Returns TopologicalNode by index in node list.
void initWithPowerflow(const SystemTopology &systemPF, CPS::Domain domain)
Initialize nodes and SG power from PowerFlow.
void removeComponent(const String &name)
Remove system component.
void addNode(TopologicalNode::Ptr topNode)
Adds node and initializes frequencies.
std::map< String, String, std::less<> > listIdObjects() const
void addTearComponent(IdentifiedObject::Ptr component)
Adds component and initializes frequencies.
std::shared_ptr< Type > component(const String &name)
Returns Component by name.
void componentsAtNodeList()
TopologicalNode::List mNodes
List of network nodes.
Matrix initFrequency(Real frequency) const
std::shared_ptr< SystemTopology > Ptr
SystemTopology(Real frequency)
void reset()
Reset state of components.
void addNodeAt(TopologicalNode::Ptr topNode, UInt index)
Adds node at specified position and initializes frequencies.
void addComponents(const IdentifiedObject::List &components)
Add multiple components.
Matrix mFrequencies
List of considered network frequencies.
void connectComponentToNodes(typename SimPowerComp< VarType >::Ptr component, typename SimNode< VarType >::List simNodes)
Connect component to simNodes.
void addComponent(IdentifiedObject::Ptr component)
Adds component and initializes frequencies.
SystemTopology(Real frequency, Matrix frequencies, TopologicalNode::List nodes, IdentifiedObject::List components)
Standard constructor for multi frequency simulations.
SystemTopology(Real frequency, IdentifiedObject::List components)
SystemTopology(Real frequency, TopologicalNode::List nodes, IdentifiedObject::List components)
Standard constructor for single frequency simulations.
void multiply(Int numberCopies)
Copy the whole topology the given number of times and add the resulting components and nodes to the t...
void splitSubnets(std::vector< CPS::SystemTopology > &splitSystems)
IdentifiedObject::List mTearComponents
SystemTopology()
Do not use this constructor.
void addTearComponents(const IdentifiedObject::List &components)
Add multiple components.
int checkTopologySubnets(std::unordered_map< typename CPS::SimNode< VarType >::Ptr, int > &subnet)
std::map< TopologicalNode::Ptr, TopologicalPowerComp::List > mComponentsAtNode
Map of network components connected to network nodes.
std::shared_ptr< TopologicalNode > Ptr
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.