Practical way to change MIPFocus during Execution
AnsweredI have a code running for several days and I am wondering if there is a way to change MIPFocus from 1 to 3 during execution. Callback do not work to change model parameter and terminating and restarting seems to restart the optimization at the root node.
After about a day of execution, neither my objective nor the best bound seem to change. I'd like to change MIPFocus to 3 in order to try to prove optimality.
0
-
Hi Cedric,
You will be able to change the MIPFocus parameter from a callback by following our example here:
How do I change parameters in a callback?I tested the approach and it resumes the optimization from where it was terminated (at 4 seconds) and the log looks like this
...
Set parameter MIPFocus to value 1
Gurobi Optimizer version 10.0.0 build v10.0.0rc2 (mac64[x86])
...
H 787 744 1.725015e+09 8.0001e+08 53.6% 7.8 2s
H 928 813 1.700015e+09 8.0001e+08 52.9% 7.7 3s
H 1055 907 1.700014e+09 8.0001e+08 52.9% 7.6 3s
...
Solve interrupted
...
Set parameter MIPFocus to value 3
...
Continuing optimization...
H 2813 2201 1.600014e+09 8.0001e+08 50.0% 10.5 4s
3090 2327 9.5001e+08 29 49 1.6000e+09 8.0001e+08 50.0% 10.7 5s
H 3785 2898 1.600014e+09 8.0001e+08 50.0% 11.1 5s
...- Riley
0
Please sign in to leave a comment.
Comments
1 comment