QpBound - A module for solving bound-constrained QPs of moderate size.
This page is part of the OOQP documentation .
We see a vector x = (x_1,x_2,...,x_n) that solves the following problem
min_x c'x + (1/2) x'Qx, subject to x_i >= l_i, for i in L, x_i <= u_i, for i in U,
where Q is a positive semidefinite matrix, L and U are subsets of {1,2,...,n}, and l_i and u_i are lower and upper bounds, respectively. This solver stores Q as a symmetric dense matrix, and uses dense linear algebra software to solve the linear system at each interior-point iteration. Therefore, it should not be used to solve large problems.
An implementation of the QpBound solver that uses Gondzio's algorithm and reads data from a QPS file is supplied with the OOQP distribution. To generate this executable, first follow the installation procedures described in the file INSTALL. Then, from the main OOQP directory, type
make qpbound-dense-gondzio.exe
The QPS file format should be the same as that used for input to the general QP solvers. This format is described in detail in the OOQP User Guide. There is one important restriction, however: The QPS file should not define any elements of a general constraint matrix (since this cannot be accommodated by the bound-constrained formulation). Specifically, as well as following the general rules for QPS file, the format should have the following properties.
The ROWS section should contain a single entry (corresponding to the name assigned to the linear term c in the objective function).
The COLUMNS section should contain n entries, one for each element of the vector x. Each entry should name the element of x, name the objective function, and give the numerical value of the corresponding component of the linear term c.
The RHS section should be empty. That is, a line ``RHS'' should appear in the file, followed immediately by the line ``BOUNDS'' (indicating that the RHS section is empty).
The RANGES sections should be absent. (There is no need even for the line ``RANGES'' to appear in the file.)
The solver will terminate with an error message if the QPS file does not have these properties.
We note one aspect of the QPS standard which is significant here: Each component of x is assumed by default to have a lower bound of 0 and an upper bound of infinity. When the BOUNDS section specifies only a lower bound l_i on the component x_i, then the component x_i is assumed to be bounded as follows: l_i <= x_i. When the BOUNDS section specifies only an upper bound u_i on x_i, the component x_i is assumed to be bounded as follows: 0 <= x_i <= u_i. When the BOUNDS section specifies both a lower bound l_i and an upper bound u_i, the component x_i is assumed to be bounded as follows: l_i <= x_i <= u_i.
Further information can be found in the OOQP User Guide and references cited therein, and on the following web site:
http://www-fp.mcs.anl.gov/otc/Guide/OptWeb/continuous/constrained/linearprog/mps.html
(This site discusses MPS format, which is identical to QPS format with the exception of the QUADOBJ section, which defines the Hessian Q.)
Having constructed the qpbound-dense-gondzio.exe executable and an input file, the solver can be invoked as follows:
qpbound-dense-gondzio.exe [ options ] filename
where filename is a path to the qps file, and the options are as follows:
If no options are specified, a print-level of 10 is assumed. That is, progress information from each interior-point iteration is printed, along with the solution.
When requested, the solution is printed to the standard output stream. First the vector x is listed by components, in the same order as the components appeared in the COLUMNS section of the QPS input file. Next, the Lagrange multipliers tau for the lower bounds are printed. Only components of tau for which lower bounds actually are present in the formulation are listed. Finally, the Lagrange multipliers nu for the upper bounds are printed. Only components of nu for which upper bounds actually are present in the formulation are listed.
We have provided a sample input file examples/QpBound/simple.qps with the OOQP distribution. To invoke the solver on this file, go to the directory OOQP and type
qpbound-dense-gondzio.exe examples/QpBound/simple.qps
If you wish the solver to print only the solution, type instead the following:
qpbound-dense-gondzio.exe --quiet examples/QpBound/simple.qps
or
qpbound-dense-gondzio.exe --print-level N examples/QpBound/simple.qps
where N is some integer between 0 and 9 (inclusive).
If you have the PETSc libraries installed, you may build a bound constrained QP solver that uses PETSc to solve the linear systems that arise in the QP algorithm. The executable is named qpbound-petsc-mehrotra.exe and may be called in the following manner.
qpbound-petsc-mehrotra.exe [ -print-level num ] [ -quiet ] [ -verbose ] -file problem.qps
The program options have the same meaning as given above. Not however, that only a single dash is used, and that the -file switch is required before the file name. The program also accepts all options understood by PETSc, allowing the the precoditioner, for instance, to be set at run time. The program is capable of being run on multiple processors, but the mechanism for invoking such a run is system-dependant.
See the PETSc section in the INSTALL file for instructions on how to build this executable.