-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bound Disjunction Constraints #858
Comments
Am all for adding support for bound disjunction constraints! That would provide some nice functionality to users, and I've at least observed myself that they're important for many of the MIPs I solve.
Thanks for all your work on this! Hope the answers were helpful. |
Recipes does seem like a good place to handle this. Will check out hopefully next week :) |
Any updates on this @ctdunc? |
Apologies -- we ended up going a slightly different direction on the project this was relevant for, so I ended up not having bandwidth to complete at work. I'd like to come back to it soon, though, to test. |
Regular Disjunction constraints are quite slow when there are many bound disjunctions with distinct coefficients, since from my understanding the symmetry graph is built out by permuting variables with the same coefficients.
Fortunately, there is also the
bounddisjunction
constraint handler, which I am working on adding support for. It looks like bound disjunctions only support constraints of the formx_i{>=, <=}c_i
(i.e. with one variable). Creating them this way doesn't feel very "pythonic", so I'd like to implement a function which takes expressions, and creates dummy variables so that constraintexpr <=a OR expr >= b
is converted to(expr == dummy_var) AND (dummy_var <= a OR dummy_var >=b)
A few questions:
(a<=expr<=b) OR (z<=expr<=w)
wherez<w
? I haven't looked closely enough (yet) to see if bounddisjunction already handles this, but maybe somebody with more experience already knows.model.addVar
it does not seem possible.Thanks!
The text was updated successfully, but these errors were encountered: