9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
20 lines
513 B
MiniZinc
20 lines
513 B
MiniZinc
% Taken from https://www.minizinc.org/doc-2.7.3/en/modelling.html
|
|
int: nc = 3;
|
|
|
|
var 1..nc: wa; var 1..nc: nt; var 1..nc: sa; var 1..nc: q;
|
|
var 1..nc: nsw; var 1..nc: v; var 1..nc: t;
|
|
|
|
constraint wa != nt;
|
|
constraint wa != sa;
|
|
constraint nt != sa;
|
|
constraint nt != q;
|
|
constraint sa != q;
|
|
constraint sa != nsw;
|
|
constraint sa != v;
|
|
constraint q != nsw;
|
|
constraint nsw != v;
|
|
solve satisfy;
|
|
|
|
output ["wa=\(wa)\t nt=\(nt)\t sa=\(sa)\n",
|
|
"q=\(q)\t nsw=\(nsw)\t v=\(v)\n",
|
|
"t=", show(t), "\n"];
|