Truncate and obtain partial solution

19 views
Skip to first unread message

Jorge Bolívar

unread,
Sep 9, 2021, 11:28:22 AM9/9/21
to AMPL Modeling Language
Dear Robert, I was wondering if I could truncate an optimization process and get a "partial" solution ("the best" the solver has already gotten so far).

I am currently trying to solve a MILP with over 192.000 variables and 281.000 constrains (after presolve elimination), using CPLEX.

Previously, I solved a very similar model, in the same machine and with the same solver, getting an optimal solution in over 10 minutes.

I made a slight modification to one restriction of the model, changed the size of two sets, and tried to solve it again. The result is a model very similar in size to those I've run before. However, to this moment AMPL has been running for roughly 28 Hours, and has not given any solution yet.

Is it possible the model has gotten "stucked"? Can I get any solution or report of the progress after truncating the process?

Any suggestion is highly appreciated.

AMPL Google Group

unread,
Sep 10, 2021, 11:43:01 AM9/10/21
to AMPL Modeling Language
To see CPLEX's progress log while it is running, add mipdisplay=2 to your cplex_options string; or if you are not yet setting a cplex_options string, add the command

option cplex_options 'mipdisplay=2';

before solving. The log gives a lot of useful information about CPLEX's progress, including the objective value of the best solution found so far.

Also you can ask CPLEX to stop and return its current best solution to AMPL. To do this, send an interrupt to the CPLEX process:
  • If you are running from the command line, press ctrl-C (the ctrl and C keys at the same time).
  • If you are running from the AMPL IDE, click on the interrupt icon (a red square) at the top of the console window.
Alternatively you can tell CPLEX to stop and return its current best solution after a specified number of seconds or search nodes; see time and nodes in our listing of CPLEX Options for AMPL.


--
Robert Fourer
am...@googlegroups.com
{#HS:1626189463-106222#}
--
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/c510fe90-bed3-4d36-88b4-dc117e6a6acbn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages