ILOG CPLEX 11.0 File Formats > > ILOG CPLEX File Formats > MPS File Format: Industry Standard > Quadratic Objective Information in MPS Files |
Quadratic Objective Information in MPS Files |
INDEX PREVIOUS NEXT |
If you use the ILOG CPLEX barrier optimizer for quadratic programming problems (QPs), then you can specify quadratic objective coefficients in MPS format in a QMATRIX
section.
Following the BOUNDS
section, a QMATRIX
section may be specified. Each line of this section defines one nonzero coefficient of the matrix Q. Each line should contain two variable names (which must have been specified in the COLUMNS
section) in Fields 2 and 3, followed by a nonzero coefficient value in Field 4. For each off-diagonal coefficient, two lines must appear: one for the lower triangular element, and one for the upper triangular element. ILOG CPLEX evaluates the quadratic part of the objective function as 0.5 x'Qx, when the coefficients of Q are specified in an MPS file.
For example, consider the following problem:
Minimize | ||||||||||
a |
+ |
b |
+ |
1/2 |
(a2 |
+ |
4ab |
+ |
7b2) | |
subject to | ||||||||||
a |
+ |
b |
10 | |||||||
a, |
b |
0 |
In MPS format, you may enter the problem in the following way:
NAME problem ROWS N obj G c1 COLUMNS a obj 1 c1 1 b obj 1 c1 1 RHS rhs c1 10 QMATRIX a a 1 a b 2 b a 2 b b 7 ENDATA |
You can also enter the quadratic objective coefficients by using a QUADOBJ section. In this format, only the upper diagonal elements of the Q matrix are entered. For the same example, the input with a QUADOBJ section looks like this:
NAME problem ROWS N obj G c1 COLUMNS a obj 1 c1 1 b obj 1 c1 1 RHS rhs c1 10 QUADOBJ a a 1 a b 2 b b 7 ENDATA |
If you have a model with quadratic objective information in MPS format in a QUADOBJ
section of the following form, you do not have to convert your file in order for ILOG CPLEX to make use of it.
varname1 varname2 value |
ILOG CPLEX can read that file and interpret the QUADOBJ
section correctly. However, the MPS file writers of ILOG CPLEX do not produce a QUADOBJ
section themselves. Instead, they produce a QMATRIX
section, as explained here.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |