Skip to content

Commit

Permalink
Merge branch 'refs/heads/ShortTable' into xcsp3_executable
Browse files Browse the repository at this point in the history
# Conflicts:
#	cpmpy/expressions/__init__.py
#	tests/test_constraints.py
  • Loading branch information
IgnaceBleukx committed May 27, 2024
2 parents a0022c1 + 655d57e commit 55e5b74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
# Exclude some global constraints for solvers

NUM_GLOBAL = {
"AllEqual", "AllDifferent", "AllDifferentExcept0", "Cumulative", "GlobalCardinalityCount", "InDomain", "Inverse", "Table", "Circuit",
"SubCircuit", "SubCircuitWithStart", "Increasing", "IncreasingStrict", "Decreasing", "DecreasingStrict",
"AllEqual", "AllDifferent", "AllDifferentExcept0", "Cumulative", "GlobalCardinalityCount", "InDomain", "Inverse",
"Table", "ShortTable",
"Circuit", "SubCircuit", "SubCircuitWithStart",
"Increasing", "IncreasingStrict", "Decreasing", "DecreasingStrict",
# also global functions
"Abs", "Element", "Minimum", "Maximum", "Count", "NValue", "NValueExcept", "IfThenElseNum"
}
Expand Down Expand Up @@ -185,6 +187,8 @@ def global_constraints(solver):
expr = cls(NUM_ARGS, [1,0,2])
elif name == "Table":
expr = cls(NUM_ARGS, [[0,1,2],[1,2,0],[1,0,2]])
elif name == "ShortTable":
expr = cls(NUM_ARGS, [[0,"*",2], ["*","*",1]])
elif name == "IfThenElse":
expr = cls(*BOOL_ARGS)
elif name == "InDomain":
Expand Down

0 comments on commit 55e5b74

Please sign in to comment.