How to solve this problem?Cannot perform the operation: {real affine} .* {convex}

Convexity in optimization means joint convexity in all the optimization variables. If you fix one or more of the variables, that is a different problem.

in any event, it is your project, .so I’ll let you figure it out. I will encourage you once again to carefully read

I have no reason to believe you will find CVX useful for this problem. Of course you can always fix enough varaibles and produce a nice problem CVX can handle. But then you are left with the need for some iterative scheme around that.