If you are licensed to use the ILOG CPLEX barrier optimizer for quadratic programming problems (QPs), then you can specify quadratic objective coefficients in MPS format.
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:
In MPS format, you may enter the problem in the following way:
If an auxiliary QP file is used to define the quadratic objective coefficients, the linear and quadratic parts are entered separately. This QP file should have a NAME
line, a QMATRIX
section (identical in format to the one used in MPS files), and it should terminate with an ENDATA
line. For the example, the quadratic coefficients in a QP file would look like this: