Clarabel.jl icon indicating copy to clipboard operation
Clarabel.jl copied to clipboard

Dense vs. sparse representation of second-order cones (different results)

Open mipals opened this issue 1 year ago • 3 comments

Hi there,

I have a few problems that contain second-order cones with dimension greater than 4, meaning that the sparse-representation is used. For these problems the solver reports back either “insufficient progress” or "reduced accuracy" (Clarabel does get fairly close to the solution). However, by digging around (changing the value of when the switch to sparse data is used) I found that the solver returns "solved" when the full dense representation is used. Is this to be expected for some problems?

Cheers, Mikkel

mipals avatar Mar 25 '24 12:03 mipals

It is not the ideal behaviour, but we observe similar things when testing for certain difficult problems. The sparse representation is significantly faster for SOC constraints of relatively high dimension though, so on the whole we thought it better to use the sparse form when it was faster.

Our sparse representation for SOCs amounts to the same thing as in ECOS, but implemented in a different way in an attempt to improve stability. I think it could still be improved though. If you have a specific test case that is relatively small (i.e. not thousands of low dimensional SOC constraints) and for which the dense form converges while the sparse does not, we would be interested to see it as a test case.

goulart-paul avatar Mar 25 '24 15:03 goulart-paul

I agree that it is probably best to use the sparse form. I also see that it is quite a bit faster - Although for Pardiso the difference is not that big.

I realized that the implementation was based on the same idea as ECOS after finding a reference to the paper in a comment in the code. I could, however, not directly follow the implementation from the paper - Which now that you mention that you’ve made some modifications makes sense.

I can probably share the model with you. Preferably over email if that is ok.

mipals avatar Mar 26 '24 06:03 mipals

We are always happy to get example problems, and email is fine. It would be of particular interest though only if the problem itself is not huge and there are a small number of cones. Worth a shot either way though.

goulart-paul avatar Mar 27 '24 17:03 goulart-paul