I use the cplex 12.2 via yalmip interface. I wanted to set the time limit for MILP. The problem is difficult and timeconsuming, so I just want to get the best solution that is found in a certain time.
I have two questions:
1. How to set the time limit in Yalmip;
2. How to get the current best lower bound of the objective value or relative objective gap for MIP just like Cplex.solution.miprelgap does when using matlab toolbox functions of cplex.
Thanks a lot.
Topic

Re: How to set the time limit for solving a MILP via yalmip
20111029T13:23:41ZThis is the accepted answer. This is the accepted answer.1.
ops = sdpsettings('solver','cplex','cplex.whateveroptioniscalled',100)
solvesdp(constraints,objective,ops)
to find the suitable option, simply look at the structure, and/or read the cplex documentation
ops = sdpsettings
ops.cplex
2. I don't think that is possible since YALMIP currently connects to cplex via cplexmilp etc, which if memory serves me right doesn't returns this info. If it does, this should work
sol = solvesdp(constraints,objective,sdpsettings('savesolveroutput',1))
sol.solveroutput 
Re: How to set the time limit for solving a MILP via yalmip
20111029T14:44:21ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20111029T13:23:41Z
1.
ops = sdpsettings('solver','cplex','cplex.whateveroptioniscalled',100)
solvesdp(constraints,objective,ops)
to find the suitable option, simply look at the structure, and/or read the cplex documentation
ops = sdpsettings
ops.cplex
2. I don't think that is possible since YALMIP currently connects to cplex via cplexmilp etc, which if memory serves me right doesn't returns this info. If it does, this should work
sol = solvesdp(constraints,objective,sdpsettings('savesolveroutput',1))
sol.solveroutput 
Re: How to set the time limit for solving a MILP via yalmip
20121125T09:18:10ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20111029T13:23:41Z
1.
ops = sdpsettings('solver','cplex','cplex.whateveroptioniscalled',100)
solvesdp(constraints,objective,ops)
to find the suitable option, simply look at the structure, and/or read the cplex documentation
ops = sdpsettings
ops.cplex
2. I don't think that is possible since YALMIP currently connects to cplex via cplexmilp etc, which if memory serves me right doesn't returns this info. If it does, this should work
sol = solvesdp(constraints,objective,sdpsettings('savesolveroutput',1))
sol.solveroutput
i have installed the CPLEX 12.5 and the latest Yalmip.And i also set their paths in the MATLAB(R2012 a)according to your tutorial.But when i run the command'yalmiptest' in the Matlab it can't find the solver cplex.i have checked my windows 7 and cplex,they are both 64bits.i have no idea for the problem.could you help me?thanks for your help! 
Re: How to set the time limit for solving a MILP via yalmip
20131105T09:15:53ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20121125T09:18:10Z
hello johan
i have installed the CPLEX 12.5 and the latest Yalmip.And i also set their paths in the MATLAB(R2012 a)according to your tutorial.But when i run the command'yalmiptest' in the Matlab it can't find the solver cplex.i have checked my windows 7 and cplex,they are both 64bits.i have no idea for the problem.could you help me?thanks for your help!hello
I am now encountering with the problem you have mentioned on Nov 25,2012 about installation. I wonder how you solve the problem later. Can you help me? Thanks for you help!

Re: How to set the time limit for solving a MILP via yalmip
20131105T09:49:14ZThis is the accepted answer. This is the accepted answer. CPLEX_Xin_Cheng
 20131105T09:15:53Z
hello
I am now encountering with the problem you have mentioned on Nov 25,2012 about installation. I wonder how you solve the problem later. Can you help me? Thanks for you help!
The problem has been solved.http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Main.FAQ
Problems about YALMIP installation can be solved following the instructions.