31 Bus(
const std::string& name,
const std::string& location,
int number);
85 std::string lower = busName;
86 std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower);
87 return lower ==
"gnd";
113 std::map<std::string, double>& globalParams)
const;
121 std::map<std::string, double>& globalParams)
const;
141 std::string busLocation;
143 std::vector<Element*> connectedElements;
145 std::map<std::string, double> busOPFInfo;
Central include hub for Harmony: third-party libraries, standard headers, and shared type aliases.
A network node connecting one or more element terminals.
Definition Bus.h:21
void setOPFInfo(const std::map< std::string, double > &info)
Store OPF-related metadata for this bus (area, voltage limits, etc.).
Definition Bus.h:127
void setBusName(const std::string &name)
Replace the bus name.
Definition Bus.h:73
bool isGround() const
Check whether this bus represents ground.
Definition Bus.h:84
std::map< std::string, double > getOPFInfo() const
Retrieve stored OPF metadata.
Definition Bus.h:135
void computePowerFlowDC(std::map< std::string, double > &busDC, std::map< std::string, double > &globalParams) const
Compute DC bus quantities for optimal power flow.
Definition Bus.cpp:53
void attachElement(Element *elem)
Append an element to the connected-elements list.
Definition Bus.cpp:27
vector< Element * > getConnectedElements()
Get a copy of the list of elements connected to this bus.
Definition Bus.h:60
void printConnectedElements()
Print connected element information to standard output.
Definition Bus.cpp:38
bool operator==(const char *name)
Compare this bus name to a C-string.
Definition Bus.cpp:22
int getPinNumber()
Get the number of pins/phases on this bus.
Definition Bus.h:48
std::string getBusName()
Get the bus name.
Definition Bus.h:42
~Bus()
Clear connected-element references; does not delete elements.
Definition Bus.cpp:17
void computePowerFlowAC(std::map< std::string, double > &busAC, std::map< std::string, double > &globalParams) const
Compute AC bus quantities for optimal power flow.
Definition Bus.cpp:46
void detachElement(Element *elem)
Remove an element from the connected-elements list without deleting it.
Definition Bus.cpp:31
std::string getBusLocation()
Get the bus location label (e.g.
Definition Bus.h:54
Base class for multi-phase network elements with Y-parameters and MNA stamping hooks.
Definition Element.h:29