Jump to content

Quadratic programming: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Software packages that include QP solvers: Added OOQP, a freely available quadratic programming solver
Apmonitor (talk | contribs)
Tag: possible conflict of interest
Line 68: Line 68:
{| class="wikitable" border=1
{| class="wikitable" border=1
!Name
!Name
!Brief info
|-
|[[IMSL Numerical Libraries]]|| Collections of math and statistical algorithms available in C/C++, Fortran, Java and C#/.NET. Optimization routines in the IMSL Libraries include unconstrained, linearly and nonlinearly constrained minimizations, and linear programming algorithms.
|-
|-
|[http://www.aimms.com/ AIMMS Optimization Modeling], the [[AIMMS]] software
|[http://www.aimms.com/ AIMMS Optimization Modeling], the [[AIMMS]] software
|-
|-
|[http://www.ampl.com/ AMPL Modelling Language] [[AMPL]] (free for students for problems with up to 300 variables and 300 constraints)
|[http://www.ampl.com/ AMPL Modeling Language] [[AMPL]] (free for students for problems with up to 300 variables and 300 constraints)
|-
|[[APMonitor]] Modeling Language [http://apmonitor.ath.cx/online/view_pass.php trial with up to 10,000,000 variables]
|-
|-
|[http://www.mathworks.com/products/optimization/ Optimization Toolbox] [[MATLAB]]
|[http://www.mathworks.com/products/optimization/ Optimization Toolbox] [[MATLAB]]
|-
|-
|[http://www.ilog.com/products/cplex/ CPLEX] (convex problems only)
|[http://www.ilog.com/products/cplex/ CPLEX] (convex problems only)
|-
|[[IMSL Numerical Libraries]]
|-
|-
|[http://www.gams.com/ GAMS], see also [[General_Algebraic_Modeling_System|GAMS]]
|[http://www.gams.com/ GAMS], see also [[General_Algebraic_Modeling_System|GAMS]]

Revision as of 04:11, 11 February 2010

Quadratic programming (QP) is a special type of mathematical optimization problem. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.

The quadratic programming problem can be formulated as:[1]

Assume x belongs to space. The n×n matrix Q is symmetric, and c is any n×1 vector.

Minimize (with respect to x)

Subject to one or more constraints of the form:

(inequality constraint)
(equality constraint)

where indicates the vector transpose of . The notation means that every entry of the vector Ax is less than or equal to the corresponding entry of the vector .

If is a positive semidefinite matrix, then is a convex function. In this case the quadratic program has a global minimizer if there exists at least one vector x satisfying the constraints and is bounded below on the feasible region. If the matrix Q is positive definite then this global minimizer is unique. If is zero, then the problem becomes a linear program. From optimization theory, a necessary condition for a point to be a global minimizer is for it to satisfy the Karush–Kuhn–Tucker conditions. These conditions are also sufficient when is convex.

Solution methods

If there are only equality constraints, then the QP can be solved by a linear system. Otherwise, a variety of methods for solving the QP are commonly used, including

Convex quadratic programming is a special case of the more general field of convex optimization.

The dual

The dual of a QP is also a QP. To see that let us focus on the case where and Q is positive definite. We write the Lagrangian

To calculate the dual function , defined as we find the infimum of , using :

, hence the dual function is

hence the dual of the QP is

maximize :

subject to :

Complexity

For positive definite Q, the ellipsoid method solves the problem in polynomial time.[2] If, on the other hand, Q is indefinite, then the problem is NP-hard.[3] In fact, even if Q has only one negative eigenvalue, the problem is NP-hard.[4]

Software packages that include QP solvers

1. Free and opensource, with OSI-Approved licenses

Name License Brief info
CVXOPT GPL source language: C, Python; API: Python
OpenOpt BSD universal cross-platform Python-written numerical optimization framework;
see its QP page and full list of problems
OOQP non-commercial C++, interior point algorithm implementation by Gertz and Wright
QuadProg GPL2 source language: R (a port from S), algorithm of Goldfarb and Idnani (1982, 1983)
QuadProg++ LGPL C++, algorithm of Goldfarb and Idnani (1982, 1983)
uQuadProg GPLv2+ a port of QuadProg++ that uses BLAS
ROOT LGPL source language: C++

2. Commercial

Name
AIMMS Optimization Modeling, the AIMMS software
AMPL Modeling Language AMPL (free for students for problems with up to 300 variables and 300 constraints)
APMonitor Modeling Language trial with up to 10,000,000 variables
Optimization Toolbox MATLAB
CPLEX (convex problems only)
IMSL Numerical Libraries
GAMS, see also GAMS
MOSEK (convex problems only)
The Galahad library (free for academic) features solvers for nonconvex quadratic programs
MINQ Matlab program
Linear and Quadratic Programming Solver in CGAL, the Computational Geometry Algorithms Library

References

  1. ^ Nocedal, Jorge; Wright, Stephen J. (2006), Numerical Optimization (2nd ed.), Berlin, New York: Springer-Verlag, p. 449, ISBN 978-0-387-30303-1.
  2. ^ Kozlov, M. K. (1979). Doklady Akademii Nauk SSSR. 248: 1049–1051. {{cite journal}}: Missing or empty |title= (help); Unknown parameter |coauthors= ignored (|author= suggested) (help); Unknown parameter |trans_title= ignored (|trans-title= suggested) (help) Translated in: Soviet Mathematics - Doklady. 20: 1108–1111. {{cite journal}}: Missing or empty |title= (help)
  3. ^ Sahni, S. "Computationally related problems," in SIAM Journal on Computing, 3, 262--279, 1974.
  4. ^ Quadratic programming with one negative eigenvalue is NP-hard, Panos M. Pardalos and Stephen A. Vavasis in Journal of Global Optimization, Volume 1, Number 1, 1991, pg.15-22.

See also

External links