A confused problem

Uncategorized
Dec 25, 2012
W

I have encountered a confused problem
when I run a CVX project ,the ‘Status’ shows that the project is ‘solved’(not ‘Inaccurate/Solved’).But when I test the results in the matlab prompt, the results DO NOT satisfy the constraints between the ‘cvx_begin’ and ‘cvx_end’,both the inequality constraints and the equality constraints.
I am going crazy now,hope you can help me .Thank you very much for your attention.

H

Hi,
I guess you have mistaken in writing your code. It’s better you check it more. If you don’t think please make a copy of your coded or selected part so that we can see it.

Best

W

My karma value is not enough ,can you leave your email address here? I can sent it to you .
When I add the constraint below to the program between ‘cvx_begin’ and ‘cvx_end’, it always turn out
wrong,the wrong I metioned in the above.

for i=1:2
for j=1:2
    for m=1:2
        if m==i
        temp4(1+2*(m-1))=h(:,(2*(i-1)+j),1)'*W(:,1,m);
        temp4(2+2*(m-1))=h(:,(2*(i-1)+j),1)'*W(:,2,m);
        else
            temp4(1+2*(m-1))=h(:,(2*(i-1)+j),2)'*W(:,1,m);
            temp4(2+2*(m-1))=h(:,(2*(i-1)+j),2)'*W(:,2,m);
        end
    end
        for m=1:2
            if m==i 
            temp4(5+4*(m-1))=h(1,(2*(i-1)+j),1)*t(m,1);
            temp4(6+4*(m-1))=h(2,(2*(i-1)+j),1)*t(m,2);
            temp4(8+4*(m-1))=h(4,(2*(i-1)+j),1)*t(m,4);
            else
                temp4(5+4*(m-1))=h(1,(2*(i-1)+j),2)*t(m,1);
                temp4(6+4*(m-1))=h(2,(2*(i-1)+j),2)*t(m,2);
                temp4(7+4*(m-1))=h(3,(2*(i-1)+j),2)*t(m,3);
                temp4(8+4*(m-1))=h(4,(2*(i-1)+j),2)*t(m,4);
            end
        end
    temp4(13)=r(i,j);
    temp4(14)=sigma;
     norm(temp4)<=(sqrt(1+(1/(2^gama(i,j)-1))))*(real(h(:,(2*(i-1)+j),1)'*W(:,j,i)));
end

end

Blockquote
M

Remember, CVX relies on numerical solvers. Small deviations from feasibility are to be expected, and must be taken into account by the following code. Larger errors may be a sign of a modeling problem, or perhaps a bug in CVX.

W

Maybe I made some mistakes, but when the CVX show the status is “solved”, the result must ,at least, fulfilled the constraints between the ‘cvx_begin’ and ‘cvx_end’, because CVX calculates the result due to these constraints.Unfortunately, it does not fulfulled the constraints.

W

Can anyone who wants to help me leave an email address here? So I can send my program to you. My karma value is too low to upload an attachment.

W

If I set a constraint between cvx_begen and cvx_end, like ‘A<=B’, and the status is solved,but the result show that A is 5 times more than B, this is wierd.

M

I have deleted your duplicate post. If anyone in the CVX community here is able to spend some time debugging this issue, please contact the poster at weilingsly@gmail.com