1
votes

I would like to know how to use MIP callback in Python CPLEX API to record feasible solution. Currently my cplex model can run for 10 hours and it seems that the objective value didn't improve at all, however I couldn't stop halfway since the data will be lost, so I'd like to know how to use callback in an MILP problem to record feasible solution

Edit: I'm not using docplex, I used cplex

import cplex
1

1 Answers

0
votes

see the progress listener example at https://github.com/IBMDecisionOptimization/docplex-examples/blob/master/examples/mp/jupyter/progress.ipynb

This tutorial includes everything you need to set up decision optimization engines, build a mathematical programming model, then use the progress listeners to monitor progress, capture intermediate solutions and stop the solve on your own criteria.