« Previous « Start » Next »
B The Matlab Interface Routines - Utility Routines
B.1 xpr2mat
Purpose
xpr2mat reads an (X)MPS file and more. The file is converted to
matrices and vectors made available in MATLAB. MPS and extended MPS
for LP, MILP, QP and MIQP are the supported file types, however it
is possible to supply a wide range of file types.
Calling Syntax
[
F,
c,
A,
b_
L,
b_
U,
x_
L,
x_
U,
IntVars] = xpr2mat(Name, PriLev,
FreeRows);
Description of Input
Name |
Name of the MPS file without extension. xpr2mat can
recognize many different file extensions, e.g.: .mps, .lp,
.mat, .qps. |
|
PriLev |
Print level of cpx2mat. Set to 0 to have it
silent, 1 to print warnings, and 2 to print debug information. |
|
FreeRows |
Set to 1 to delete free rows. 0 leaves the free rows. Default: 1. |
|
Description of Output
F |
The quadratic term matrix. Empty for non-QP problems. |
c |
The linear term vector. |
|
A |
The constraint matrix. |
b_L |
The lower bounds of the constraints. |
b_U |
The upper bounds of the constraints. |
|
x_L |
The lower box bounds of x. |
x_U |
The upper box bounds of x. |
|
IntVars |
Logical vector describing what variables that are integer
or binary variables. Empty if the problem is not a mixed
integer problem. |
|
B.2 abc2gap
Purpose
Converting a general assignment problem (GAP) to a
standard form suitable for a MIP solver.
The GAP problem is formulated as
|
|
|
|
|
s/t |
|
|
|
|
x Bm × n, B={0,1}. |
|
Calling Syntax
[c, x_L, x_U, b_L, b_U, a, sos1] = abc2gap( A, b, C, SOS1);
Description of Input
A |
A m × n constraint matrix for GAP constraints. |
b |
A m × 1 right hand side vector. |
C |
A m × n cost matrix for GAP constraints. |
SOS1 |
Logical variable, default false.
If true, generate output for sos1 handling with XpressMP
Otherwise generate output giving an equivalent formulation
with standard integer variables. |
Description of Output
c |
Linear objective function cost coefficients,
vector m*n × 1. |
x_L |
Lower bounds on design parameters x. |
x_U |
Upper bounds on design parameters x. |
b_L |
Lower bounds on the m+n linear constraints. |
b_U |
Upper bounds on the linear constraints. |
a |
Sparse
m + n × m * n
matrix for linear constraints. |
sos1 |
If input variable SOS1 is true,
structure with sos1 variable information in the form suitable
for the Matlab XpressMP interface routine xpress,
otherwise empty. |
Description
Converting a general assignment problem (GAP) to standard form suitable for
a mixed-integer programming solver.
Either binary or sos1 variables are used.
B.3 xp2control
Purpose
Xpress
MP Matlab MEX-interface internal callback routine
Calling Syntax
xp2control(xpicv,xpdcv,xpccv1,xpccv2,xpccv3,xpccv4,xpccv5,xpccv6)
Description of Input
xpicv |
Vector of doubles with XpressMP Integer Control Variables. |
xpdcv |
Vector of doubles with XpressMP Double Control Variables. |
xpccv1 |
String with 1st XpressMP String Control Variable. |
xpccv2 |
String with 2nd XpressMP String Control Variable. |
xpccv3 |
String with 3rd XpressMP String Control Variable. |
xpccv4 |
String with 4th XpressMP String Control Variable. |
xpccv5 |
String with 5th XpressMP String Control Variable. |
xpccv6 |
String with 6th XpressMP String Control Variable. |
Global Parameters Used
|
|
xpControlVariables |
Structure with all XpressMP control variables.
Set before the callback. |
Description
Xpress
MP Matlab MEX-interface internal callback routine.
Creates a global Matlab structure variable xpControlVariables,
where the fields corresponds to the Xpress
MP control variable names
as given in Section 7 in the Xpress-Optimizer Reference Manual [
1].
B.4 xp2problem
Purpose
Xpress
MP Matlab MEX-interface internal callback routine
Calling Syntax
xp2problem(xpipv,xpdpv,xpcpv1,xpcpv2,xpcpv3,xpcpv4,xpcpv5)
Description of Input
xpipv |
Vector of doubles with XpressMP Integer Problem Variables. |
xpdpv |
Vector of doubles with XpressMP Double Problem Variables. |
xpcpv1 |
String with 1st XpressMP String Problem Variable. |
xpcpv2 |
String with 2nd XpressMP String Problem Variable. |
xpcpv3 |
String with 3rd XpressMP String Problem Variable. |
xpcpv4 |
String with 4th XpressMP String Problem Variable. |
xpcpv5 |
String with 5th XpressMP String Problem Variable. |
Global Parameters Used
|
|
xpProblemAttrib |
Structure with all XpressMP problem attributes listed in
Section 8 in the Xpress-Optimizer Reference Manual [1].
Set before the callback. |
Description
Xpress
MP Matlab MEX-interface internal callback routine.
Creates a global Matlab structure variable
xpProblemAttrib,
where the fields corresponds to the Xpress
MP problem attribute names.
« Previous « Start » Next »