Description
In some cases, when solving a certain MIP problem, the solver may become slow. If the solver is called through an API request, it is not possible to directly stop the process using Ctrl+C. Instead, the interrupt feature of the solver itself needs to be used. Time Limit can be used to terminate models. However, if the solution time of the model ranges from 20 seconds to 1 hour, and the length of the solution time is not known in advance, it is difficult to control it through time limit.
Gurobi
https://www.gurobi.com/documentation/current/refman/py_model_terminate.html
COPT
https://guide.coap.online/copt/zh-doc/pyapiref.html#model-interrupt
Cplex
https://www.ibm.com/docs/en/icos/22.1.0?topic=users-example-complex-termination-criteria-in-callback