# Show current best objective value every 30 minutes

**URL:** <https://discuss.ampl.com/t/show-current-best-objective-value-every-30-minutes/563>\
**Category:** New to AMPL\
**Created:** [May 18, 2023, 10:12am UTC](https://discuss.ampl.com/t/show-current-best-objective-value-every-30-minutes/563 "2023-05-18T10:12:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![qiaolunzhang](https://avatars.discourse-cdn.com/v4/letter/q/898d66/32.png) [@qiaolunzhang](https://discuss.ampl.com/u/qiaolunzhang)\
**Post date:** [May 18, 2023, 10:12am UTC](https://discuss.ampl.com/t/show-current-best-objective-value-every-30-minutes/563/1 "2023-05-18T10:12:13Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![fdabrandao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/fdabrandao/32/63_2.png) [@fdabrandao](https://discuss.ampl.com/u/fdabrandao)\
**Post date:** [May 18, 2023, 7:00pm UTC](https://discuss.ampl.com/t/show-current-best-objective-value-every-30-minutes/563/2 "2023-05-18T19:00:40Z")

</div>

Hi @qiaolunzhang,

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

---

<div class="post-metadata">

**Author:** ![qiaolunzhang](https://avatars.discourse-cdn.com/v4/letter/q/898d66/32.png) [@qiaolunzhang](https://discuss.ampl.com/u/qiaolunzhang)\
**Post date:** [May 18, 2023, 7:04pm UTC](https://discuss.ampl.com/t/show-current-best-objective-value-every-30-minutes/563/3 "2023-05-18T19:04:01Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![fdabrandao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/fdabrandao/32/63_2.png) [@fdabrandao](https://discuss.ampl.com/u/fdabrandao)\
**Post date:** [May 18, 2023, 7:10pm UTC](https://discuss.ampl.com/t/show-current-best-objective-value-every-30-minutes/563/4 "2023-05-18T19:10:20Z")

</div>

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](https://dev.ampl.com/solvers/cplex/options.html)) may allow reducing the frequency it displays, but it may not be easy to get just the best objective every 30 minutes.
