Solve mixed integer quadratic programming problems with Xpress Optimizer.
x = xprsmiqp(H,f,A,b,rtype,ctype,clim,sos,lb,ub,x0,options)
[x,fval,exitflag,output] = xprsmiqp(...)
Finds the minimum of a problem specified by
min 0.5*x'*H*x + f*x
st. A*x ≤/=/≤ b
lb ≤ x ≤ ub
x in the domain specified by the ctype, clim and SOS arguments
H is an n x n matrix; A is an m x n matrix; f, b, rtype, ctype, clim, lb, ub and x0 are vectors; sos is a struct vector.
Input arguments rtype and followings can be omitted, with the condition that, if one is omitted, also all the following ones must be omitted (as in x=xprsmiqp(H,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]=xprsmiqp(H,f,A,b,rtype)).
Note If the specified input bounds for a problem are inconsistent, the output x and fval are set to []. |
H | Matrix for quadratic objective terms. | |
f | Linear objective function vector. | |
A | Matrix for linear constraints. | |
b | Vector for constraints rhs. | |
rtype | Character vector (string) giving the row types: | |
ctype | Character vector (string) giving the column types: | |
clim |
Vector containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (column types P, S, R). Values in the positions corresponding to all other columns are ignored. | |
sos | Struct vector defining SOS sets. The number of SOS sets is given by the number of elements in the struct. The struct must contain the following fields: | |
sos(i).type | a character indicating the SOS type, either '1' or '2'; | |
sos(i).ind | numeric vector with the indices of columns in the set (column indices start from 0); | |
sos(i).wt | numeric vector with the reference row weights corresponding to the columns in the sos(i).ind vector. It must have the same length as sos(i).ind. | |
lb | Lower bounds. If lb = [] it means there are no lower bounds. | |
ub | Upper bounds. If ub = [] it means there are no upper bounds. | |
x0 | Optional initial known solution used to speed-up search. | |
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 (MIPSTATUS=MIP_OPTIMAL). | |
0 | Number of iterations exceeded iter limit (STOPSTATUS=ITERLIMIT). | |
-2 | The problem is infeasible (MIPSTATUS=MIP_INFEAS). | |
-4 | Number of searched nodes exceeded limit (STOPSTATUS=STOP_NODELIMIT). | |
-5 | Search time exceeded limit (STOPSTATUS=STOP_TIMELIMIT). | |
-8 | Other stop reason, see MIPSTATUS and STOPSTATUS for details. | |
output | Structure containing information about the optimization and, eventually, values of Xpress controls and attributes. See bintprog and the section Setting and querying controls and attributes for details. | |
xprsoptimset, bintprog, quadprog