I want to access my dual variable for an SDP problem that I’ve solved. I understand this is possible, but I am a little confused about how to do it.
My primal problem is \min c^Tx \text{ s.t. } F(x)\succeq 0, so the corresponding dual problem is \max -\text{tr}(F_0Z) \text{ s.t. } \text{tr}(F_iZ)=c_i, Z \succeq 0 (Ref).
In this case, what does the following mean? Could you explain it in words?
X - eye(3) >= 0 : y
Also, maybe I am not understanding completely, but this is in a different form than what I am trying. My primal problem is what I put in CVX (see below). I can solve this, which CVX does by solving the primal and the dual. Since, both the primal and the dual problem are solved, how can I extract the corresponding dual variable?
My example specifies a semidefinite constraint, X - eye(3) >= 0, and assigns the dual variable,y, to it, which is a matrix of the same dimension as the semidefinite constraint.
I am not the expert on what this means, or whether it makes sense. But it gets CVX to do something. However dual variables for semidefinite constraints are not explicitly addressed in the CVX Users’ Guide or help.
The most recent build of CVX and it documentation is from Jan 2020. CVX is not under active development, nor is its documentation (except for what gets posted on this forum, which is not official documentation). Perhaps at some point, other people will be allowed to develop CVX, but this has not yet happened, and might not ever happen, with the limited exception of a CVX for Apple Silicon build.
Quote: “A dual variable, if supplied, will be applied to the converted equality constraint. It will be given a positive semidefinite value if an optimal point is found.”
It sort of follows from general abstract nonsense that the dual of a PSD constraint must be what you’d expect, so maybe that’s why it is only mentioned in passing.
On the other hand, the example in the CVX User’s Guide with the form Z == hermitian_semidefinite( n ) : Q;
produces an error for me, but does work using >= in sdp mode. So ti does appear that either documentation is wrong, or there is a bug in CVX, depending on how you look at it.