Topic
  • 2 replies
  • Latest Post - ‏2014-04-04T09:22:43Z by Petr Vilím
LucieBuzkova
LucieBuzkova
1 Post

Pinned topic Time limit differs from running time

‏2014-04-01T09:55:30Z |

Hi.

I have a problem with timelimit. I set cp.param.timelimit = 30 and measure the running time using:

startTime = new Date;

cp.solve();

endTime = new Date;

runningTime = endTime - startTime;

 However the running time differs from timelimit. Sometimes it runs 15 sec, sometimes it runs 40 sec. Why? How can I fix that? I use IBM ILOG CPLEX v. 12.4.

Thank you for your replies. Lucie

Updated on 2014-04-01T09:57:08Z at 2014-04-01T09:57:08Z by LucieBuzkova
  • Petr Vilím
    Petr Vilím
    61 Posts

    Re: Time limit differs from running time

    ‏2014-04-04T09:21:54Z  

    Hello Lucie,

    one of the reasons could be the default setting of parameter TimeMode to value CPUTime in version 12.4. In this case it is the process time what is counted. In comparison to real time it can take longer if the computer is under heavy load, or shorter if multiple threads are used. You can change this parameter to value ElapsedTime. Or even better, switch to version 12.6, it has ElapsedTime as the default. Note that version 12.6 has several major improvements over 12.4 so it may have another benefits.

    If it doesn't help then I would have to check the model to diagnose the issue. In version 12.6 you can use function IloCP::exportModel and send me the model to petr_vilim@cz.ibm.com.

    Best regards, Petr

  • Petr Vilím
    Petr Vilím
    61 Posts

    Re: Time limit differs from running time

    ‏2014-04-04T09:22:43Z  

    Hello Lucie,

    one of the reasons could be the default setting of parameter TimeMode to value CPUTime in version 12.4. In this case it is the process time what is counted. In comparison to real time it can take longer if the computer is under heavy load, or shorter if multiple threads are used. You can change this parameter to value ElapsedTime. Or even better, switch to version 12.6, it has ElapsedTime as the default. Note that version 12.6 has several major improvements over 12.4 so it may have another benefits.

    If it doesn't help then I would have to check the model to diagnose the issue. In version 12.6 you can use function IloCP::exportModel and send me the model to petr_vilim@cz.ibm.com.

    Best regards, Petr