« Previous « Start » Next »
B The Matlab Interface Routines - Utility Routines
B.1 cpx2mat
Purpose
cpx2mat 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] = cpx2mat(Name,PriLev);
Description of Input
Name |
Name of the MPS file with extension. cpx2mat 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. |
|
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 CPLEX.
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 MatlabCPLEXinterface routine cplex.m,
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.
« Previous « Start » Next »