Functions | |
| QPFunction (eps=1e-9, maxIter=1000, eps_backward=1.0e-4, rho_backward=1.0e-6, mu_backward=1.0e-6, omp_parallel=False, structural_feasibility=True) | |
| Solve a batch of Quadratic Programming (QP) problems. | |
| proxsuite.torch.qplayer.QPFunction | ( | eps = 1e-9, | |
| maxIter = 1000, | |||
| eps_backward = 1.0e-4, | |||
| rho_backward = 1.0e-6, | |||
| mu_backward = 1.0e-6, | |||
| omp_parallel = False, | |||
| structural_feasibility = True ) |
Solve a batch of Quadratic Programming (QP) problems.
This function solves QP problems of the form:
$$ \begin{align} \min_{z} & ~\frac{1}{2}z^{T} Q (\theta) z +p(\theta)^{T}z \\ \text{s.t.} & ~A(\theta) z = b(\theta) \\ & ~l(\theta) \leq G(\theta) z \leq u(\theta) \end{align} $$
The QP can be infeasible - in this case the solver will return a solution to the closest feasible QP.
| [in] | eps | Tolerance for the primal infeasibility. Defaults to 1e-9. |
| [in] | maxIter | Maximum number of iterations. Defaults to 1000. |
| [in] | eps_backward | Tolerance for the backward pass. Defaults to 1e-4. |
| [in] | rho_backward | The new value for the primal proximal parameter. Defaults to 1e-6. |
| [in] | mu_backward | The new dual proximal parameter used for both equality and inequality. Defaults to 1e-6. |
| [in] | omp_parallel | Whether to solve the QP in parallel. Requires that proxsuite is compiled with openmp support. Defaults to False. |
| [in] | structural_feasibility | Whether to solve the QP with structural feasibility. Defaults to True. |
The callable object has two main methods:
Solve the QP problem.
| [in] | Q | Batch of quadratic cost matrices of size (nBatch, n, n) or (n, n). |
| [in] | p | Batch of linear cost vectors of size (nBatch, n) or (n). |
| [in] | A | Optional batch of eq. constraint matrices of size (nBatch, p, n) or (p, n). |
| [in] | b | Optional batch of eq. constraint vectors of size (nBatch, p) or (p). |
| [in] | G | Batch of ineq. constraint matrices of size (nBatch, m, n) or (m, n). |
| [in] | l | Batch of ineq. lower bound vectors of size (nBatch, m) or (m). |
| [in] | u | Batch of ineq. upper bound vectors of size (nBatch, m) or (m). |
zhats Batch of optimal primal solutions of size (nBatch, n). lams Batch of dual variables for eq. constraint of size (nBatch, m). nus Batch of dual variables for ineq. constraints of size (nBatch, p). s_e Only returned in the infeasible case: batch of slack variables for eq. constraints of size (nBatch, m). s_i Only returned in the infeasible case: batch of slack variables for ineq. constraints of size (nBatch, p).Compute the gradients of the QP problem with respect to its parameters.
| [in] | dl_dzhat | Batch of gradients of size (nBatch, n). |
| [in] | dl_dlams | Optional batch of gradients of size (nBatch, p). |
| [in] | dl_dnus | Optional batch of gradients of size (nBatch, m). |
| [in] | dl_ds_e | Only applicable in the infeasible case: optional batch of gradients of size (nBatch, m). |
| [in] | dl_ds_i | Only applicable in the infeasible case: optional batch of gradients of size (nBatch, m). |
dQs Batch of gradients of size (nBatch, n, n). dps Batch of gradients of size (nBatch, n). dAs Batch of gradients of size (nBatch, p, n). dbs Batch of gradients of size (nBatch, p). dGs Batch of gradients of size (nBatch, m, n). dls Batch of gradients of size (nBatch, m). dus Batch of gradients of size (nBatch, m). Definition at line 12 of file qplayer.py.