bfieldtools.coil_optimize.cvxopt_solve_qp¶
-
bfieldtools.coil_optimize.
cvxopt_solve_qp
(P, q, G=None, h=None, A=None, b=None, tolerance=1e-07, **kwargs)¶ Use cvxopt (without CVXPY wrapper) for quadratic programming.
Minimize
\[(1/2) \mathbf{x}^T \mathbf{P} \mathbf{x} + \mathbf{q}^T \mathbf{x}\]subject to
\[\mathbf{G} \mathbf{x} \leq \mathbf{h}\]and
\[\mathbf{A} \mathbf{x} = \mathbf{b}\]- Parameters
- P: (N_x, N_x) array
Quadratic minimization matrix
- q: (N_x, ) array
Linear penalty term vector
- G: (N_h, N_x) array
Linear inequality matrix
- h: (N_h, ) array
Linear inequality constraint vector
- A: (N_b, N_x) array
Linear equality matrix
- b: (N_b, ) array
Linear equality constraint vector
- **kwargs
Use to pass cvxopt solver options, such as tolerance
- Returns
- x: (N_x, ) array
Optimized solution for x (if available)
- sol: CVXOPT solution
Solution object with optimization info