small rho value and embedded problems

99 views
Skip to first unread message

cantsp...@gmail.com

unread,
Nov 7, 2018, 4:25:58 AM11/7/18
to OSQP
Hello,

Thank you very much for making OSQP available!

I'm getting some confusing behaviour from my problem and wondered if anyone could help.

With the default settings I get a poor solution to my problem and it terminates after 25 or 50 iterations. If I make rho 1e-7 then I get a good solution after 250 or so iterations. The recommended rho value comes back as 0.2 in both cases.

I get strange behaviour when trying to use the embedded solver for the same problem that works just fine with rho 1e-7 (I've checked the settings made it through to the c files). The problem wont solve returning either, OSQP_DUAL_INFEASIBLE, OSQP_NON_CVX or OSQP_MAX_ITER_REACHED.

P is roughly 600x600 and is zero apart from a 60x60 positive semidefinite matrix in the top left corner so I'm kind of surprised by the non-convex error.

Any help/tips would be appreciated.

Thanks,

David

Paul Goulart

unread,
Nov 7, 2018, 5:00:18 AM11/7/18
to cantsp...@gmail.com, OSQP
It is hard to diagnose this sort of thing without seeing the problem data. Would you be able to provide a representative problem that reproduces these errors?

That said, some possibilities:

1) Is the optimal solution to your problem actually unconstrained? That might explain why \rho = 1e-7 works, but it probably is not consistent with the recommended rho you are getting.

2) It might be that the solver does not converge well because it updates \rho too soon, i.e. before the quantity that we use to estimate a good value has stabilised. Perhaps increase the convergence checking interval to 50 or 100?

3) It is strange that you are getting OSQP_NON_CVX if the problem is as you describe. However, this might happen if the nonzero part of your matrix P appears to have a slightly negative eigenvalue after factorisation. This might happen, for example, if either P or the KKT matrix (composed of P, A and \rho) is very badly conditioned.

The reason for the above is that our check for non-convexity is based on the inertia of the KKT matrix that we factor into LDL^T, since the inertia of the KKT matrix and of D will be the same. However, if the KKT matrix is very badly conditioned then the ‘D’ part of the LDL factorisation might not be reliable, e.g. it might have some values very close to zero.

As a means of checking that this could be the problem, you might try solving with the MKL solver instead of the native QDLDL code that is the default.
> --
> You received this message because you are subscribed to the Google Groups "OSQP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to osqp+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/osqp/7b232eb4-c5f1-42cc-a40d-846fe619d4e8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

cantsp...@gmail.com

unread,
Nov 7, 2018, 5:51:58 AM11/7/18
to OSQP
Thanks for the pointers!
Reply all
Reply to author
Forward
0 new messages