rf-web/vendor/bundle/gems/rouge-3.12.0/lib/rouge/demos/minizinc

24 lines
569 B
Plaintext
Raw Normal View History

2019-10-21 08:18:17 +00:00
% from MiniZinc Handbook:
% https://www.minizinc.org/doc-latest/en/modelling.html
% Colouring Australia using nc colours
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"];