pub fn calc_solver_branch_flow_matrix(
bus_branch_incidence: &CsMat<f64>,
susceptance_magnitude: &[f64],
) -> CsMat<f64>Expand description
Calculate the branch flow matrix Diagonal(w) * Aᵀ, shape m × n. Solver
preparations pass positive factor weights; DcOperators passes the public
PowerModels susceptances for its public Bf. The one branch flow matrix
assembly in the crate.
A complete affine branch flow also adds -b * shift; problem
preparations expose that term through
DcOpfPreparation::calc_branch_flow_offset. In the public PowerModels sign
spelling the same flow is p_branch = -Bf va + b .* shift with negated
susceptances. DcOpfMatrices::branch_flow_matrix
is this matrix over a preparation’s incidence and weights.
§Panics
Panics if susceptance_magnitude.len() is not the incidence column count.