FUNCTION REFERENCE
mpcActiveSetSolver
Minimize a strictly convex quadratic objective using a dense dual active set.
Minimize a strictly convex quadratic objective using a dense dual active set.
Syntax
[x,exitflag,iA,lambda] = mpcActiveSetSolver(H,f,A,b,Aeq,beq,iA0,options)Minimizes 0.5*x'*H*x+f'*x subject to A*x <= b and Aeq*x = beq.
H must be symmetric positive definite; f,b,beq are column vectors.
Use zeros(0,n) and zeros(0,1), or [], for missing constraints. iA0 is a
logical vector of length size(A,1); false(m,1) cold starts and the previous
iA warm starts. Dependent active inequalities are reduced to an independent
working set. lambda has column vectors ineqlin (length m, nonnegative at an
optimum) and eqlin (length q); H*x+f+A'*lambda.ineqlin+Aeq'*lambda.eqlin=0.
exitflag > 0 is the iteration count for an optimum; 0 means iteration limit
(the returned x can be infeasible), -1 infeasible, -2 numerical failure.
With options.UseHessianAsInput=false, pass Linv=L\eye(n), where
L=chol(H,'lower'), instead of H. No explicit inverse is formed by the solver.
Limits: 1 <= n <= 200, m <= 4000, q <= n, plus host memory limits.
This implementation promises the optimum, not KWIK iteration counts.
Only the QP solver is provided here; controller objects are separate work.
Example
o=mpcActiveSetOptions; [x,flag,iA,lambda]=mpcActiveSetSolver(eye(2),[-2;-4],eye(2),[1;2],zeros(0,2),zeros(0,1),false(2,1),o)These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.