Skip to main content

PRIMAL_FEASIBILITY_TOL

Constant PRIMAL_FEASIBILITY_TOL 

Source
pub const PRIMAL_FEASIBILITY_TOL: f64 = 1e-8;
Expand description

Primal-feasibility tolerance of the inequality-constrained active-set Newton solver, measured in the unit-normalized row metric this module defines: a point β is feasible for a ConstraintSet exactly when

max_r  (b_r − a_r·β) / ‖a_r‖  ≤  PRIMAL_FEASIBILITY_TOL

over the non-vacuous rows — the quantity ConstraintSet::max_scaled_violation returns. This is the ONE definition of “feasible” in the codebase; the solver certifies its returned iterate against it, every entry gate admits against it, and ConstraintSet::max_contract_feasible_step sizes steps against it.

It lives beside the metric rather than in the solver because the two are the same statement: the metric says what is measured, this says at what resolution. gam_solve::active_set re-exports it as ACTIVE_SET_PRIMAL_FEASIBILITY_TOL.

Any consumer that re-derives a RAW (un-scaled) feasibility tolerance from a returned iterate must scale this value by the per-row normalization the constraint builder applied; demanding tighter feasibility than this is inconsistent with the solver contract and will spuriously reject valid boundary solutions (gam#2719: a step rule that demanded exact feasibility refused 314 steps that violated nothing at this tolerance).