how to display the CPU time required to reach the best solution

51 views
Skip to first unread message

Mei

unread,
May 13, 2015, 12:31:53 PM5/13/15
to am...@googlegroups.com
Hi,

For the problems with a time limit, for example 11000 seconds, but the best solution could be reached at 9600 seconds.
How to obtain this best solution reached CPU time then?


Thank you very much in advance!



Best wishes,

Mei

Robert Fourer

unread,
May 13, 2015, 8:41:31 PM5/13/15
to am...@googlegroups.com
This would be a solver feature, so it would depend on the solver that you are using. I would guess that you are looking for this option in a solver that handles integer variables by building a search tree, and hence often finds an optimal solution long before that solution is proved to be (within some percentage of) optimal.

None of these solvers returns the amount of time up to the point where the best solution was found, however. I think the solver developers do not consider this to be a useful measure in practical optimization. The only way to get an approximation of this timing is to have the solver display a node log (such as with "option gurobi_options 'outlev 1';") and then look at the time that is reported at or near the log line for the best solution that was found.

Bob Fourer
4...@ampl.com

=======

luckyredplum .

unread,
May 14, 2015, 10:46:47 AM5/14/15
to am...@googlegroups.com
Dear Bob,

I see. I tried it, it works sufficiently for me. Thanks a lot for the kindest support as always!


All the best,

Mei

--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/kvq1Z9erzLo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages