|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
A network node connecting one or more element terminals. More...
#include <Bus.h>
Public Member Functions | |
| Bus (const std::string &name, const std::string &location, int number) | |
| Construct a bus with name, grid location, and pin/phase count. | |
| ~Bus () | |
| Clear connected-element references; does not delete elements. | |
| std::string | getBusName () |
| Get the bus name. | |
| int | getPinNumber () |
| Get the number of pins/phases on this bus. | |
| std::string | getBusLocation () |
| Get the bus location label (e.g. | |
| vector< Element * > | getConnectedElements () |
| Get a copy of the list of elements connected to this bus. | |
| bool | operator== (const char *name) |
| Compare this bus name to a C-string. | |
| void | setBusName (const std::string &name) |
| Replace the bus name. | |
| bool | isGround () const |
| Check whether this bus represents ground. | |
| void | attachElement (Element *elem) |
| Append an element to the connected-elements list. | |
| void | detachElement (Element *elem) |
| Remove an element from the connected-elements list without deleting it. | |
| void | printConnectedElements () |
| Print connected element information to standard output. | |
| void | computePowerFlowAC (std::map< std::string, double > &busAC, std::map< std::string, double > &globalParams) const |
| Compute AC bus quantities for optimal power flow. | |
| void | computePowerFlowDC (std::map< std::string, double > &busDC, std::map< std::string, double > &globalParams) const |
| Compute DC bus quantities for optimal power flow. | |
| void | setOPFInfo (const std::map< std::string, double > &info) |
| Store OPF-related metadata for this bus (area, voltage limits, etc.). | |
| std::map< std::string, double > | getOPFInfo () const |
| Retrieve stored OPF metadata. | |
A network node connecting one or more element terminals.
Tracks connected elements, location (AC/DC), optional OPF parameters, and supports ground detection by name. Does not own connected elements.
| Bus::Bus | ( | const std::string & | name, |
| const std::string & | location, | ||
| int | number | ||
| ) |
Construct a bus with name, grid location, and pin/phase count.
| name | Bus identifier (e.g. node name). |
| location | Grid context string (e.g. "AC" or "DC"). |
| number | Number of pins/phases; must be greater than zero. |
| std::invalid_argument | if number is not positive. |
| Bus::~Bus | ( | ) |
Clear connected-element references; does not delete elements.
| void Bus::attachElement | ( | Element * | elem | ) |
Append an element to the connected-elements list.
| elem | Non-owning pointer to the element; must not be null. |
Referenced by Network::connectElementToBus().
| void Bus::computePowerFlowAC | ( | std::map< std::string, double > & | busAC, |
| std::map< std::string, double > & | globalParams | ||
| ) | const |
Compute AC bus quantities for optimal power flow.
| busAC | Output map of AC bus OPF results keyed by quantity name. |
| globalParams | Shared global OPF parameters. |
Referenced by PowerFlow::addBusAC().
| void Bus::computePowerFlowDC | ( | std::map< std::string, double > & | busDC, |
| std::map< std::string, double > & | globalParams | ||
| ) | const |
Compute DC bus quantities for optimal power flow.
| busDC | Output map of DC bus OPF results keyed by quantity name. |
| globalParams | Shared global OPF parameters. |
Referenced by PowerFlow::addBusDC().
| void Bus::detachElement | ( | Element * | elem | ) |
Remove an element from the connected-elements list without deleting it.
| elem | Element pointer to detach. |
|
inline |
Get the bus location label (e.g.
AC or DC grid).
Referenced by Network::add_areas(), and StabilityEstimate::compute_transfer_function().
|
inline |
Get the bus name.
Referenced by Network::add_areas(), Network::addBus(), PowerFlow::addBusAC(), PowerFlow::addBusDC(), StabilityEstimate::compute_transfer_function(), Network::connectElementToBus(), example_state_space(), extendBusAC(), PowerFlow::make_Converter(), PowerFlow::make_Generator(), PowerFlow::make_Load(), PowerFlow::make_OPF(), PowerFlow::make_RES(), and Network::printConnections().
|
inline |
Get a copy of the list of elements connected to this bus.
|
inline |
Retrieve stored OPF metadata.
|
inline |
Get the number of pins/phases on this bus.
Referenced by Network::addBusView(), Network::connectElementToBus(), Network::deleteBus(), StateSpaceModel::formState(), and PowerFlow::make_OPF().
|
inline |
Check whether this bus represents ground.
Ground is detected when the bus name equals "gnd" (case-insensitive).
Referenced by Network::addBusView(), StabilityEstimate::compute_equivalent_admittance_parameters_num(), Network::deleteBus(), and StateSpaceModel::formState().
| bool Bus::operator== | ( | const char * | name | ) |
Compare this bus name to a C-string.
| name | Name to compare against. |
| void Bus::printConnectedElements | ( | ) |
Print connected element information to standard output.
|
inline |
Replace the bus name.
| name | New bus identifier. |
|
inline |
Store OPF-related metadata for this bus (area, voltage limits, etc.).
| info | Map of OPF parameter names to values. |