|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
Spanning-tree node used during loop/cutset detection. More...
#include <State_Space_Model.h>
Public Member Functions | |
| Tree (Element *e, Bus *cur, Bus *r, std::shared_ptr< Tree > p=nullptr) | |
| Constructs a tree node for graph traversal. | |
| void | addPathElement (Element *e) |
| Appends an element to the path from root to this node. | |
| Bus * | getRoot () const |
| Element * | getElement () const |
| Bus * | getCurrentNode () const |
| const std::vector< Element * > & | getSubelements () const |
| std::shared_ptr< Tree > | getParent () const |
| bool | containsNode (Bus *node) const |
| Checks whether a bus appears anywhere in this subtree. | |
| std::vector< Element * > | getPath () const |
| Returns the full element path from root to this node. | |
| std::string | toString () const |
| Returns a human-readable description of this tree node. | |
Spanning-tree node used during loop/cutset detection.
Each node stores the element that connects to the current bus, the path of elements traversed so far, and a link back to the parent node in the search tree.
|
inline |
Constructs a tree node for graph traversal.
| e | Element associated with this node. |
| cur | Current bus being visited. |
| r | Root bus of the spanning tree. |
| p | Parent tree node (nullptr for the root). |
|
inline |
Appends an element to the path from root to this node.
| bool StateSpaceModel::Tree::containsNode | ( | Bus * | node | ) | const |
Checks whether a bus appears anywhere in this subtree.
| node | Bus to search for. |
node is the current node or a descendant.
|
inline |
|
inline |
| std::vector< Element * > StateSpaceModel::Tree::getPath | ( | ) | const |
Returns the full element path from root to this node.
|
inline |
|
inline |
| std::string StateSpaceModel::Tree::toString | ( | ) | const |
Returns a human-readable description of this tree node.