qps_mosek(H,
c=None,
A=None,
l=None,
u=None,
xmin=None,
xmax=None,
x0=None,
opt=None)
| source code
|
Quadratic Program Solver based on MOSEK.
A wrapper function providing a PYPOWER standardized interface for
using MOSEKOPT to solve the following QP (quadratic programming)
problem:
min 1/2 x'*H*x + c'*x
x
subject to:
l <= A*x <= u (linear constraints)
xmin <= x <= xmax (variable bounds)
Inputs (all optional except H , C ,
A and L ):
-
H : matrix (possibly sparse) of quadratic cost
coefficients
-
C : vector of linear cost coefficients
-
A, l, u : define the optional linear constraints.
Default values for the elements of L and U are -Inf and Inf,
respectively.
-
xmin, xmax : optional lower and upper bounds on the
x
variables, defaults are -Inf and Inf, respectively.
-
x0 : optional starting value of optimization vector
x
-
opt : optional options structure with the following
fields, all of which are also optional (default values shown in
parentheses)
-
verbose (0) - controls level of progress output
displayed
-
0 = no progress output
-
1 = some progress output
-
2 = verbose progress output
-
max_it (0) - maximum number of iterations allowed
-
0 = use algorithm default
-
mosek_opt - options struct for MOSEK, values in
verbose and max_it override these
options
-
problem : The inputs can alternatively be supplied in a
single problem struct with fields corresponding to the
input arguments described above: H, c, A, l, u, xmin, xmax, x0,
opt
Outputs:
-
x : solution vector
-
f : final objective function value
-
exitflag : exit flag
-
1 = success
-
0 = terminated at maximum number of iterations
-
-1 = primal or dual infeasible < 0 = the negative of the MOSEK
return code
-
output : output dict with the following fields:
-
r - MOSEK return code
-
res - MOSEK result dict
-
lmbda : dict containing the Langrange and Kuhn-Tucker
multipliers on the constraints, with fields:
-
mu_l - lower (left-hand) limit on linear constraints
-
mu_u - upper (right-hand) limit on linear
constraints
-
lower - lower bound on optimization variables
-
upper - upper bound on optimization variables
- Authors:
-
Ray Zimmerman (PSERC Cornell),
Richard Lincoln
|