public class DantzigQPSolver
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DantzigQPSolver.Status
Described whether or not a solution was found.
|
Constructor and Description |
---|
DantzigQPSolver() |
Modifier and Type | Method and Description |
---|---|
DantzigQPSolver.Status |
solve(VectorNd x,
MatrixNd H,
VectorNd f,
MatrixNd A,
VectorNd b)
Solves a convex quadratic program with inequality constraints:
|
DantzigQPSolver.Status |
solve(VectorNd x,
MatrixNd H,
VectorNd f,
MatrixNd A,
VectorNd b,
MatrixNd Aeq,
VectorNd beq)
Solves a convex quadratic program with both equality and inequality
constraints:
|
public DantzigQPSolver.Status solve(VectorNd x, MatrixNd H, VectorNd f, MatrixNd A, VectorNd b)
min 1/2 x^T H x + f^T x, A x >= b
using Dantzig's LCP pivoting algorithm.x
- computed minimum valueH
- quadratic matrix term. Must be symmetric positive definitef
- linear termA
- inequality constraint matrixb
- inequality constraint offsetspublic DantzigQPSolver.Status solve(VectorNd x, MatrixNd H, VectorNd f, MatrixNd A, VectorNd b, MatrixNd Aeq, VectorNd beq)
min 1/2 x^T H x + f^T x, A x >= b, Aeq x = beq
using Dantzig's LCP pivoting algorithm.
If there are no inequality constraints, then A should either
have a row size of 0 or be specified as null
.
Note that the number of inequality constraints (i.e., the row size of Aeq) should not exceed the size of H. Also, if the row size of Aeq equals the size of H, then only the equalites are solved for and the rest of the problem is ignored.
x
- computed minimum valueH
- quadratic matrix term. Must be symmetric positive definitef
- linear termA
- inequality constraint matrix (can be null)b
- inequality constraint offsets (can be null if A is null)Aeq
- equality constraint matrixbeq
- equality constraint offsets