coin-or / python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Eclipse Public License 2.0
518 stars 92 forks source link

Incumbent progress #189

Closed jurasofish closed 3 years ago

jurasofish commented 3 years ago

I've gone and had a stab at implementing the IncumbentUpdater functionality.

I've only implemented the ability to read the incumbent solution, not the ability to provide an updated solution back to the solver.

I've used it to make an animation of how the solution progresses as the solver runs - https://github.com/jurasofish/mip_incumbent

I'm opening this PR to start a discussion around whether this is useful and implemented okay (hmu if you know where they're hiding the docs for the CBC incumbent callback). not finished yet.

@h-g-s looks like you started on this a year or two ago but never got around to finishing it. Maybe you have some thoughts on what I've done?

jurasofish commented 3 years ago

Here's an example output from that linked repo (02f2daff7ae4b792598673fe118b768a4fcd70b9)

https://user-images.githubusercontent.com/33386122/113386325-c0fc2800-93d5-11eb-8037-be90b78eb954.mp4

h-g-s commented 3 years ago

Hi @jurasofish , this is really nice! Yes, I started this but did not finished. I'll accept your PR and play with it. If this is not ask too much, could you also include an example in the documentation ?

h-g-s commented 3 years ago

Some tests were failing due to python 3.5 - which is deprecated and not recommended right now. We removed it from the tests, so in your next commit they will not be triggered.

jurasofish commented 3 years ago

Don't have to time to polish this up. Hopefully will be handy for someone in the future