Bus struct
#include <gtopt/bus.hpp>
Electrical busbar (node) in the power network.
Represents a busbar in power system analysis with electrical properties and operational status. In DC power flow (Kirchhoff) mode a voltage-angle variable θ is created for every bus; the reference bus is fixed at θ = 0.
Public static variables
- static LPClassName class_name
Public functions
- auto needs_kirchhoff(const double v_threshold) const -> bool
- Determines if Kirchhoff's law should be applied.
Public variables
- OptActive active
- Operational status (default: active).
- OptName description
- Name name
- Human-readable name.
- OptReal reference_theta
- Fixed voltage angle for reference bus [rad].
- OptName type
- Optional bus type tag (e.g. "pq", "pv", "slack").
- Uid uid
- Unique identifier.
- OptBool use_kirchhoff
- Override global Kirchhoff setting for this bus.
- OptReal voltage
LinDistFlow fields (model_options.network_model =
"lindistflow"; ignored by the DC model)
Function documentation
bool gtopt:: Bus:: needs_kirchhoff(const double v_threshold) const
Determines if Kirchhoff's law should be applied.
| Parameters | |
|---|---|
| v_threshold | Minimum voltage threshold for application |
| Returns | true if Kirchhoff's law should be applied |
Variable documentation
static LPClassName gtopt:: Bus:: class_name
Canonical class-name constant used in LP row labels and config fields like VariableScale::class_name. Single source of truth — BusLP exposes no separate ClassName member; callers reach the constant via Bus::class_name directly (or BusLP::Element::class_name in generic contexts).
OptName gtopt:: Bus:: description
Optional free-text description (e.g. conversion provenance)
OptReal gtopt:: Bus:: reference_voltage
Fixed voltage magnitude [p.u.] (slack / substation bus). A bus with reference_theta and no reference_voltage is held at 1 p.u.