nixpkgs/pkgs/development/tools/minizinc/simple-test/aust.mzn
Alexandru Scvortov 44a331ac33 minizinc: enable gecode and cbc solvers by default
Other changes:
- switch derivation to finalAttrs pattern
2023-06-01 14:07:14 +01:00

21 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"];