Skip to content

Commit

Permalink
add new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurakgun committed Nov 7, 2023
1 parent c94cde5 commit 052b041
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/custom/allDiff-chuffed/model.essence
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

letting n be 4


letting hints be function(
(1,1) --> 2,
(2,2) --> 2
)


letting less_than be relation(
((1,1) , (2,1)),
((4,2) , (3,2)),
((3,3) , (3,4)),
((3,4) , (4,4))
)


letting DOMAIN be domain int(1..n)


find board : matrix indexed by [DOMAIN, DOMAIN] of DOMAIN


such that forAll (hint,num) in hints .
board[hint[1], hint[2]] = num,


such that forAll i: DOMAIN .
allDiff(board[i,..]),


such that forAll j: DOMAIN .
allDiff(board[..,j]),
3 changes: 3 additions & 0 deletions tests/custom/allDiff-chuffed/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rm -rf conjure-output *.solution
conjure solve model.essence --solver=chuffed
rm -rf conjure-output *.solution
7 changes: 7 additions & 0 deletions tests/custom/allDiff-chuffed/stdout.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Generating models for model.essence
Generated models: model000001.eprime
Saved under: conjure-output
Savile Row: model000001.eprime
Running minion for domain filtering.
Running solver: chuffed
Copying solution to: model.solution

0 comments on commit 052b041

Please sign in to comment.