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

Example code using IncumbentUpdater

Open JeroenGar opened this issue 3 years ago • 1 comments

Hello,

I've searched through the documentation and found that it is possible to receive updates when a new feasible solution is found with IncumbentUpdater.

However I am really struggling to understand how this works. I've also searched around for example code but was not able to find anything.

Would it be possible to provide a very simple example of how the IncumbentUpdater should be used?

Thanks in advance!

JeroenGar avatar Sep 28 '20 09:09 JeroenGar

I have the same question. Here is what I find in the directory 'mip/gurobi.py':

    def optimize(self, relax: bool = False) -> OptimizationStatus:

        # todo add branch_selector and incumbent_updater callbacks

Since they said it is "todo", so I guess the IncumbenUpdater function hasn't been finished or published. Correct me if I am wrong.

zuzhaoye avatar Nov 13 '21 07:11 zuzhaoye