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