Invalid constraint: {convex} >= {real constant}

In my problem, the cvx variable is u. I have the following constraint:
max(eta u, 1/eta u)>= constant. eta is a given constant here 0<eta<1.

I can handle the issue by using the binary variable and big M value after converting the constraint to if statement like ( 1/eta u if u>=0, eta u if u<=0). The cvx is able to solve the new problem.

My question is there any other way to handle the issue because I am planning to make my problem more accurate and removing the max function by binary variable makes my problem so complex to move forward. Is there any other way to replace the max function from the constraint?

If max is used in a non-convex way, as in max(...) >= constant, the only way to handle it in CVX is by introducing binary variables.

Yes, that can make the problem difficult to solve. Non-convexity is a bitch.

1 Like