Disciplined convex programming error: Illegal operation: {real constant} + {invalid}

Hello everyone!Please help me.Why did cvx rejact my codes.Only rou(1,k) is a variable.

 for k=1:K
        for n=1:N

Disciplined convex programming error:
Illegal operation: {real constant} + {invalid}

Well, something is invalid, but you may not have shown us enough of your program to determine what.

Perhaps you should remove semicolons so that you can better see what is happening. Can you provide us a (minimal) reproducible example?


This is my mathematical formula.q is a 2N matrix. w is a 2k matrix

The image was not successfully uploaded.

Please show us your reproducible ode, not pictures of math formulas. We don’t know what is “invalid”

I think this is due to numerical overflow with exp(x), which occurs in MATLAB double precision at x > = 709.79.

The first time through the for loop, here is what happens:
-a*(b0*itrp(1,n)) evaluates to 180000.


ans =
    cvx invalid expression (scalar)

Indeed, we see

ans =
cvx log-affine expression (scalar)

ans =
cvx invalid expression (scalar)

So it appears that overflow with exp is causing the error. . Perhaps Jvli(k,n)-b comes into play as well.

I will have to leave further diagnosis and repair to someone more knowledgeable.

Thank you very much! Mark.