pub fn build_dc_opf_preparation(
instance: &DcOpfInstance,
options: &DcOpfAssemblyOptions,
) -> Result<DcOpfPreparation>Expand description
Derive the complete matrix free DC OPF arrays from the instance: demand,
shunt, and phase shift withdrawals, generator costs and bounds with their
source row mapping, branch susceptances as positive solver edge weights,
thermal limits, angle bounds, and the reference bus set. This is the one
numerical assembly the matrix builders, the bundle writer, and external
solvers read, published so each consumer formulates over the same arrays
instead of re-deriving them from the network. DcOpfPreparation
documents each field’s unit and sign.