Skip to main content

cost_quadratic_diag

Function cost_quadratic_diag 

Source
pub fn cost_quadratic_diag(q: &[f64]) -> CsMat<f64>
Expand description

Q = diag(q) as a sparse matrix — the quadratic-cost analog of susceptance_diag. Feeds the DC-OPF QP objective ½ pᵀ Q p + cᵀ p consumed by the kkt interior-point operators.