Skip to main content

pio_ac_ots_solution_create

Function pio_ac_ots_solution_create 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pio_ac_ots_solution_create( instance: *const PioCalculationInstance, branch_closed: *const u8, branch_count: usize, ac_solution: *const PioCalculationSolution, error: *mut *mut PioError, ) -> *mut PioModule
Expand description

Attach the AC OPF solution computed on the instance’s fixed topology for branch_closed, as a new AC OTS solution module that carries the instance module’s records. Construction checks the topology, the exact fixed-problem correspondence, finite values, and zero flow on open branches; it does not check residuals or optimality.

§Safety

Pointers and handles must satisfy the crate-level safety requirements.