python-mip icon indicating copy to clipboard operation
python-mip copied to clipboard

Feature request: user defined stopping rule

Open christian2022 opened this issue 4 years ago • 1 comments

We can stop a long running optimization process by setting one or more of the following criteria before starting the optimization:

  • max_mip_gap
  • max_mip_gap_abs
  • max_nodes
  • max_seconds
  • max_solutions

It would be helpful if we can place a handler that will be called from time to time during the solution process to gracefully end the optimization, independent of one of the above criteria.

For example if we can change the max_nodes or max_seconds property of a running process, we could force a graceful termination and receive the current solution, even if it might take some time until a node is processed.

Any ideas on how to achieve this?

christian2022 avatar May 27 '21 11:05 christian2022

We can create a callback for that... I like the idea very much!

tuliotoffolo avatar Jun 23 '21 22:06 tuliotoffolo