Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
275 stars 76 forks source link

nooverlap: zero-sized rectangles overlap contrary to what documentation says #142

Open yurivict opened 2 years ago

yurivict commented 2 years ago

Describe the bug The documentation says about nooverlap:

Note that the width or the height of a rectangle can be zero. In this case, the rectangle does not occupy any space. However no other rectangle is allowed to be placed where the zero-sized rectangle is placed.

However, rectangles from the solution do intersect.

To Reproduce This program: testcase-nooverlap.cpp.txt returns solutions that have all zero coordinates (all rectangles intersect).

Gecode and Platform Configuration Version: 6.3.0 (0916a1a) OS: FreeBSD 13

zayenz commented 2 years ago

Interesting discrepancy. There are apparently no tests with boxes with zero-dimensions, so it is not unexpected that this might be a problem. I also think I know how this might happen, but unsure on how to best handle it.