pwrs.core.bustypes#
- pwrs.core.bustypes.bustypes(bus, gen)[source]#
Classify buses into REF, PV, and PQ sets.
Combine the declared bus type with online generator status to determine the reference, PV, and PQ bus index sets used by power flow and OPF routines.
- Parameters:
bus (npt.NDArray[np.float64]) – Bus matrix.
gen (npt.NDArray[np.float64]) – Generator matrix.
- Returns:
Column vectors
(ref, pv, pq)of one-based bus indices.- Return type:
tuple