3
$\begingroup$

I am solving my first model in CPLEX 22.1. I have setup a quadratic MIP with 100 variables and the model has been running for a day already with the best integer and best bound solutions barely changing over long periods of time. Can I pause the solver and inspect the current best solution (i.e. the vector which gives the currently best objective)?

I am also looking to apply heuristics and read in the guide that I need to modify the "MIP emphasis" parameter. Is there a way of doing this in the GUI? All I can find is "Effort level of heuristics" in the settings menus.

Select lines of log file:

 792048744 673300881    -6301.3749    44    -6445.0357    -5107.4712 1.25e+09   20.75%
 793176911 674258778    -5809.5478    40    -6445.0357    -5107.4712 1.26e+09   20.75%
 794483516 675327730    -6200.1004    39    -6445.0357    -5107.4712 1.26e+09   20.75%
 795699033 676334114    -5866.9399    44    -6445.0357    -5107.4712 1.26e+09   20.75%
 796881017 677353115    -6046.6600    29    -6445.0357    -5107.4712 1.26e+09   20.75%
 798100378 678340092    -5791.3480    40    -6445.0357    -5107.4712 1.26e+09   20.75%
 799266501 679307405    -6375.3359    19    -6445.0357    -5107.4712 1.27e+09   20.75%
 800420755 680306754    -6069.4608    38    -6445.0357    -5107.4712 1.27e+09   20.75%
 801596874 681269721    -6139.7369    48    -6445.0357    -5107.4712 1.27e+09   20.75%
 802801954 682318405    -6178.6201    38    -6445.0357    -5107.4712 1.27e+09   20.75%
Elapsed time = 88392.21 sec. (10809704.28 ticks, tree = 107998.33 MB, solutions = 18)
Nodefile size = 105949.75 MB (60962.62 MB after compression)
 804132565 683432372    -6403.1240    36    -6445.0357    -5107.4712 1.27e+09   20.75%
 805516854 684546042    -6351.3038    19    -6445.0357    -5107.4712 1.27e+09   20.75%
 806906424 685751197    -6284.1826    34    -6445.0357    -5107.4712 1.28e+09   20.75%
 808030807 686676273    -5887.6066    32    -6445.0357    -5107.4712 1.28e+09   20.75%
 809085620 687532713    -6363.9349    39    -6445.0357    -5107.4712 1.28e+09   20.75%
 810261526 688511803    -6379.0674    27    -6445.0357    -5107.4712 1.28e+09   20.75%
 811582033 689657380    -5846.0319    46    -6445.0357    -5107.4712 1.28e+09   20.75%
 812908853 690734080        cutoff          -6445.0357    -5107.4712 1.29e+09   20.75%
 814150976 691725836    -5972.4972    48    -6445.0357    -5107.4712 1.29e+09   20.75%
 815305277 692747078    -6420.1132    36    -6445.0357    -5107.4712 1.29e+09   20.75%
Elapsed time = 89865.24 sec. (10962292.30 ticks, tree = 109639.60 MB, solutions = 18)
Nodefile size = 107591.62 MB (61918.08 MB after compression)
 816563579 693798990        cutoff          -6445.0357    -5107.4712 1.29e+09   20.75%
 817767032 694779345    -5895.8407    46    -6445.0357    -5107.4712 1.29e+09   20.75%
 818848532 695715558    -6344.1731    41    -6445.0357    -5107.4712 1.30e+09   20.75%
 819939414 696617487    -6167.8911    31    -6445.0357    -5107.4712 1.30e+09   20.75%
 821120160 697570971    -6134.0994    40    -6445.0357    -5107.4712 1.30e+09   20.75%
 822226031 698509095    -5664.0570    53    -6445.0357    -5107.4712 1.30e+09   20.75%
 823365192 699460730    -5863.1686    46    -6445.0357    -5107.4712 1.30e+09   20.75%
 824396734 700363247    -6051.7562    41    -6445.0357    -5107.4712 1.30e+09   20.75%
 825483340 701249449    -5883.8240    41    -6445.0357    -5107.4712 1.31e+09   20.75%
 826595881 702168454    -6258.2970    37    -6445.0357    -5107.4712 1.31e+09   20.75%
Elapsed time = 91239.09 sec. (11114880.47 ticks, tree = 111122.80 MB, solutions = 18)
Nodefile size = 109073.51 MB (62783.13 MB after compression)
 827829998 703194454    -5935.0349    33    -6445.0357    -5107.4712 1.31e+09   20.75%
 828977361 704158153    -6020.6346    49    -6445.0357    -5107.4712 1.31e+09   20.75%
 830088428 705093199    -6147.7426    48    -6445.0357    -5107.4712 1.31e+09   20.75%
 831139007 706006645    -5822.0882    40    -6445.0357    -5107.4712 1.32e+09   20.75%
 832274394 706907577    -5950.6839    50    -6445.0357    -5107.4712 1.32e+09   20.75%
 833345602 707785250    -6263.2685    34    -6445.0357    -5107.4712 1.32e+09   20.75%
 834504877 708778888    -6330.0896    43    -6445.0357    -5107.4712 1.32e+09   20.75%
 835431354 709547316    -5811.8426    52    -6445.0357    -5107.4712 1.32e+09   20.75%
 836393855 710382419    -6215.7973    39    -6445.0357    -5107.4712 1.32e+09   20.75%
 837398864 711222106    -5947.9031    53    -6445.0357    -5107.4712 1.32e+09   20.75%
$\endgroup$
5
  • $\begingroup$ Can you show the log? $\endgroup$ Oct 11, 2022 at 13:39
  • $\begingroup$ You cannot change the solver options while the solver is running. But you can add a settings file to your run configuration, and in there you have access to a myriad of options and settings. $\endgroup$
    – Sune
    Oct 11, 2022 at 14:50
  • $\begingroup$ @ErwinKalvelagen I've now added some lines of the Engine log $\endgroup$
    – twaits791
    Oct 11, 2022 at 16:33
  • $\begingroup$ Cplex may or may not linearize things when binary variables are quadratic (Cplex uses some ML classifier for that). Switching that approach can make a ton of difference (via QTOLIN). I can't see from this part if this can be the case. You also may try the MIPEMPHASIS and/or CUTS option. $\endgroup$ Oct 11, 2022 at 17:10
  • $\begingroup$ Of course, you should also re-evaluate your problem formulation. $\endgroup$ Oct 12, 2022 at 14:00

2 Answers 2

4
$\begingroup$

See execution toolbar in the CPLEX IDE

execution toolbar

Pause / Resume will help and you can also use breakpoints with the debugger that you can use for the scripting part within OPL

$\endgroup$
2
$\begingroup$

I don't think you can pause the current run. If you stop the run, inspect the solution and then instruct the solver to solve again, without changing anything in the model, it should resume where it left off (assuming warm starts are turned on, which they are by default). This works when using one of the programming APIs (C++, Java etc.), but I have not tried it from the Studio IDE, so I would recommend testing it before using it in a production run.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.