Skip to main content

pio_normalize_with_options

Function pio_normalize_with_options 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pio_normalize_with_options( net: *const PioNetwork, clamp_angle_bounds: i32, angle_bound_pad: f64, errbuf: *mut c_char, errlen: usize, ) -> *mut PioNetwork
Expand description

Normalize net into a NEW network handle, with opt in solver preparation repairs. clamp_angle_bounds != 0 applies the same branch angle difference bound repair as PowerModels (angmin <= -pi/2, angmax >= pi/2, and zero/zero bounds replaced by [-angle_bound_pad, angle_bound_pad]). A repair that would invert the interval widens to that same window. The default pad is 1.0472 radians. Existing read warnings and repair warnings are attached to the returned handle and can be read with pio_warnings.