Skip to main content

build_mc_ac_opf_preparation

Function build_mc_ac_opf_preparation 

Source
pub fn build_mc_ac_opf_preparation(
    instance: &McAcOpfInstance,
    bases: &McAcOpfAssemblyOptions,
) -> Result<McAcOpfPreparation, Error>
Expand description

Prepare the AC multiconductor IVR profile without creating solver expressions.

Supports coupled lines, shunts, capacitors, ideal switches/sources, WYE and DELTA loads/generators, voltage-dependent loads, winding-current transformer descriptors (including supported continuous taps), and supported IBR controls. SI instance values become coefficients on the explicitly selected bases. No impedance inverse or neutral reduction is performed.

Voltage selections use bus names; conductor selections use line:name, switch:name, and transformer:name; capability selections use generator names and ibr:name. Deselection removes bounds, never device physics.

Initial points, unreferenced islands, floating source neutrals, ideal conductor cycles/paths between fixed references, and angle windows outside (-pi/2,pi/2) are unsupported by this profile. This is not a claim of infeasibility. The caller owns expression compilation, differentiation and optimization.

§Examples

use powerio_matrix::{McAcOpfAssemblyOptions, build_mc_ac_opf_preparation};
use powerio_prob::McAcOpfInstance;
let bases = McAcOpfAssemblyOptions::new(230.0, 1000.0);
let prepared = build_mc_ac_opf_preparation(instance, &bases)?;
// Global voltage indices refer to prepared.terminals, not bus rows.

§Errors

Invalid shapes/units/identities, unsupported semantic fields or equipment, missing source coverage, and structurally dependent ideal conductor cycles.