pwrs.core.makeB#
- pwrs.core.makeB.makeB_pair(baseMVA, bus=None, branch=None, alg=None)[source]#
Return
(Bp, Bpp)with explicit Python semantics.
- pwrs.core.makeB.makeB_matrix(baseMVA, bus=None, branch=None, alg=None)[source]#
Return
Bponly with explicit Python semantics.
- pwrs.core.makeB.makeB(baseMVA, bus=None, branch=None, alg=None, *, nargout=None)[source]#
Build fast-decoupled power flow
B'andB''matrices.Mirrors MATPOWER’s
makeBhelper by constructing the susceptance matrices used by the FDXB or FDBX fast-decoupled power flow algorithms.- Parameters:
baseMVA (float or dict) – System base MVA, or a MATPOWER case struct.
bus (array_like or str, optional) – Bus matrix, or algorithm selector when
baseMVAis a case struct.branch (array_like, optional) – Branch matrix when
baseMVAis not a case struct.alg (str or numeric, optional) – Fast-decoupled variant,
'FDXB'or'FDBX'.nargout (int, optional) – MATLAB compatibility flag controlling whether both
BpandBppare returned.
- Returns:
Bpalone, or(Bp, Bpp)whennargout > 1.- Return type:
scipy.sparse.spmatrix or tuple