Builds index lists for each type of bus (REF, PV, PQ).
Computes partial derivatives of current balance w.r.t. voltage.
Computes partial derivatives of power injection w.r.t. voltage.
Builds the B matrices and phase shift injections for DC power flow.
Computes the partial derivative of the bus injections with respect to
voltage magnitude. If vm
is empty, it assumes no voltage dependence
and returns a sparse zero matrix.
Forms the power flow Jacobian.
Builds the vector of complex bus power injections.
Builds vectors of nominal complex bus power demands for ZIP loads.
Builds the bus admittance matrix and branch admittance matrices.