Show current best objective value every 30 minutes

Hello,

I’m solving an ILP problem with AMPL+Cplex. It takes a long time to get optimum solution. I want to output the current found best objective value every 30 minutes. Is it possible with AMPL?

Thank you!

1 Like

Hi @qiaolunzhang,

Are you using AMPL via APIs? If that is the case we have solver interfaces with callbacks (https://ampls.readthedocs.io/) that would allow implementing a progress report callback.

Hello,

Thank you for your reply. I’m using AMPL directly rather than through any API (e.g., Python). Is there any solution if I"m using AMPL directly?

Thank you!

1 Like

Using AMPL directly, you can set the CPLEX option mipdisplay to 1 (e.g., option cplex_options 'mipdisplay=1') and it should display every time a new feasible solution is found. Some other options (CPLEX Options — AMPL Resources) may allow reducing the frequency it displays, but it may not be easy to get just the best objective every 30 minutes.