-
Notifications
You must be signed in to change notification settings - Fork 269
Support for AND-constraints #980
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
base: master
Are you sure you want to change the base?
Conversation
Left out are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces additional support for AND-constraints in the Python SCIP interface by adding new functions to query properties of AND-constraints and to adjust specific flags during constraint upgrades.
- New API functions to get the number of variables, the variables list, and the resultant variable from an AND-constraint.
- Added functions to sort AND-constraints and change check and removable flags during constraint upgrades.
- Updated tests and CHANGELOG to reflect the new functionality.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
tests/test_cons.py | Added tests for the new AND-constraint functions |
src/pyscipopt/scip.pxi | Implemented new methods for AND-constraints and flag configuration |
src/pyscipopt/scip.pxd | Declared new C functions for AND-constraint operations |
CHANGELOG.md | Updated changelog with support for AND-constraints |
@mmghannam can you give a quick glance, please? Mostly need the approval :) |
What's missing:
SCIPchgAndConsCheckFlagWhenUpgr()
,SCIPchgAndConsRemovableFlagWhenUpgr()
. Not sure if it makes sense to add.As before, I haven't tried to compile, I just copied stuff.
Also moved things around a bit, I think it makes more sense to join methods by constraint handler, like in SCIP's documentation.