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