OSQP fails to solve feasible QP
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 76
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 1
Description
I'm trying to use `jaxopt.OSQP` as part of the projection step of another training algorithm. The QP is
```math
\begin{equation}
\begin{split}
\text{min} & \quad ||\theta-\theta_0||^2 \\
\text{st.} & \lim_{x \to\infty}f(x, y, \theta)=0 \\
& f(x, 1, \theta)=0 \\
& y \frac{\partial f}{\partial y}(x,y,\theta) \geq -1
\end{split}
\end{equation}
```
where $f(x,y,\theta)=\sum_{m,n}\theta_{mn}T_n(x^{-1})T_m(y)$ and $T_k$ is the k-th Chebyshev polynomial. Through linear mapping of the feasible domains of $\rho=x^{-1}$ and $y$ onto $[-1, 1]$, the two equality constraints become direct linear constraints on $\theta$ and the inequality constraint can be made linear through discretization over a grid. The program is necessarily feasible since the zero function is feasible. However, `jax.OSQP`/`jax.BoxOSQP` doesn't even get close to a feasible solution. Moreover, when started at a feasible solution, it returns an infeasible solution. I'll share a cleaned-up version of my code shortly.
Contributor guide
Assessment
This issue has not been assessed yet.