Skip to content

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Support for AND-constraints #980

wants to merge 8 commits into from

Conversation

Joao-Dionisio
Copy link
Member

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.

@Joao-Dionisio Joao-Dionisio marked this pull request as ready for review May 12, 2025 19:13
@Joao-Dionisio
Copy link
Member Author

Joao-Dionisio commented May 12, 2025

Left out are SCIPchgAndConsCheckFlagWhenUpgr and SCIPchgAndConsRemovableFlagWhenUpgr.

@Joao-Dionisio Joao-Dionisio self-assigned this May 12, 2025
@Joao-Dionisio Joao-Dionisio requested a review from Copilot May 12, 2025 19:14
Copilot

This comment was marked as outdated.

@Joao-Dionisio Joao-Dionisio marked this pull request as draft June 17, 2025 16:30
@Joao-Dionisio Joao-Dionisio marked this pull request as ready for review June 17, 2025 16:46
@Joao-Dionisio Joao-Dionisio requested a review from Copilot June 17, 2025 16:46
Copy link

@Copilot Copilot AI left a 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

@Joao-Dionisio Joao-Dionisio enabled auto-merge (squash) June 17, 2025 16:52
@Joao-Dionisio Joao-Dionisio requested a review from mmghannam June 17, 2025 16:56
@Joao-Dionisio
Copy link
Member Author

Joao-Dionisio commented Jun 17, 2025

@mmghannam can you give a quick glance, please? Mostly need the approval :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant