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

Apply LazyConstraintGenerator if and only if an improved integral solution is found for cbc

Open sebheger opened this issue 3 years ago • 5 comments

At the moment it is applied whenever the solution is integer. So unnecessary calls for the same solution are observed.

sebheger avatar May 06 '22 11:05 sebheger

Might be related to #144

sebheger avatar May 07 '22 20:05 sebheger

Perhaps related to this, but I have a situation (using CBC with mip-python) where it seems like the solver is ignoring my lazy constraints.

For example, at some point in the search this lazy constraint is added: + var(7) + var(157) <= 1.0

At future iterations of the callback, the solution passed to the callback has both var(7) and var(157) assigned a value of 1 (which should be impossible) and the solver gets "stuck" as it keeps returning the same solution when the cut should prevent it from doing this.

Any thoughts?

KyleBooth avatar May 16 '22 21:05 KyleBooth

@KyleBooth Thanks for your comment. Could you provide a minimalistic code example for the behavior? I have observed similar results, but couldn't nail it down to a straightforward code example.

sebheger avatar May 17 '22 06:05 sebheger

@sebheger It will be difficult to produce a minimal example since the particular cut being violated is part of a larger MILP, but I will see if I can come up with something.

KyleBooth avatar May 17 '22 18:05 KyleBooth

Similar to #331

sebheger avatar Jan 10 '23 12:01 sebheger