Constraint violation
= Constraint violation
{title2=$v_i(x)=\max\{-g_i(x),0\}$}
For a constraint written $g_i(x)\geq0$, its violation is the nonnegative number $v_i(x)=\max\{-g_i(x),0\}$. It vanishes precisely when the constraint holds. An equality $h_j(x)=0$ has violation $|h_j(x)|$. A norm of all these violations measures total infeasibility; its numerical magnitude depends on the scaling of the constraint functions.