Skip to content

Positive globals#1006

Open
ThomSerg wants to merge 36 commits into
masterfrom
positive_globals
Open

Positive globals#1006
ThomSerg wants to merge 36 commits into
masterfrom
positive_globals

Conversation

@ThomSerg

@ThomSerg ThomSerg commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Collection of positive decompositions of globals.

Table

  • decomp
  • decomp_linear -> MDD
  • decomp_pos -> NonReifiedTable

ShortTable

  • decomp
  • decomp_pos -> RowSelectingShortTable (issue with solution count)

NegTable

  • decomp

NegShortTable

  • decomp
  • decomp_pos

Circuit

  • decomp
  • decomp_pos
  • decomp_lin -> has a branch

MDD

  • decomp
  • decomp_pos

Regular

  • decomp -> MDD

InDomain

  • decomp_lin: any(var == val) instead of var != val

@ThomSerg ThomSerg mentioned this pull request Jun 2, 2026
32 tasks
@IgnaceBleukx

Copy link
Copy Markdown
Collaborator

Slightly misused this PR, and added a linear decomposition for InDomain.
I'm assuming this will improve quite a bit for linear solvers, as we avoid all of the != constraints like this.

@tias tias added this to the v0.20 milestone Jun 8, 2026
@tias

tias commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

To revise: which one to propose for master (rest, revert/remove from this PR)

@tias tias left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

great, minor feedback

Comment thread cpmpy/expressions/globalconstraints.py Outdated
Comment thread cpmpy/expressions/globalconstraints.py Outdated
Comment thread cpmpy/tools/xcsp3/parser_callbacks.py
@tias tias requested a review from IgnaceBleukx June 15, 2026 11:38
@IgnaceBleukx IgnaceBleukx marked this pull request as ready for review June 16, 2026 06:38

@IgnaceBleukx IgnaceBleukx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great, some simplifications are possible in the decompositions and the xglobals file : )

Comment thread cpmpy/expressions/globalconstraints.py
Comment thread cpmpy/expressions/globalconstraints.py Outdated
Comment thread cpmpy/expressions/globalconstraints.py Outdated
Comment thread cpmpy/expressions/globalconstraints.py
Comment thread cpmpy/expressions/globalconstraints.py
Comment thread cpmpy/transformations/decompose_global.py
Comment thread cpmpy/transformations/decompose_global.py Outdated
Comment thread cpmpy/transformations/linearize.py Outdated
Comment thread tests/test_globalconstraints.py
Comment thread tests/test_transf_decompose.py Outdated

@tias tias left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks ready, great to see the full global treatment land!

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.

4 participants