bundles / scipy 1.17.1 / scipy / optimize / _constraints / LinearConstraint / residual
function
scipy.optimize._constraints:LinearConstraint.residual
Signature
def residual ( self , x ) Summary
Calculate the residual between the constraint function and the limits
Extended Summary
For a linear constraint of the form
lb <= A@x <= ubthe lower and upper residuals between A@x and the limits are values sl and sb such that
lb + sl == A@x == ub - sbWhen all elements of sl and sb are positive, all elements of the constraint are satisfied; a negative element in sl or sb indicates that the corresponding element of the constraint is not satisfied.
Parameters
x: array_likeVector of independent variables
Returns
sl, sb: array-likeThe lower and upper residuals
Aliases
-
scipy.optimize.LinearConstraint.residual