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
13 | 0, _, _, _, _, _, _, _, _, _, _, 0
14 | 0, _, _, _, _, _, _, _, _, _, _, 0
15 | 0, _, _, _, _, _, _, _, _, _, _, 0
16 | 0, _, _, _, _, _, _, _, _, _, _, 0
17 | 0, _, _, _, _, _, _, _, _, _, _, 0
18 | 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[7, 9] > 0;
27
28row_sums = [3, 2, 3, 4, 0, 1, 2, 2, 2, 1];
29
30col_sums = [2, 1, 0, 0, 5, 2, 3, 1, 4, 2];
31
32n_classes = 4;
33
34class_sizes = [4, 3, 2, 1];
35