I'd like to get informations about my cplex problem during solve. My first idea was to use an IloCplex.IncumbentCallback but it's not compatible with dynamic search, and I get better results with dynamic search. So I'm looking for a way to get informations without loosing dynamic mode.
It seems I can't use a callback because only informational callbacks are compatible with dynamic search, but none of the 4 informations callbacks are called often enough to give information when I need it.
When cplex finds a new solution, I guess this solution must be stored somewhere, so there should be a way to get informations about this solution
I would like to get :
- Best Integer
- Best Bound
- Problem variables values.
Thanks
You can retrieve almost all of these with a MIPInfoCallback:
get_incumbent_objective_value(self)
get_best_objective_value(self)
get_incumbent_values(self, *args)
get_values
method. Indeed here you lose dynamic search. I am not sure there is a way around this..The above links refer to the Python API, but the situation should be similar for the other APIs as well. Information that can be retrieved by informational callbacks is here (although this list refers to version 12.5, and some features might be missing).
I hope this helps!