How to formulate a MILP in CVX

The problem should be accepted and solved by CVX/solver if there is enough memory and time. Therefore, it’s a question of whether your formulation is correct, to include the value of M. If M is too small, you will not get the right answer. If M winds up being big, there could be numerical challenges for the solver.