Page 1 of 1

CPLEX OPTCR

Posted: Wed Oct 14, 2020 1:50 pm
by betulkayisoglu
Hello,

I want CPLEX to stop when an integer feasible solution that has been proved to be within 5% of optimality. For this, I am making

OPTIONS
OPTCR=0.05;

After the time limit I set i.e. RESLIM=3600, I check the relative gap and see that it is i.e. 0.00085. In fact I want it to stop when the relative gap is 0.05 but it uses all the time limit I set. Am I doing sth wrong?

Re: CPLEX OPTCR

Posted: Thu Oct 15, 2020 12:18 pm
by Fred
Hi,

When you set

Code: Select all

OPTIONS OPTCR=0.05;
Cplex should terminate as soon as that gap is reached.
Could you share a log and your code?

Fred

Re: CPLEX OPTCR

Posted: Thu Oct 15, 2020 1:58 pm
by betulkayisoglu
Thank you Fred, in fact I just fixed my problem.

In my code at somewhere there was OPTCR=0; I could not recognize, for that reason even I was defining it as 0.05 at the beginning of the code it was taking as 0.

Now it is ok, thanks for your reply :)