Blame view

fz/examples/aust.mzn 551 Bytes
2bac8a70   Salvador Abreu   added some examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
% 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=", show(wa), "\t nt=", show(nt), 
        "\t sa=", show(sa), "\n", "q=", show(q),  
        "\t nsw=", show(nsw), "\t v=", show(v), "\n",
         "t=", show(t),  "\n"];