-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c94cde5
commit 052b041
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |