Can I terminate the program after "some threshold time"?

I am solving a huge mixed integer convex programming ( a few thousand variables :S). I am using CVX + Mosek and branch-and-bound algorithm to solve this.

I want the program to terminate with the current feasible solution, i.e., lower bound, after the operation time exceeds a certain threshold (for example, 2 minutes). Can I do it with CVX? Sometimes, my program takes a long long time (5-10 minutes) to improve the current lower bound. If I press Ctrl+C those times, I lose the whole data set.



This is nothing built into CVX that will allow this. However, you may consider using the cvx_solver_settings command in CVX to gain access to solver-specific parameters. You will need to consult Mosek’s manual for information on which settings will help you. And you must heed the strong warnings offered in the CVX documentation!