this repo has no description
1% RUNS ON mzn20_fd
2% RUNS ON mzn-fzn_fd
3% RUNS ON mzn20_fd_linear
4% RUNS ON mzn20_mip
5
6% Regression test for a flattening problem reported by pjs in version 1.1.5
7% of MiniZinc.
8
9int: size_codex;
10array[1..size_codex] of 0..9: codex;
11array[1..size_codex] of string: fixed;
12
13int: num_symbols;
14array[1..num_symbols] of string: symbols;
15
16int: rows;
17int: cols;
18array[1..rows,1..cols] of string: puzzle;
19
20array[1..rows*cols] of string: allsym =
21 [ puzzle[i,j] | i in 1..rows, j in 1..cols ];
22int: num_symbols2 = length( [ allsym[i] | i in 1..rows*cols
23 where not exists(j in i+1..rows*cols)(
24 allsym[i] == allsym[j]) ]);
25array[1..num_symbols] of string: sym2 = [ allsym[i] | i in 1..rows*cols
26 where not exists(j in i+1..rows*cols)(
27 allsym[i] == allsym[j]) ];
28
29var 0..1:x;
30
31solve satisfy;
32
33output [show(x),"\n"]
34 ++ [show(num_symbols2),"\n"]
35 ++ [show(allsym),"\n"]
36 ++ [show(sym2),"\n"]
37 ;
38
39size_codex = 10;
40codex = [0, 1, 2, 3, 5, 6, 7, 7, 8, 9];
41fixed = [" "," "," "," "," "," ","Z","?"," "," "];
42
43num_symbols = 11;
44symbols = ["P","L","E","A","S","O","V","U","Z","?"," "];
45
46rows = 4;
47cols = 6;
48puzzle = [| "P", "L", "E", "A", "S", "E"
49 | " ", "S", "O", "L", "V", "E"
50 | "P", "U", "Z", "Z", "L", "E"
51 | "?", "?", "?", "?", "?", "?" |];