-
Notifications
You must be signed in to change notification settings - Fork 18
Custom Constraint Handlers #222
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
Conversation
|
Hi Mohammed, thanks for starting the constraint handler implementation! Over the past days I browsed through different sources (SCIP C, OrTools GScip, PySCIPOPT) and their examples on lazy constraint callbacks. I cannot directly pinpoint the issue, but it seems like most example code for constraint handlers adds a single constraint of the handlers constraint class during setup:
Here's some example documentation where it also mentions adding a constraint for the constraint class:
Maybe I'm just misunderstanding the example code, then sorry for the confusion :) |
|
Hi @bgraf! |
Alright, then I missed that, thanks for the explanation! I'll play a bit with your TSP example and compare it with another implementation. |
|
I reworked your example for TSPLIB instance a280 here. It works as expected! What can we do about getting variable values in the enforce callback? Should I try to add a corresponding method to |
Very cool! It's reassuring to hear that 😄
Yes, adding it to Model would be great, I'd happily accept a PR :) |
No description provided.