- Notifications
You must be signed in to change notification settings - Fork2
Feasibility error discrepancies using multiprecision backend#4
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi, I am trying to solve an SDP but I come out with a solution which is a bit weird. The variable "d.feas.error" and "primalError" are very different in order of magnitude:
According to the documentation, SPA-format ->https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=146eeab7f3c917c092cbb0062029e92f7ac9e4d8 CLP-format ->https://master.dl.sourceforge.net/project/sdpa/sdpa-p/sdpap_manual.pdf?viasf=1 (pag 19) shoudn't these two values be comparable? Due to this discrepancy I am not sure if I can trust the solution. Is it possible that there is a problem in the conversion from SDPA- to CLP-format? Thanks! |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 6 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hello, it's the primal and dualobjectives which should converge close to each other which is happening in your case. Regarding primal and dual feasibility errors, ideally they should be 0, which is also true in your case. They will never be exactly zero but both The lower highlight represents SDPA for Python output, which, as you pointed out solves a CLP. The feasibility errors are not converted, but recomputed in SDPAP (from the SDPA to CLP converted solutions). |
BetaWas this translation helpful?Give feedback.
All reactions
-
@ganglesmunne, it seems like my initial analysis was not the case here. I just ran a few examples using the regular ( Is it possible for you to run your example without multiprecision support? If yes, I suspect you should also see similar feasibility errors between C++ solver and SDPAP. In summary, when using the multiprecision backend, the C++ solver has to its advantage arbitrary precision support when calculating feasibility errors. It also seems like the page 15-16 of SDPAP manual reports incorrect dual feasibility error (either due to a bug or due to numerical limitations in the Python code doing feasibility error calculation). It perhaps should not be zero. I will investigate this issue further. Thank you for raising this issue! |
BetaWas this translation helpful?Give feedback.
All reactions
-
You are welcome! My example without multiprecision support does not go beyond the first iteration. Even though, the program gives me the feasibility errors and they indeed coincide when I am not using the backend. Does this mean that the feasibility errors from the multiprecision backend are the ones to take into account? Thank you very much for the feedback! |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi@ganglesmunne, yes, you should use the feasibility errors of the C++ solver (multiprecision in this case), because they are computed using the same precision as that of the solver. Here’s my analysis of the problem: If you use multiprecision backend, the feasibility errors computed by SDPAP will be orders of magnitude larger than those computed by C++ solver (once the problem is solved by multiprecision backend, the solution will be converted to double precision when it goes back to SDPAP). Moreover, if your problem has a very small feasibility set (which I believe is also your case), SDPAP may show you feasibility errors large enough to cause early termination had such large feasibility errors been detected during C++ solver’s main loop (i.e. if the C++ solver did not have multiprecision support). If your SDPAP and C++ solver both have the same precision (double), then barring the primal dual flip, you should ideally see exactly the same feasibility errors between SDPAP and C++ solver. While CLP format is more general, in order to do a If you use regular ( |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank you very much for you explanation, it was really helpful! |
BetaWas this translation helpful?Give feedback.
All reactions
-
You are very welcome. I’ll see if I can add a secondary feasibility error computation directly inside SDPA Multiprecision code using double precision so the user also knows feasibility errors after precision reduction. If precision reduction to double significantly increases feasibility error, the user can be warned and potential fixes suggested (relax optimality criterion This phenomenon however is not uncommon when working with mixed precision. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hi@ganglesmunne, I’m back with an update. v0.2.2 (released yesterday) addresses this. As discussed in the thread below, the multiprecision backend will now also compute and report feasibility errors with double precision in the C++ code. This was the best solution I could think of, specially when there are numerical issues involved in computing eigenvalues (required to calculate PSD constraint violations). You should now expect to see similar feasibility errors between the Python frontend and those reported by the multiprecision backend with double precision. There may still be some mismatches, which can be due to both the numerical inaccuracies of eigenvalue computation or the conversions involved when going from CLP to LMI (and back). The conversions also involve some precision related issues due to floating point arithmetic. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1