time limit exceed CPLEX

541 views
Skip to first unread message

Gazi Md Daud Iqbal

unread,
Oct 13, 2015, 2:49:47 PM10/13/15
to AMPL Modeling Language

Hi Bob,


I have used following command to fix time limit in minimization problem for CPLEX solver. I am getting optimal results within this time limit for many scenarios.


option cplex_options 'timelimit=900';


But some scenarios exceeding time limit (in some cases it is doubled than time limit), though objective values are very close. As a result my average CPU time is increasing. I don't want them to exceed time limit. Could you please explain why it is happening? Is there any way to avoid this problem? I have attached some screenshots.

 

Thanks in advance. 

output.png
output1.png
output2.png
output3.png
output4.png

Robert Fourer

unread,
Oct 14, 2015, 3:07:08 PM10/14/15
to am...@googlegroups.com
For MIP solves, the CPLEX option 'timelimit=900' refers to elapsed time (also known as wall clock time). Thus your run will stop after 900 seconds have passed (or slightly more, since CPLEX checks only at certain points in its code).

By default the CPLEX MIP solver tries to use all of your computer's processor cores running in parallel; the AMPL built-in parameter _solve_time reports the total of all the times spent on all of those cores, which can be much greater than the elapsed time. To get a time consistent with the timelimit setting, you can use the _solve_elapsed_time parameter instead.

Bob Fourer
am...@googlegroups.com

=======

Gazi Md Daud Iqbal

unread,
Oct 15, 2015, 12:40:25 PM10/15/15
to AMPL Modeling Language, 4...@ampl.com
Thank you so much Bob.
Reply all
Reply to author
Forward
0 new messages