bfieldtools.coil_optimize.cvxpy_solve_qp¶
-
bfieldtools.coil_optimize.
cvxpy_solve_qp
(P, G, h, solver='MOSEK', tolerance=None)¶ Bare-bones quadratic programming solver function for CVXPY.
Minimizes
\[(1/2) \mathbf{x}^T \mathbf{P} \mathbf{x}\]subject to
\[\mathbf{G} \mathbf{x} \leq \mathbf{h}\]- Parameters
- P: (N_x, N_x) array
Quadratic minimization matrix
- G: (N_h, N_x) array
Linear inequality matrix
- h: (N_h, ) array
Linear inequality constraint vector
- solver: string or cvxpy solver
solver to use in CVXPY, can be passed as string or directly
- tolerance: float or None (default)
Override default tolerance values
- Returns
- x.value: (N_x, ) array
Optimized solution for x (if available)
- prob: CVXPY problem
Problem object with optimization info