Disciplined convex programming error: Illegal operation: {convex} + {concave}

Here, Aopt and Eopt are variables. How to handle Aopt. * R_ Diff, I think the error is caused by the multiplication of two variables

The forum readers don’t know what your actual optimization problem is. Your first task is to prove the optimization problem is convex. if it is not, you should use a different tool, such as YALMIP.