Skip to content
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

Addingglobals channel #488

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

Addingglobals channel #488

wants to merge 14 commits into from

Conversation

363734
Copy link
Contributor

@363734 363734 commented May 28, 2024

Addition of the channel constraint for xcsp3 competition

@Dimosts Dimosts self-requested a review May 28, 2024 09:54
cpmpy/expressions/globalconstraints.py Show resolved Hide resolved
cpmpy/expressions/globalconstraints.py Show resolved Hide resolved
cpmpy/expressions/globalconstraints.py Show resolved Hide resolved
cpmpy/expressions/globalconstraints.py Show resolved Hide resolved
tests/test_globalconstraints.py Show resolved Hide resolved
Copy link
Collaborator

@Wout4 Wout4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no solver interfaces to be changed, (do none support the additional kinds of channeling constraints?)

@@ -181,7 +181,7 @@ def decompose(self):
return [var1 != var2 for var1, var2 in all_pairs(self.args)], []

def value(self):
return len(set(argvals(self.args))) == len(self.args)
return len(set(a.value() for a in self.args)) == len(self.args)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not argvals? We switched to argvals everywhere for consistency with the partial functions

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.

3 participants