bundles / scipy latest / scipy / optimize / _linprog_util / _check_result
function
scipy.optimize._linprog_util:_check_result
Signature
def _check_result ( x , fun , status , slack , con , bounds , tol , message , integrality ) Summary
Check the validity of the provided solution.
Extended Summary
A valid (optimal) solution satisfies all bounds, all slack variables are negative and all equality constraint residuals are strictly non-zero. Further, the lower-bounds, upper-bounds, slack and residuals contain no nan values.
Parameters
x: 1-D arraySolution vector to original linear programming problem
fun: floatoptimal objective value for original problem
status: intAn integer representing the exit status of the optimization
0 : Optimization terminated successfully 1 : Iteration limit reached 2 : Problem appears to be infeasible 3 : Problem appears to be unbounded 4 : Serious numerical difficulties encountered
slack: 1-D arrayThe (non-negative) slack in the upper bound constraints, that is,
b_ub - A_ub @ xcon: 1-D arrayThe (nominally zero) residuals of the equality constraints, that is,
b - A_eq @ xbounds: 2D arrayThe bounds on the original variables
xmessage: strA string descriptor of the exit status of the optimization.
tol: floatTermination tolerance; see [1] Section 4.5.
Returns
status: intAn integer representing the exit status of the optimization
0 : Optimization terminated successfully 1 : Iteration limit reached 2 : Problem appears to be infeasible 3 : Problem appears to be unbounded 4 : Serious numerical difficulties encountered
message: strA string descriptor of the exit status of the optimization.
Aliases
-
scipy.optimize._linprog._check_result