Solve linear programming problems with Xpress Optimizer.
x = xprslp(f,A,b,rtype,lb,ub,options)
[x,fval,exitflag,output,lambda] = xprslp(...)
Finds the minimum of a problem specified by
min f*x
st. A*x ≤/=/≤ b
lb ≤ x ≤ ub
A is an m x n matrix; f, b, rtype, lb, and ub are vectors.
Input arguments rtype, lb, ub and options can be omitted, with the condition that, if one is omitted, also all the following ones must be omitted (as in x=xprslp(f,A,b,rtype)). Omitting an input argument has the same effect as passing an empty array [].
All output arguments can be omitted too, again with the condition that, if one is omitted, also all the following ones must be omitted (as in [x,fval]=xprslp(f,A,b,rtype)).
Note If the specified input bounds for a problem are inconsistent, the output x and fval are set to []. |
f | Linear objective function vector. | |
A | Matrix for linear constraints. | |
b | Vector for constraints rhs. | |
rtype | Character vector (string) giving the row types: | |
lb | Lower bounds. If lb = [] it means there are no lower bounds. | |
ub | Upper bounds. If ub = [] it means there are no upper bounds. | |
options | Options structure created with optimset or xprsoptimset functions. See xprsoptimset for more details. | |
x | Solution found by the optimization function. If exitflag > 0, then x is a solution; otherwise, x is the value of the optimization routine when it terminated prematurely. | |
fval | Value of the objective function at the solution x. | |
exitflag | Integer identifying the reason the optimization algorithm terminated. The following lists the values of exitflag and the corresponding reasons the algorithm terminated. | |
1 | Function converged to a solution x (LPSTATUS=OPTIMAL). | |
0 | Number of iterations exceeded iter limit (LPSTATUS=UNFINISHED and STOPSTATUS=ITERLIMIT). | |
-2 | No feasible point was found (LPSTATUS=INFEAS). | |
-3 | Problem is unbounded (LPSTATUS=UNDOUNDED). | |
-8 | Other stop reason, see LPSTATUS and STOPSTATUS for details. | |
output | Structure containing information about the optimization and, eventually, values of Xpress controls and attributes. See linprog and the section Setting and querying controls and attributes for details. | |
lambda | Structure containing the Lagrange multipliers at the solution x (separated by constraint type). The fields of the structure are: | |
lower | Lower bounds lb | |
upper | Upper bounds ub | |
lin | Linear constraints from matrix A | |
xprsoptimset, linprog