GNU Octave Manual Version 3 by John W. Eaton, David Bateman, Søren Hauberg Paperback (6"x9"), 568 pages ISBN 095461206X RRP £24.95 ($39.95) |
23.2 Quadratic Programming
Octave can also solve Quadratic Programming problems, this is
min 0.5 x'*H*x + x'*q
subject to
A*x = b
lb <= x <= ub
A_lb <= A_in*x <= A_ub
- Function File: [x, obj, info, lambda] = qp (x0, H, q, A, b, lb, ub, A_lb, A_in, A_ub)
- Solve the quadratic program
min 0.5 x'*H*x + x'*q x
subject to
A*x = b lb <= x <= ub A_lb <= A_in*x <= A_ub
using a null-space active-set method.
Any bound (A, b, lb, ub, A_lb, A_ub) may be set to the empty matrix (
[]
) if not present. If the initial guess is feasible the algorithm is faster.The value info is a structure with the following fields:
solveiter
- The number of iterations required to find the solution.
info
-
An integer indicating the status of the solution, as follows:
- 0
- The problem is feasible and convex. Global solution found.
- 1
- The problem is not convex. Local solution found.
- 2
- The problem is not convex and unbounded.
- 3
- Maximum number of iterations reached.
- 6
- The problem is infeasible.
ISBN 095461206X | GNU Octave Manual Version 3 | See the print edition |