Open danielpmorton opened 4 months ago
Thanks Dan! One thought is there could be an unsafe divide lurking in the problem scaling -- i.e., here.
If you care / have a chance, maybe try adding a 1e-8
the the denominator here and see if it helps? OSQP in general should be quite robust to poor problem scaling (nice side-effect of ADMM), but the Ruiz stuff might not be.
If it's a persistent / important issue, we can always dig into Bartolomeo's problem scaling code in the "real" OSQP and see if we spot any differences.
I'll give it a try!
I had accidentally made my problem poorly-posed by introducing a constraint that added a row of all zeros to my A matrix (So, one constraint was basically
l <= 0x <= u
)But, this led to a confusing return where this produced NaNs instantly, even though the problem was instantaneously feasible (
l <= 0 <= u
)This stems from
scale_problem
, where a term indata.E
explodes to infinity after a few iterations of the while loop, and then inupdate_problem_data
this linenew_data.A = jnp.diag(data.E) @ A @ jnp.diag(data.D)
leads toA
containing NaNs due toE
containinginf
sI don't know what the best way to handle this poorly-posed case is, but figured I would mention this edge case.
This is the data which caused this problem: