pwrs.mp_opt_model.qps_master#

pwrs.mp_opt_model.qps_master.qps_master_full(H, c=None, A=None, l=None, u=None, xmin=None, xmax=None, x0=None, opt=None)[source]#

Quadratic-program solver wrapper.

Solves the QP

min 0.5 * x' * H * x + c' * x

subject to linear constraints and variable bounds.

Parameters:
  • H (array_like or dict) – Quadratic cost matrix or a problem dict containing the full solver inputs.

  • c (array_like, optional) – Linear cost vector.

  • A (array_like, optional) – Linear constraints l <= A*x <= u.

  • l (array_like, optional) – Linear constraints l <= A*x <= u.

  • u (array_like, optional) – Linear constraints l <= A*x <= u.

  • xmin (array_like, optional) – Variable bounds.

  • xmax (array_like, optional) – Variable bounds.

  • x0 (array_like, optional) – Initial point.

  • opt (dict, optional) – Solver options dict. opt["alg"] selects MIPS, GLPK, or IPOPT in the current Python port.

  • nargout (int, optional) – Number of outputs to emulate from the MATLAB interface.

Returns:

Returns (x, f, eflag, output, lambda_) or the leading subset requested by nargout.

Return type:

tuple or ndarray

pwrs.mp_opt_model.qps_master.qps_master(H, c=None, A=None, l=None, u=None, xmin=None, xmax=None, x0=None, opt=None, nargout=1)[source]#

MATPOWER-compatible QP dispatcher; use qps_master_full in typed code.

Parameters:

nargout (int)