I try to solve a model in docplex(python) the model was stopped after a specific time limit. I want when the model stop return the best upper bound was found.
Once you solve a docplex model, it creates an internal
SolveDetails object that contains the best bound you're looking for. You can access it in two ways:
- Assuming you've defined your docplex model as
model(an instance of the class
- Assuming you've stored your model's solution in
sol(an instance of the class
sol = model.solve()
Check out the documentation for more details.