Optimization problem in constraint

Hello. Is it possible to impose a constraint which is another optimization problem itself in CVX?

I doubt it. That usually leads to something nonconvex I think.

Would you please introduce a software which is able of solving nonconvex optimization problems?

It sounds like you are talking about Bilevel optimization. if the inner problem is an LP, and you find an appropriate value of M, the KKT conditions for the inner can be linearized by Big M, and perhaps the problem can be handled in CVX, but not very conveniently.

Or perhaps “New functions via partially specified problems” can do what you want? http://cvxr.com/cvx/doc/advanced.html#new-functions-via-partially-specified-problems although this may not be at al what you want.

Thanks for your clarification. Yes my problem is bilevel optimization. I will try the solution that you suggested.