A two dimensional disjunctive constraint that constrains the replacement of a collection of rectangles specified by Rectangles to not overlap in their areas. The placement of each rectangle can be optional, i.e. they may not need to be placed.
Each rectangle is defined by a rect named structure, using the following fields:
Note that the constraint is implemented by different Gecode propagators, depending on if all the rectangles are of fixed size or not. If at least one rectangle is not of fixed size, then the Gecode propagator requires additional variables for the right and top sides of the rectangles, plus additional constraints
Xright #= Xleft + Width Ytop #= Ybot + Heightfor each rectangles. These are posted as part of the constraint (the Xright and Ytop variables are not accessible by the user).
Any input variables which are not already domain variables will be converted into domain variables with default bounds.
A version of this constraint, generalised from two to multi- dimension, and without optional placement, is known as diffn in the Global Constraint Catalog. It is implemented using Gecode's nooverlap() constraint (variant with optional placement).