this repo has no description
at develop 852 B view raw
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 13 | 0, 0, _, _, _, _, _, _, _, _, _, 0 14 | 0, _, 0, _, _, _, _, _, _, _, _, 0 15 | 0, 0, _, _, _, _, _, _, _, _, _, 0 16 | 0, _, _, _, _, _, _, _, _, _, _, 0 17 | 0, _, _, _, _, _, _, _, _, _, _, 0 18 | 0, _, _, _, _, _, _, _, _, _, _, 0 19 | 0, _, _, _, _, _, _, 0, _, _, _, 0 20 | 0, _, _, _, _, _, _, _, _, _, _, 0 21 | 0, _, _, _, _, _, _, _, _, _, _, 0 22 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 23 |] 24); 25 26constraint a[3, 1] > 0; 27 28row_sums = [3, 2, 4, 2, 3, 3, 1, 1, 1, 0]; 29 30col_sums = [1, 3, 0, 2, 5, 0, 5, 1, 1, 2]; 31 32n_classes = 4; 33 34class_sizes = [4, 3, 2, 1]; 35