1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
on-restart-benchmarks/share/minizinc/std/diffn_nonstrict_k.mzn
Jip J. Dekker f2a1c4e389 Squashed 'software/mza/' content from commit f970a59b17
git-subtree-dir: software/mza
git-subtree-split: f970a59b177c13ca3dd8aaef8cc6681d83b7e813
2021-07-11 16:34:30 +10:00

18 lines
837 B
MiniZinc

include "fzn_diffn_nonstrict_k.mzn";
include "fzn_diffn_nonstrict_k_reif.mzn";
/** @group globals.packing
Constrains \p k-dimensional boxes to be non-overlapping. For each box \p i
and dimension \p j, \a box_posn[\p i, \p j] is the base position of the box
in dimension \p j, and \a box_size[\p i, \p j] is the size in that dimension.
Boxes whose size is 0 in at least one dimension can be packed anywhere.
*/
predicate diffn_nonstrict_k(array[int,int] of var int: box_posn,
array[int,int] of var int: box_size) =
let { set of int: DIMS= index_set_2of2(box_posn) } in
assert(index_set_2of2(box_size) = DIMS /\
index_set_1of2(box_posn) = index_set_1of2(box_size),
"diffn: index sets of arguments are incorrect",
fzn_diffn_nonstrict_k(box_posn, box_size)
)