Skip to main content

polish_class

Function polish_class 

Source
pub fn polish_class(
    was_answer: bool,
    class: Option<StationarityClass>,
    no_branch_descends: impl FnOnce() -> bool,
) -> Result<bool, String>
Expand description

What a polished point may be reported as, from its certificate class. Ok(true): an answer (S, or not searched: what answers accepts). Ok(false): the weak fallback (W, kept_if_nothing_better). Err: not taken, with the reason. An answer (was_answer) is demoted to W only when no_branch_descends() – the B-stationarity check at the polished point reads B: the ladder reports W only when no S exists, and the S it had was S only because a nearly biactive pair counted as one-sided (the OPF volt-var knots, which polish to W and B-stationary). The check runs only in that case.