Closed ryanhammonds closed 1 year ago
@ryanhammonds Thanks for your offer.
CPLEX interface would be quite a nice thing. Feel free to open a PR. At the moment #255 we are trying to intergrate another open source solver
CBC is theoretically supporting lazy cut generation during optimization through python-mip the way you described, but it is buggy #95 , #143 , #175 , and many more
I'm considering adding python-mip as an option to a package that currently depends on cplex. The requirement is to run some custom code whenever the MIP solver finds an integer feasible solution that will compute a cut and add it to the MIP formulation as a lazy constraint. Right now we do this using the LazyCutCallback callback in cplex. Could the same be accomplished using
lazy_constrs_generator
, subclassingConstrsGenerator
, and defining the the callback ingenerate_constrs
? I also wanted to confirm thatlazy_constrs_generator
is compatible with cbc, as the goal is to have an open source solver supported in the package I'm working on.I noticed that there was some interest in a cplex interface in #49. If the lazy cut callback above is supported, I was planning on writing an interface class for python-mip, that could be accessed using cplex syntax (e.g. calling
model.solve
formodel.optimize
, etc), so that it could be easily integrated into the package I'm working on. But the inverse may be useful here. If there is current interest in this, I could make a PR for a cplex interface. Thanks!