Process time analysis and solver log

195 views
Skip to first unread message

Kiyo

unread,
Jul 14, 2021, 9:38:33 PM7/14/21
to AMPL Modeling Language
Hi,

I'm using AMPL Python API and I have two questions.

1. How can I get the process time breakdown?
I mean, I'd like to distinguish the processing time between the AMPL and optimization solver.

2. How can I get the detailed log of the optimization solver?
For example, if I directly call CPLEX, CPLEX outputs some logs.
When I use CPLEX via AMPL Python API, I'd like to check the CPLEX logs.

Best regards,


AMPL Google Group

unread,
Jul 15, 2021, 7:46:29 AM7/15/21
to AMPL Modeling Language
> 1. How can I get the process time breakdown?
> I mean, I'd like to distinguish the processing time between the AMPL and optimization solver.

AMPL provides built-in timing parameters such as _ampl_time and _total_solve_time. You’ll find the complete list in Table A-14 in the reference appendix of the AMPL book.

Using amplpy, you can access for instance the value of "_total_solve_time" with ampl.getValue('_total_solve_time').


> 2. How can I get the detailed log of the optimization solver?
> For example, if I directly call CPLEX, CPLEX outputs some logs.
> When I use CPLEX via AMPL Python API, I'd like to check the CPLEX logs.

In order to get verbose output from CPLEX you can set "cplex_options" to "mipdisplay=2" with ampl.option['cplex_options'] = 'mipdisplay=2'. You can see other options at https://ampl.com/products/solvers/solvers-we-sell/cplex/options/.


--
Filipe Brandão
am...@googlegroups.com
{#HS:1572100936-105525#}
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/ccb8f068-ad57-4926-bb53-dfe7f49eecf2n%40googlegroups.com.

Kiyo

unread,
Jul 15, 2021, 10:38:51 PM7/15/21
to AMPL Modeling Language
Thank you so much!

2021年7月15日木曜日 20:46:29 UTC+9 AMPL Google Group:
Reply all
Reply to author
Forward
0 new messages