this repo has no description
1% RUNS ON mzn20_fd
2% RUNS ON mzn-fzn_fd
3% RUNS ON mzn20_mip
4% Example battleships problem for battleships.mzn.
5%
6include "battleships.mzn.model";
7
8n = 10;
9
10a = array2d(ROW, COL,
11 [| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12 | 0, _, 0, 0, 0, 0, 0, _, _, _, _, 0
13 | 0, _, 0, _, 0, _, _, _, _, _, _, 0
14 | 0, 0, _, _, _, _, _, _, _, _, _, 0
15 | 0, _, _, _, _, _, _, _, _, _, _, 0
16 | 0, _, _, _, _, _, _, _, _, _, _, 0
17 | 0, _, _, _, _, 0, 0, _, _, _, _, 0
18 | 0, _, _, _, _, 0, _, _, _, _, _, 0
19 | 0, _, _, _, _, 0, 0, _, _, _, _, 0
20 | 0, _, _, _, _, _, _, _, _, _, 0, 0
21 | 0, _, _, _, _, _, _, _, _, _, _, 0
22 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
23 |]
24);
25
26constraint a[1, 1] > 0;
27constraint a[2, 3] > 0;
28constraint a[7, 6] > 0;
29
30row_sums = [3, 2, 2, 1, 4, 0, 3, 1, 3, 1];
31
32col_sums = [3, 1, 4, 3, 2, 2, 1, 1, 2, 1];
33
34n_classes = 4;
35
36class_sizes = [4, 3, 2, 1];
37