Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
869 B · 36 lines
at develop
12345678910111213141516171819202122232425262728293031323334353637% RUNS ON mzn20_fd% RUNS ON mzn-fzn_fd% RUNS ON mzn20_fd_linear% RUNS ON mzn20_mip% Example battleships problem for bs.mzn.%include "battleships.mzn.model";n = 10;a = array2d(ROW, COL, [| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, _, _, _, _, _, _, _, 0, _, 0, 0 | 0, 0, _, _, _, _, _, _, _, 0, _, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, _, _, _, 0, _, _, _, _, _, _, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, _, _, _, _, _, _, _, _, _, _, 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |]);constraint a[2, 9] > 1;row_sums = [2, 1, 5, 0, 0, 0, 1, 6, 1, 4];col_sums = [1, 4, 1, 2, 3, 1, 3, 0, 4, 1];n_classes = 4;class_sizes = [4, 3, 2, 1];