A.3 Quadratic Programming Solver
A convenience wrapper function called qps_mips is provided to make it trivial to set up
and solve linear programming (LP) and quadratic programming (QP) problems of the
subject to Instead of a function handle, the objective function is speciﬁed in terms of the paramters
and of quadratic cost coeﬃcients. Internally, qps_mips passes mips the handle of a
function that uses these paramters to evaluate the objective function, gradients and
The calling syntax for qps_mips is similar to that used by quadprog from the Matlab
[x, f, exitflag, output, lambda] = qps_mips(H, c, A, l, u, xmin, xmax, x0, opt);
Alternatively, the input arguments can be packaged as ﬁelds in a problem struct and passed in
as a single argument, where all ﬁelds except H, c, A and l are optional.
[x, f, exitflag, output, lambda] = qps_mips(problem);
Aside from H and c, all input and output arguments correspond exactly to the same
arguments for mips as described in Tables A-1 and A-2.
As with mips and fmincon, the primary diﬀerence between the calling syntax for
qps_mips and quadprog is that the linear constraints are speciﬁed in terms of a single
doubly-bounded linear function () as opposed to separate equality constrained
() and upper bounded () functions.
Matpower also includes another wrapper function qps_matpower that provides a
consistent interface for all of the QP and LP solvers it has available. This interface is
identical to that used by qps_mips with the exception of the structure of the opt input
argument. The solver is chosen according to the value of opt.alg. See the help for
qps_matpower for details.
Several examples of using qps_matpower to solve LP and QP problems can be found in