I have a very peculiar problem. I have a semi-definite problem. My problem is
$$ min. t $$
$$ s.t. L>=0, $$
$$ A>=0,$$
$$ L=[K.A,\tau;\tau^T,t-m]$$
$$ A.M=Y_M$$
$$A.I=I$$
$$ norm(A,‘fro’)^2 <=r $$
And the computed dual is
$$ max. -1/(4\rho)norm(T+X.K-U.(M+I),‘fro’)^2-<U,Y_M+I>-2x^T\tau-\rhor+\thetam$$
$$ T>=0,X>=0;$$
$$Z=[X,x;x^T,\tau]>=0$$
where Z is the dual variable of L and X is the dual variable of L=[K.*A,\tau;\tau^T,t-m] and T is the dual variable of A.
I check this many times mathematically but when I check it using cvx ( which returns dual variables) its optimal value does not mach with primal( even if cvx exits with solved problem and duality gap on the scale of e-6). Unfortuantely the dual variables in cvx does not satisfy KKT condition, esp, with respect to A.
I coded primal in cvx :
cvx_begin sdp
variable A_uu(n_u,n_u) symmetric
variable A_uq(n_u,n_q)
variable A_lu(n_l,n_u)
variable A_lq(n_l,n_q)
variable A_qq(n_q,n_q) symmetric
variable A_ll(n_l,n_l) symmetric
variable tVar
dual variable drho;
dual variable U_uu;
dual variable Z;
dual variable T;
dual variable U;
expression B
expression A
A = [A_ll,A_lu,A_lq;A_lu',A_uu,A_uq;A_lq',A_uq',A_qq];
B = [Yl*Yl',Yl*ONEQ';ONEQ*Yl',ONEQ*ONEQ'];
minimize (tVar)
subject to
T:A>=0;
U:[A_ll,A_lq;A_lq',A_qq]==B;
Z:[K .* A,ONED-beta_Var+eta_Var;(ONED-beta_Var+eta_Var)',2*tVar/lambda-m ]>=0;
U_uu:diag(A_uu)==ONEU;
drho: norm(A,'fro')<=r;
cvx_end
dualObj=-(1/(4*drho)*norm(T+X.*K-U2.*CM)^2+trace(U2'*C_lq)+2*tau'*x+drho*r-0.5*lambda*m)
norm(2*drho*A-(T+X.*K-U2.*CM),'fro') % checking derivative of Lagrangian with respect to A is zero or not?
Derivative of Lagrangian with respect to A is not zero? What is wrong?