How to control MIP using callbacks in multi-objective optimization
AnsweredWhile implementing a MIP model with multiple objective functions, I aim to use a callback function and elapsed time to dynamically manage the optimization process. Specifically, during the sequential optimization of objectives, if the MIP gap shows minimal change (e.g., 0.81 → 0.81 → 0.81 → 0.80) or if the time interval becomes too long, the current objective should terminate, and the solver should proceed to the next objective.
In the following case, how to control the process using a callback so that objective function 6 stops when the MIP gap reaches 0.8% and then proceeds to objective function 7
================================================================
Multi-objectives: optimize objective 6 (InventoryMinimize() ...
================================================================
2907 1576 infeasible 94 -4655.0000 -4616.9223 0.82% 28.0 61s
3290 1767 -4619.6229 41 303 -4655.0000 -4617.0661 0.81% 26.5 66s
3662 1947 -4629.0940 80 227 -4655.0000 -4617.1022 0.81% 25.2 70s
4315 2478 -4648.7918 60 296 -4655.0000 -4617.2600 0.81% 23.4 77s
4822 2767 -4647.3799 94 142 -4655.0000 -4617.3114 0.81% 22.7 82s
5095 2990 -4644.4905 58 284 -4655.0000 -4617.3314 0.81% 22.5 85s
5746 3468 infeasible 105 -4655.0000 -4617.3591 0.81% 21.3 91s
6409 3919 -4644.7473 73 183 -4655.0000 -4617.4122 0.81% 20.5 97s
6714 4164 -4618.6869 50 329 -4655.0000 -4617.4142 0.81% 20.2 100s
7439 4636 -4622.3704 51 350 -4655.0000 -4617.5094 0.81% 19.8 106s
8045 5064 -4633.3399 66 273 -4655.0000 -4617.5505 0.80% 19.5 112s
...
...
...
=========================================================
-
You can use the
cbStopOneMultiObj
callback to interrupt the optimization of a specific objective in a multi-objective model, while allowing the overall hierarchical optimization process to continue. The documentation of this callback also includes an example for your reference.Please see our page on callback codes for the list of methods available for a Multiobj callback.
Regards,
Simran0
Please sign in to leave a comment.
Comments
1 comment